UNPKG

@gati-framework/observability

Version:

Observability stack for Gati framework - Prometheus, Grafana, Loki, and Tracing

20 lines (19 loc) 729 B
export interface LokiConfig { host: string; basicAuth?: string; labels?: Record<string, string>; batching?: boolean; interval?: number; } export declare class LokiLogger { private logger; private lokiTransport; constructor(config: LokiConfig); info(message: string, meta?: Record<string, any>): void; warn(message: string, meta?: Record<string, any>): void; error(message: string, error?: Error, meta?: Record<string, any>): void; debug(message: string, meta?: Record<string, any>): void; child(labels: Record<string, string>): LokiLogger; flush(): Promise<void>; } export declare function createLokiMiddleware(logger: LokiLogger): (req: any, res: any, next: any) => void;