import { opentelemetry } from "./lib"; /** * Gets the environment variables for the TraceParent and TraceState of the currently active context * Used to propagate the trace context to other processes using environment variables. * @returns Object containing `OTEL_TRACE_PARENT` and `OTEL_TRACE_STATE` strings */ export declare function getTracePropagationEnvVars(): { OTEL_TRACE_PARENT?: undefined; OTEL_TRACE_STATE?: undefined; } | { OTEL_TRACE_PARENT: string; OTEL_TRACE_STATE: string | undefined; }; /** * Parses the `OTEL_TRACE_PARENT` and `OTEL_TRACE_STATE` environment variables * into a SpanContext object that can be set as the active context to continue tracing * across garden processes. * @returns The SpanContext object derived from the environment variables or `undefined` */ export declare function parsePropagationEnvVars(): opentelemetry.api.SpanContext | null; /** * Executes the wrapped callback function using the `SpanContext` extracted via `parsePropagationEnvVars` as the active context. * Best called before any spans are created so that all new spans contain the correct tracing context * that continues as child spans from the parent process. * @param fn The callback function which executes with the propagated parent context * @returns A promise resolving with the callback's return value */ export declare function withContextFromEnv(fn: () => Promise): Promise;