/** * Request context for correlation and tracing */ export type RequestContext = { correlationId: string; requestId: string; userId?: string; timestamp: Date; metadata?: Record; }; /** * Context Manager for request-scoped logging * Uses AsyncLocalStorage to thread context through async operations */ export declare class ContextManager { private static readonly storage; /** * Generate a unique correlation ID */ static generateCorrelationId(): string; /** * Generate a unique request ID */ static generateRequestId(): string; /** * Set context for the current async operation */ static setContext(context: RequestContext): void; /** * Get current context */ static getContext(): RequestContext | undefined; /** * Get correlation ID from current context */ static getCorrelationId(): string | undefined; /** * Run operation with context */ static runWithContext(context: RequestContext, fn: () => Promise): Promise; /** * Create a new context */ static createContext(overrides?: Partial): RequestContext; /** * Clear context (for cleanup) */ static clearContext(): void; } //# sourceMappingURL=context-manager.d.ts.map