export interface HBSpan { traceId: string; spanId: string; parentSpanId: string; name: string; op: string; startTimeMs: number; durationMs: number; status: 'ok' | 'error' | 'cancelled'; attributes?: Record; } export interface TracingSessionContext { sessionId: string | null; endUserId: string | null; automaticProperties?: Record; release?: string | null; environment?: string | null; } export interface TracingConfig { getSession: () => TracingSessionContext; sendSpans: (spans: HBSpan[], ctx: TracingSessionContext, useBeacon: boolean) => void; shouldSkipUrl?: (url: string) => boolean; pageLoadFlushDelayMs?: number; } export interface InactiveSpan { setAttribute(key: string, value: unknown): void; setStatus(status: 'ok' | 'error' | 'cancelled'): void; end(): void; } export declare class Tracing { private cfg; private traceId; private rootSpanId; private buffer; private flushTimer; private resourceObserver; private started; private originalFetch; constructor(cfg: TracingConfig); start(): void; /** Begin a fresh trace (e.g. an SPA route change). */ startNewTrace(): void; /** W3C + Sentry trace-context headers for the current trace. */ getTraceHeaders(): Record; /** Time a synchronous or async callback as a child span. */ startSpan(opts: { name: string; op?: string; attributes?: Record; }, callback: () => T): T; /** Open a span the caller ends manually. */ startInactiveSpan(opts: { name: string; op?: string; attributes?: Record; }): InactiveSpan; /** Flush buffered spans now. Called on unload (beacon) by the tracker. */ flush(useBeacon?: boolean): void; stop(): void; private record; private capturePageLoad; private observeResources; private recordResource; private installTracePropagation; } //# sourceMappingURL=tracing.d.ts.map