UNPKG

autotel

Version:
30 lines (28 loc) 841 B
'use strict'; // 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["sampling.tail.evaluated"]; const shouldKeep = span.attributes["sampling.tail.keep"]; if (tailEvaluated === true && shouldKeep === false) { return; } this.wrappedProcessor.onEnd(span); } forceFlush() { return this.wrappedProcessor.forceFlush(); } shutdown() { return this.wrappedProcessor.shutdown(); } }; exports.TailSamplingSpanProcessor = TailSamplingSpanProcessor; //# sourceMappingURL=chunk-GVLK7YUU.cjs.map //# sourceMappingURL=chunk-GVLK7YUU.cjs.map