import { Token } from './context-vars'; import { Span } from './spans'; import { Trace } from './traces'; /** * Manages the current trace and span context */ export declare class Scope { /** * Get the current span, if any */ static getCurrentSpan(): Span | null; /** * Set the current span * @param span The span to set as current * @returns A token that can be used to reset the current span */ static setCurrentSpan(span: Span | null): Token | null | undefined>; /** * Reset the current span using a token from a previous setCurrentSpan() call * @param token The token from a previous setCurrentSpan() call */ static resetCurrentSpan(token: Token | null | undefined>): void; /** * Get the current trace, if any */ static getCurrentTrace(): Trace | null; /** * Set the current trace * @param trace The trace to set as current * @returns A token that can be used to reset the current trace */ static setCurrentTrace(trace: Trace | null): Token; /** * Reset the current trace using a token from a previous setCurrentTrace() call * @param token The token from a previous setCurrentTrace() call */ static resetCurrentTrace(token: Token): void; }