import { TracingProcessor } from './processor-interface'; import { Span } from './spans'; import { Trace } from './traces'; import { SpanData } from './span-data'; /** * Forwards all calls to a list of TracingProcessors, in order of registration. */ export declare class SynchronousMultiTracingProcessor implements TracingProcessor { private _processors; private _lock; /** * Add a processor to the list of processors. Each processor will receive all traces/spans. */ addTracingProcessor(tracingProcessor: TracingProcessor): void; /** * Set the list of processors. This will replace the current list of processors. */ setProcessors(processors: TracingProcessor[]): void; /** * Called when a trace is started. */ onTraceStart(trace: Trace): void; /** * Called when a trace is finished. */ onTraceEnd(trace: Trace): void; /** * Called when a span is started. */ onSpanStart(span: Span): void; /** * Called when a span is finished. */ onSpanEnd(span: Span): void; /** * Called when the application stops. */ shutdown(): void; /** * Force the processors to flush their buffers. */ force_flush(): void; forceFlush(): void; } /** * Provider for creating traces and spans */ export declare class TraceProvider { private _multiProcessor; private _disabled; constructor(); /** * Add a processor to the list of processors. Each processor will receive all traces/spans. */ registerProcessor(processor: TracingProcessor): void; /** * Set the list of processors. This will replace the current list of processors. */ setProcessors(processors: TracingProcessor[]): void; /** * Returns the currently active trace, if any. */ getCurrentTrace(): Trace | null; /** * Returns the currently active span, if any. */ getCurrentSpan(): Span | null; /** * Set whether tracing is disabled. */ setDisabled(disabled: boolean): void; /** * Create a new trace. */ createTrace(name: string, traceId?: string | null, groupId?: string | null, metadata?: Record | null, disabled?: boolean): Trace; /** * Create a new span. */ createSpan(spanData: T, spanId?: string | null, parent?: Trace | Span | null, disabled?: boolean): Span; /** * Shut down the trace provider and all processors. */ shutdown(): void; } /** * Global trace provider instance */ export declare const GLOBAL_TRACE_PROVIDER: TraceProvider;