import { Context } from "@opentelemetry/api"; import { ReadableSpan, Span as Span$1, SpanProcessor } from "@opentelemetry/sdk-trace-base"; //#region src/span_processor.d.ts /** * SpanProcessor that enriches exception events with Monocle-specific attributes. * * When a span ends with exception events, this processor: * - Adds `monocle.exception.should_report = 'true'` on the span * - Reconstructs the Error cause chain from the stacktrace * - Adds `monocle.exception.cause_chain` JSON on exception events * - Adds best-effort `monocle.exception.values` when the original Error object * is no longer available * * AggregateError children cannot be reconstructed from standard OTel exception * attributes. Monocle-owned capture paths should write `monocle.exception.values` * when calling recordException if they still have access to the original Error. * * Exception events from raw third-party `span.recordException()` calls * stay in `otel_traces` and are read by the backend via UNION ALL. * No LogRecord bridge is needed — that would cause double-counting. */ declare class MonocleSpanProcessor implements SpanProcessor { #private; onStart(span: Span$1, _parentContext: Context): void; onEnd(readableSpan: ReadableSpan): void; forceFlush(): Promise; shutdown(): Promise; } //#endregion export { MonocleSpanProcessor };