@opentelemetry/sdk-trace-base
Advanced tools
Comparing version 1.24.1 to 1.25.0
@@ -52,2 +52,4 @@ import { Context, Exception, HrTime, Link, Span as APISpan, SpanAttributes, SpanAttributeValue, SpanContext, SpanKind, SpanStatus, TimeInput } from '@opentelemetry/api'; | ||
addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, timeStamp?: TimeInput): this; | ||
addLink(link: Link): this; | ||
addLinks(links: Link[]): this; | ||
setStatus(status: SpanStatus): this; | ||
@@ -54,0 +56,0 @@ updateName(name: string): this; |
@@ -43,5 +43,14 @@ /* | ||
}; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
import { diag, SpanStatusCode, } from '@opentelemetry/api'; | ||
import { addHrTimes, millisToHrTime, getTimeOrigin, hrTime, hrTimeDuration, isAttributeValue, isTimeInput, isTimeInputHrTime, otperformance, sanitizeAttributes, } from '@opentelemetry/core'; | ||
import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; | ||
import { SEMATTRS_EXCEPTION_MESSAGE, SEMATTRS_EXCEPTION_STACKTRACE, SEMATTRS_EXCEPTION_TYPE, } from '@opentelemetry/semantic-conventions'; | ||
import { ExceptionEventName } from './enums'; | ||
@@ -171,2 +180,11 @@ /** | ||
}; | ||
Span.prototype.addLink = function (link) { | ||
this.links.push(link); | ||
return this; | ||
}; | ||
Span.prototype.addLinks = function (links) { | ||
var _a; | ||
(_a = this.links).push.apply(_a, __spreadArray([], __read(links), false)); | ||
return this; | ||
}; | ||
Span.prototype.setStatus = function (status) { | ||
@@ -231,22 +249,21 @@ if (this._isSpanEnded()) | ||
if (typeof exception === 'string') { | ||
attributes[SemanticAttributes.EXCEPTION_MESSAGE] = exception; | ||
attributes[SEMATTRS_EXCEPTION_MESSAGE] = exception; | ||
} | ||
else if (exception) { | ||
if (exception.code) { | ||
attributes[SemanticAttributes.EXCEPTION_TYPE] = | ||
exception.code.toString(); | ||
attributes[SEMATTRS_EXCEPTION_TYPE] = exception.code.toString(); | ||
} | ||
else if (exception.name) { | ||
attributes[SemanticAttributes.EXCEPTION_TYPE] = exception.name; | ||
attributes[SEMATTRS_EXCEPTION_TYPE] = exception.name; | ||
} | ||
if (exception.message) { | ||
attributes[SemanticAttributes.EXCEPTION_MESSAGE] = exception.message; | ||
attributes[SEMATTRS_EXCEPTION_MESSAGE] = exception.message; | ||
} | ||
if (exception.stack) { | ||
attributes[SemanticAttributes.EXCEPTION_STACKTRACE] = exception.stack; | ||
attributes[SEMATTRS_EXCEPTION_STACKTRACE] = exception.stack; | ||
} | ||
} | ||
// these are minimum requirements from spec | ||
if (attributes[SemanticAttributes.EXCEPTION_TYPE] || | ||
attributes[SemanticAttributes.EXCEPTION_MESSAGE]) { | ||
if (attributes[SEMATTRS_EXCEPTION_TYPE] || | ||
attributes[SEMATTRS_EXCEPTION_MESSAGE]) { | ||
this.addEvent(ExceptionEventName, attributes, time); | ||
@@ -253,0 +270,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.24.1"; | ||
export declare const VERSION = "1.25.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export var VERSION = '1.24.1'; | ||
export var VERSION = '1.25.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -52,2 +52,4 @@ import { Context, Exception, HrTime, Link, Span as APISpan, SpanAttributes, SpanAttributeValue, SpanContext, SpanKind, SpanStatus, TimeInput } from '@opentelemetry/api'; | ||
addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, timeStamp?: TimeInput): this; | ||
addLink(link: Link): this; | ||
addLinks(links: Link[]): this; | ||
setStatus(status: SpanStatus): this; | ||
@@ -54,0 +56,0 @@ updateName(name: string): this; |
@@ -18,3 +18,3 @@ /* | ||
import { addHrTimes, millisToHrTime, getTimeOrigin, hrTime, hrTimeDuration, isAttributeValue, isTimeInput, isTimeInputHrTime, otperformance, sanitizeAttributes, } from '@opentelemetry/core'; | ||
import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; | ||
import { SEMATTRS_EXCEPTION_MESSAGE, SEMATTRS_EXCEPTION_STACKTRACE, SEMATTRS_EXCEPTION_TYPE, } from '@opentelemetry/semantic-conventions'; | ||
import { ExceptionEventName } from './enums'; | ||
@@ -132,2 +132,10 @@ /** | ||
} | ||
addLink(link) { | ||
this.links.push(link); | ||
return this; | ||
} | ||
addLinks(links) { | ||
this.links.push(...links); | ||
return this; | ||
} | ||
setStatus(status) { | ||
@@ -192,22 +200,21 @@ if (this._isSpanEnded()) | ||
if (typeof exception === 'string') { | ||
attributes[SemanticAttributes.EXCEPTION_MESSAGE] = exception; | ||
attributes[SEMATTRS_EXCEPTION_MESSAGE] = exception; | ||
} | ||
else if (exception) { | ||
if (exception.code) { | ||
attributes[SemanticAttributes.EXCEPTION_TYPE] = | ||
exception.code.toString(); | ||
attributes[SEMATTRS_EXCEPTION_TYPE] = exception.code.toString(); | ||
} | ||
else if (exception.name) { | ||
attributes[SemanticAttributes.EXCEPTION_TYPE] = exception.name; | ||
attributes[SEMATTRS_EXCEPTION_TYPE] = exception.name; | ||
} | ||
if (exception.message) { | ||
attributes[SemanticAttributes.EXCEPTION_MESSAGE] = exception.message; | ||
attributes[SEMATTRS_EXCEPTION_MESSAGE] = exception.message; | ||
} | ||
if (exception.stack) { | ||
attributes[SemanticAttributes.EXCEPTION_STACKTRACE] = exception.stack; | ||
attributes[SEMATTRS_EXCEPTION_STACKTRACE] = exception.stack; | ||
} | ||
} | ||
// these are minimum requirements from spec | ||
if (attributes[SemanticAttributes.EXCEPTION_TYPE] || | ||
attributes[SemanticAttributes.EXCEPTION_MESSAGE]) { | ||
if (attributes[SEMATTRS_EXCEPTION_TYPE] || | ||
attributes[SEMATTRS_EXCEPTION_MESSAGE]) { | ||
this.addEvent(ExceptionEventName, attributes, time); | ||
@@ -214,0 +221,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.24.1"; | ||
export declare const VERSION = "1.25.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export const VERSION = '1.24.1'; | ||
export const VERSION = '1.25.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -52,2 +52,4 @@ import { Context, Exception, HrTime, Link, Span as APISpan, SpanAttributes, SpanAttributeValue, SpanContext, SpanKind, SpanStatus, TimeInput } from '@opentelemetry/api'; | ||
addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, timeStamp?: TimeInput): this; | ||
addLink(link: Link): this; | ||
addLinks(links: Link[]): this; | ||
setStatus(status: SpanStatus): this; | ||
@@ -54,0 +56,0 @@ updateName(name: string): this; |
@@ -134,2 +134,10 @@ "use strict"; | ||
} | ||
addLink(link) { | ||
this.links.push(link); | ||
return this; | ||
} | ||
addLinks(links) { | ||
this.links.push(...links); | ||
return this; | ||
} | ||
setStatus(status) { | ||
@@ -194,22 +202,21 @@ if (this._isSpanEnded()) | ||
if (typeof exception === 'string') { | ||
attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_MESSAGE] = exception; | ||
attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_MESSAGE] = exception; | ||
} | ||
else if (exception) { | ||
if (exception.code) { | ||
attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_TYPE] = | ||
exception.code.toString(); | ||
attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_TYPE] = exception.code.toString(); | ||
} | ||
else if (exception.name) { | ||
attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_TYPE] = exception.name; | ||
attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_TYPE] = exception.name; | ||
} | ||
if (exception.message) { | ||
attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_MESSAGE] = exception.message; | ||
attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_MESSAGE] = exception.message; | ||
} | ||
if (exception.stack) { | ||
attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_STACKTRACE] = exception.stack; | ||
attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_STACKTRACE] = exception.stack; | ||
} | ||
} | ||
// these are minimum requirements from spec | ||
if (attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_TYPE] || | ||
attributes[semantic_conventions_1.SemanticAttributes.EXCEPTION_MESSAGE]) { | ||
if (attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_TYPE] || | ||
attributes[semantic_conventions_1.SEMATTRS_EXCEPTION_MESSAGE]) { | ||
this.addEvent(enums_1.ExceptionEventName, attributes, time); | ||
@@ -216,0 +223,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.24.1"; | ||
export declare const VERSION = "1.25.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '1.24.1'; | ||
exports.VERSION = '1.25.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/sdk-trace-base", | ||
"version": "1.24.1", | ||
"version": "1.25.0", | ||
"description": "OpenTelemetry Tracing", | ||
@@ -35,3 +35,4 @@ "main": "build/src/index.js", | ||
"prewatch": "npm run precompile", | ||
"peer-api-check": "node ../../scripts/peer-api-check.js" | ||
"peer-api-check": "node ../../scripts/peer-api-check.js", | ||
"align-api-deps": "node ../../scripts/align-api-deps.js" | ||
}, | ||
@@ -69,6 +70,6 @@ "keywords": [ | ||
"devDependencies": { | ||
"@opentelemetry/api": ">=1.0.0 <1.9.0", | ||
"@opentelemetry/api": ">=1.0.0 <1.10.0", | ||
"@types/mocha": "10.0.6", | ||
"@types/node": "18.6.5", | ||
"@types/sinon": "10.0.20", | ||
"@types/sinon": "17.0.3", | ||
"@types/webpack-env": "1.16.3", | ||
@@ -78,3 +79,3 @@ "babel-plugin-istanbul": "6.1.1", | ||
"cross-var": "1.1.0", | ||
"karma": "6.4.2", | ||
"karma": "6.4.3", | ||
"karma-chrome-launcher": "3.1.0", | ||
@@ -85,3 +86,3 @@ "karma-coverage": "2.2.1", | ||
"karma-spec-reporter": "0.0.36", | ||
"karma-webpack": "4.0.2", | ||
"karma-webpack": "5.0.1", | ||
"lerna": "6.6.2", | ||
@@ -91,3 +92,3 @@ "mocha": "10.2.0", | ||
"sinon": "15.1.2", | ||
"ts-loader": "8.4.0", | ||
"ts-loader": "9.5.1", | ||
"ts-mocha": "10.0.0", | ||
@@ -98,12 +99,12 @@ "typescript": "4.4.4", | ||
"peerDependencies": { | ||
"@opentelemetry/api": ">=1.0.0 <1.9.0" | ||
"@opentelemetry/api": ">=1.0.0 <1.10.0" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/core": "1.24.1", | ||
"@opentelemetry/resources": "1.24.1", | ||
"@opentelemetry/semantic-conventions": "1.24.1" | ||
"@opentelemetry/core": "1.25.0", | ||
"@opentelemetry/resources": "1.25.0", | ||
"@opentelemetry/semantic-conventions": "1.25.0" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base", | ||
"sideEffects": false, | ||
"gitHead": "41c2626fe0ed03e2e83bd79ee43c9bdf0ffd80d8" | ||
"gitHead": "c4d3351b6b3f5593c8d7cbfec97b45cea9fe1511" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
772352
8349
+ Added@opentelemetry/api@1.9.0(transitive)
+ Added@opentelemetry/core@1.25.0(transitive)
+ Added@opentelemetry/resources@1.25.0(transitive)
+ Added@opentelemetry/semantic-conventions@1.25.0(transitive)
- Removed@opentelemetry/api@1.8.0(transitive)
- Removed@opentelemetry/core@1.24.1(transitive)
- Removed@opentelemetry/resources@1.24.1(transitive)
- Removed@opentelemetry/semantic-conventions@1.24.1(transitive)
Updated@opentelemetry/core@1.25.0