import { Context, Span, Baggage } from '@opentelemetry/api'; import type { Request, Response, NextFunction } from 'express'; import type { TelemetryConfig } from './config.js'; export interface EnhancedContext { requestId: string; userId?: string; sessionId?: string; span?: Span; baggage?: Baggage; attributes?: Record; } export declare function getCurrentContext(): EnhancedContext | undefined; export declare function runWithContext(context: EnhancedContext, fn: () => T): T; export declare function extractContextFromHeaders(headers: Record): Context; export declare function injectContextToHeaders(context: Context, headers: Record): void; export declare function contextPropagationMiddleware(config: TelemetryConfig): (req: Request, res: Response, next: NextFunction) => void; export declare function wrapWithContext Promise>(fn: T, spanName?: string): T; export declare function createChildSpan(name: string, attributes?: Record): Span | undefined; export declare function addSpanAttributes(attributes: Record): void; export declare function addSpanEvent(name: string, attributes?: Record): void; export declare function setSpanStatus(code: trace.SpanStatusCode, message?: string): void; export declare function getTraceId(): string | undefined; export declare function getSpanId(): string | undefined; export declare function getCorrelationIds(): { traceId?: string; spanId?: string; requestId?: string; }; //# sourceMappingURL=context.d.ts.map