import { SamplingController } from "./runtime.mjs"; import { Context } from "@opentelemetry/api"; import { ReadableSpan, Span as Span$1, SpanProcessor } from "@opentelemetry/sdk-trace-base"; //#region src/sampling/span_processor.d.ts /** * Gates trace export for traces registered by Monocle sampling rules. * * Non-registered traces are forwarded immediately. Registered traces are * buffered until their root span ends, then exported or dropped. */ declare class SamplingSpanProcessor implements SpanProcessor { #private; constructor(processors: SpanProcessor[], controller?: SamplingController); /** * Sampling decisions are applied when spans end, so start events are ignored. */ onStart(_span: Span$1, _parentContext: Context): void; /** * Forwards unmanaged spans immediately and flushes managed traces only when * their sampling rule allows export. */ onEnd(span: ReadableSpan): void; /** * Flushes wrapped processors. */ forceFlush(): Promise; /** * Clears sampling buffers and shuts down wrapped processors. */ shutdown(): Promise; } //#endregion export { SamplingSpanProcessor };