UNPKG

autotel

Version:
29 lines (27 loc) 942 B
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const require_sampling = require('./sampling.cjs'); //#region src/tail-sampling-processor.ts var TailSamplingSpanProcessor = class { wrappedProcessor; constructor(wrappedProcessor) { this.wrappedProcessor = wrappedProcessor; } onStart(span, parentContext) { this.wrappedProcessor.onStart(span, parentContext); } onEnd(span) { const tailEvaluated = span.attributes[require_sampling.AUTOTEL_SAMPLING_TAIL_EVALUATED]; const shouldKeep = span.attributes[require_sampling.AUTOTEL_SAMPLING_TAIL_KEEP]; if (tailEvaluated === true && shouldKeep === false) return; this.wrappedProcessor.onEnd(span); } forceFlush() { return this.wrappedProcessor.forceFlush(); } shutdown() { return this.wrappedProcessor.shutdown(); } }; //#endregion exports.TailSamplingSpanProcessor = TailSamplingSpanProcessor; //# sourceMappingURL=tail-sampling-processor.cjs.map