UNPKG

autotel

Version:
30 lines (28 loc) 911 B
import { AUTOTEL_SAMPLING_TAIL_EVALUATED, AUTOTEL_SAMPLING_TAIL_KEEP } from './chunk-DPSA4QLA.js'; // 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[AUTOTEL_SAMPLING_TAIL_EVALUATED]; const shouldKeep = span.attributes[AUTOTEL_SAMPLING_TAIL_KEEP]; if (tailEvaluated === true && shouldKeep === false) { return; } this.wrappedProcessor.onEnd(span); } forceFlush() { return this.wrappedProcessor.forceFlush(); } shutdown() { return this.wrappedProcessor.shutdown(); } }; export { TailSamplingSpanProcessor }; //# sourceMappingURL=chunk-A4E5AQFK.js.map //# sourceMappingURL=chunk-A4E5AQFK.js.map