Socket
Socket
Sign inDemoInstall

@opentelemetry/tracing

Package Overview
Dependencies
Maintainers
4
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/tracing - npm Package Compare versions

Comparing version 0.10.3-alpha.34 to 0.10.3-alpha.35

1

build/src/Span.d.ts

@@ -44,2 +44,3 @@ import * as api from '@opentelemetry/api';

isRecording(): boolean;
recordException(exception: api.Exception, time?: api.TimeInput): void;
get duration(): api.HrTime;

@@ -46,0 +47,0 @@ get ended(): boolean;

@@ -21,2 +21,3 @@ "use strict";

const core_1 = require("@opentelemetry/core");
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
/**

@@ -131,2 +132,30 @@ * This class represents a span.

}
recordException(exception, time = core_1.hrTime()) {
const attributes = {};
if (typeof exception === 'string') {
attributes[semantic_conventions_1.ExceptionAttribute.MESSAGE] = exception;
}
else if (exception) {
if (exception.code) {
attributes[semantic_conventions_1.ExceptionAttribute.TYPE] = exception.code;
}
else if (exception.name) {
attributes[semantic_conventions_1.ExceptionAttribute.TYPE] = exception.name;
}
if (exception.message) {
attributes[semantic_conventions_1.ExceptionAttribute.MESSAGE] = exception.message;
}
if (exception.stack) {
attributes[semantic_conventions_1.ExceptionAttribute.STACKTRACE] = exception.stack;
}
}
// these are minimum requirements from spec
if (attributes[semantic_conventions_1.ExceptionAttribute.TYPE] ||
attributes[semantic_conventions_1.ExceptionAttribute.MESSAGE]) {
this.addEvent(semantic_conventions_1.ExceptionEventName, attributes, time);
}
else {
this._logger.warn(`Failed to record an exception ${exception}`);
}
}
get duration() {

@@ -133,0 +162,0 @@ return this._duration;

2

build/src/version.d.ts

@@ -1,2 +0,2 @@

export declare const VERSION = "0.10.3-alpha.34+fb06b5b";
export declare const VERSION = "0.10.3-alpha.35+2ee9f1a";
//# sourceMappingURL=version.d.ts.map

@@ -20,3 +20,3 @@ "use strict";

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.10.3-alpha.34+fb06b5b';
exports.VERSION = '0.10.3-alpha.35+2ee9f1a';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/tracing",
"version": "0.10.3-alpha.34+fb06b5b",
"version": "0.10.3-alpha.35+2ee9f1a",
"description": "OpenTelemetry Tracing",

@@ -77,8 +77,9 @@ "main": "build/src/index.js",

"dependencies": {
"@opentelemetry/api": "^0.10.3-alpha.34+fb06b5b",
"@opentelemetry/api": "^0.10.3-alpha.35+2ee9f1a",
"@opentelemetry/context-base": "^0.10.2",
"@opentelemetry/core": "^0.10.3-alpha.34+fb06b5b",
"@opentelemetry/resources": "^0.10.3-alpha.34+fb06b5b"
"@opentelemetry/core": "^0.10.3-alpha.35+2ee9f1a",
"@opentelemetry/resources": "^0.10.3-alpha.35+2ee9f1a",
"@opentelemetry/semantic-conventions": "^0.10.3-alpha.35+2ee9f1a"
},
"gitHead": "fb06b5bb1142286acf5b326925f3af3353aa9d90"
"gitHead": "2ee9f1aaf7b61c4b4ae6b748f0a07f8fc708f07e"
}

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