import type { AsyncLocalStorage } from 'node:async_hooks'; import diagnostics from 'node:diagnostics_channel'; import { ExError } from '../../utility/ExError.js'; export interface ITraceScopeStore { traceId: string; spanId: string; parentSpanId?: string; traceState: TraceState; } export declare const invalidTraceId = "00000000000000000000000000000000"; export declare const invalidSpanId = "0000000000000000"; export declare enum TraceFlag { Sampled = 1, NotSampled = 0 } export declare class TraceState { private static readonly MaxKeyValuePairs; private states; constructor(headerValue?: string); private parse; serialize(): string; get(key: string): string | undefined; set(key: string, value: string): void; remove(key: string): void; isEmpty(): boolean; } export declare abstract class TraceContext { static startChannel: diagnostics.Channel; static endChannel: diagnostics.Channel; constructor(traceId?: string, parentSpanId?: string, flags?: number, traceState?: string); toRPCTraceParentHeader(): string; toRPCTraceStateHeader(): string; run(storage: AsyncLocalStorage, callback: () => R): R; private onStart; private onEnd; private onError; get traceId(): string; get spanId(): string; get parentSpanId(): string | undefined; get flags(): TraceFlag; set flags(value: TraceFlag); get finished(): boolean; get traceState(): TraceState; get startNanoTime(): bigint; get endNanoTime(): bigint; get error(): ExError | undefined; get attribute(): Map; private traceId_; private spanId_; private parentSpanId_?; private traceState_; private flags_; private startNanoTime_; private endNanoTime_; private error_?; private attribute_; } //# sourceMappingURL=TraceContext.d.ts.map