export type TraceStatus = 'ok' | 'error';
export interface TraceRecord {
    id: string;
    name: string;
    startedAt: string;
    endedAt?: string;
    durationMs?: number;
    status?: TraceStatus;
    attributes: Record<string, unknown>;
    error?: string;
}
export interface TraceEvent {
    id: string;
    name: string;
    timestamp: string;
    attributes: Record<string, unknown>;
}
export interface TraceSpan {
    id: string;
    end(status?: TraceStatus, attributes?: Record<string, unknown>): void;
    fail(error: unknown, attributes?: Record<string, unknown>): void;
}
export declare class RuntimeTracer {
    private readonly maxRecords;
    private spans;
    private events;
    constructor(maxRecords?: number);
    startSpan(name: string, attributes?: Record<string, unknown>): TraceSpan;
    recordEvent(name: string, attributes?: Record<string, unknown>): void;
    snapshot(): {
        spans: TraceRecord[];
        events: TraceEvent[];
    };
    clear(): void;
    private trim;
}
export declare const runtimeTracer: RuntimeTracer;
//# sourceMappingURL=tracing.d.ts.map