Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@web3api/tracing-js

Package Overview
Dependencies
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3api/tracing-js - npm Package Compare versions

Comparing version 0.0.1-prealpha.49 to 0.0.1-prealpha.50

1

build/index.d.ts

@@ -14,2 +14,3 @@ import * as api from "@opentelemetry/api";

static recordException(error: api.Exception): void;
static traceMethod(span: string): (target: unknown, key: string | symbol, descriptor: PropertyDescriptor) => PropertyDescriptor;
static traceFunc<TArgs extends Array<unknown>, TReturn>(span: string, func: (...args: TArgs) => TReturn): (...args: TArgs) => TReturn;

@@ -16,0 +17,0 @@ static _initProvider(serviceName: string): void;

@@ -105,2 +105,36 @@ "use strict";

};
Tracer.traceMethod = function (span) {
return function (target, key, descriptor) {
var original = descriptor.value;
descriptor.value = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
try {
Tracer.startSpan(span);
Tracer.setAttribute("input", __assign({}, args));
var result = original.apply(this, args);
if (isPromise(result)) {
return result.then(function (result) {
Tracer.setAttribute("output", result);
Tracer.endSpan();
return result;
});
}
else {
Tracer.setAttribute("output", result);
Tracer.endSpan();
return result;
}
}
catch (error) {
Tracer.recordException(error);
Tracer.endSpan();
throw error;
}
};
return descriptor;
};
};
Tracer.traceFunc = function (span, func) {

@@ -107,0 +141,0 @@ var _this = this;

6

package.json
{
"name": "@web3api/tracing-js",
"description": "Web3API Core Tracing",
"version": "0.0.1-prealpha.49",
"version": "0.0.1-prealpha.50",
"license": "MIT",

@@ -16,3 +16,3 @@ "repository": {

"build": "rimraf ./build && tsc --project tsconfig.build.json",
"lint": "eslint --color --ext .ts src/",
"lint": "eslint --color -c ../../../.eslintrc.js src/",
"test": "jest --passWithNoTests --runInBand --verbose",

@@ -45,3 +45,3 @@ "test:ci": "jest --passWithNoTests --runInBand --verbose",

},
"gitHead": "ee0cda1e460fe4232945e159038e1e4d9fb7680e",
"gitHead": "2947f956485decb43363f42c99c2a6176a25bde8",
"publishConfig": {

@@ -48,0 +48,0 @@ "access": "public"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc