import { TracingProcessor } from './processor-interface'; /** * A trace is the root level object that tracing creates. It represents a logical "workflow". */ export declare abstract class Trace { /** * Start the trace. * * @param markAsCurrent - If true, the trace will be marked as the current trace. */ abstract start(markAsCurrent?: boolean): void; /** * Finish the trace. * * @param resetCurrent - If true, the trace will be reset as the current trace. */ abstract finish(resetCurrent?: boolean): void; /** * The trace ID. */ abstract get traceId(): string; /** * The name of the workflow being traced. */ abstract get name(): string; /** * Export the trace as a dictionary. */ abstract export(): Record | null; /** * Use the trace as a context manager */ abstract __enter__(): Trace; /** * Exit the context manager */ abstract __exit__(excType: any, excVal: any, excTb: any): void; } /** * A no-op trace that will not be recorded. */ export declare class NoOpTrace implements Trace { private _started; private _prevContextToken; __enter__(): Trace; __exit__(excType: any, excVal: any, excTb: any): void; start(markAsCurrent?: boolean): void; finish(resetCurrent?: boolean): void; get traceId(): string; get name(): string; export(): Record | null; } /** * Global no-op trace instance */ export declare const NO_OP_TRACE: NoOpTrace; /** * A trace that will be recorded by the tracing library. */ export declare class TraceImpl implements Trace { private _name; private _traceId; groupId: string | null; metadata: Record | null; private _prevContextToken; private _processor; private _started; constructor(name: string, traceId: string | null, groupId: string | null, metadata: Record | null, processor: TracingProcessor); get traceId(): string; get name(): string; start(markAsCurrent?: boolean): void; finish(resetCurrent?: boolean): void; __enter__(): Trace; __exit__(excType: any, excVal: any, excTb: any): void; export(): Record | null; }