UNPKG

@opentelemetry/api

Version:
45 lines (44 loc) • 991 B
const require_invalid_span_constants = require("./invalid-span-constants.cjs"); //#region src/trace/NonRecordingSpan.ts /** * The NonRecordingSpan is the default {@link Span} that is used when no Span * implementation is available. All operations are no-op including context * propagation. */ var NonRecordingSpan = class { constructor(spanContext = require_invalid_span_constants.INVALID_SPAN_CONTEXT) { this._spanContext = spanContext; } spanContext() { return this._spanContext; } setAttribute(_key, _value) { return this; } setAttributes(_attributes) { return this; } addEvent(_name, _attributes) { return this; } addLink(_link) { return this; } addLinks(_links) { return this; } setStatus(_status) { return this; } updateName(_name) { return this; } end(_endTime) {} isRecording() { return false; } recordException(_exception, _time) {} }; //#endregion exports.NonRecordingSpan = NonRecordingSpan; //# sourceMappingURL=NonRecordingSpan.cjs.map