/** * Fire-and-forget OTLP/JSON span emitter. Telemetry can never break or * slow the customer's agent: failures retry once, then the batch is * dropped WITH accounting — the drop count rides the next batch as * `verlon.dropped_spans`, so the backend's coverage math can report * verified loss instead of silence. */ export interface SpanDraft { traceId: string; spanId: string; parentSpanId: string | null; operation: 'invoke_agent' | 'execute_tool'; name: string; gateId: string | null; taskName: string | null; conversationId: string | null; sequence: number; startMs: number; endMs: number; status: 'ok' | 'error'; errorMessage?: string | null; input?: unknown; output?: unknown; links?: { traceId: string; spanId: string; kind: string; }[]; } export interface EmitterOptions { endpoint: string; apiKey: string; fetchImpl?: typeof fetch; maxBatch?: number; flushIntervalMs?: number; onTelemetryError?: (error: unknown) => void; } export declare class SpanEmitter { private readonly options; private buffer; private droppedSpans; private timer; private inflight; private readonly maxBatch; private readonly flushIntervalMs; constructor(options: EmitterOptions); enqueue(draft: SpanDraft): void; /** Drain the buffer. Never rejects. */ flush(): Promise; } //# sourceMappingURL=emitter.d.ts.map