UNPKG

autotel

Version:
32 lines (29 loc) 947 B
'use strict'; var chunkVH77IPJN_cjs = require('./chunk-VH77IPJN.cjs'); // 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[chunkVH77IPJN_cjs.AUTOTEL_SAMPLING_TAIL_EVALUATED]; const shouldKeep = span.attributes[chunkVH77IPJN_cjs.AUTOTEL_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-CEAQK2QY.cjs.map //# sourceMappingURL=chunk-CEAQK2QY.cjs.map