UNPKG

logs-interceptor

Version:

High-performance, production-ready log interceptor for Node.js applications with Loki integration. Built with Clean Architecture principles. Supports Node.js, Browser, and Node-RED.

27 lines 804 B
/** * Service Interface: IContextService * Defines the contract for context management (async context, tracing, etc.) */ export interface IContextService { /** * Get current async context */ getContext(): Record<string, unknown>; /** * Get dynamic labels (trace_id, span_id, request_id, etc.) */ getDynamicLabels(): Record<string, string>; /** * Get metadata (memory, CPU, etc.) */ getMetadata(): Record<string, unknown>; /** * Run a function with context */ runWithContext<T>(context: Record<string, unknown>, fn: () => T): T; /** * Run an async function with context */ runWithContextAsync<T>(context: Record<string, unknown>, fn: () => Promise<T>): Promise<T>; } //# sourceMappingURL=IContextService.d.ts.map