import type { TraceEnvelope, Tracer as TracerInterface } from "./types.ts"; import type { TraceStore } from "./TraceStore.ts"; import type { RedactionFilter } from "./RedactionFilter.ts"; /** * Central in-memory trace recorder. Holds a ring buffer of the most recent * envelopes (newest first on retrieval) and preserves the span API. * When a store is provided, envelopes are flushed to it on a configurable * cadence (the timer is unref'd so it never keeps the process alive). */ export declare class Tracer implements TracerInterface { readonly capacity: number; private readonly store?; private readonly flushIntervalMs; private readonly redactor?; private readonly buffer; private head; private count; private pending; constructor(capacity?: number, store?: TraceStore | undefined, flushIntervalMs?: number, redactor?: RedactionFilter | undefined); startSpan(_name: string): void; endSpan(_name: string, _data?: Record): void; record(envelope: TraceEnvelope): void; /** Number of envelopes currently held in the ring buffer */ get size(): number; /** Flushes all pending envelopes to the configured store. On failure the failed envelope and the rest of the batch are re-queued for the next attempt. */ flush(): Promise; getRecent(n: number): TraceEnvelope[]; getByMember(memberId: string): TraceEnvelope[]; getByCorrelationId(id: string): TraceEnvelope[]; } //# sourceMappingURL=Tracer.d.ts.map