import { t as ResolvedSDKConfig } from "./types-DdKOwAmI.cjs"; import { Attributes } from "@opentelemetry/api"; import { Logger } from "@opentelemetry/api-logs"; import { BatchLogRecordProcessor, LogRecordProcessor, LoggerProvider } from "@opentelemetry/sdk-logs"; import { DrainContext, EnrichContext, WideEvent } from "evlog"; //#region src/logger/otelLogger.d.ts type LoggerOptions = { config: ResolvedSDKConfig; resourceAttributes?: Attributes; }; type OTelLogEmitOptions = { scope?: string; severityNumber?: number; severityText?: string; }; declare class OTelLogger { private readonly url; private readonly logger; private readonly processor; private readonly provider; constructor({ config, resourceAttributes }: LoggerOptions); setGlobalProvider(): void; getProcessor(): BatchLogRecordProcessor | LogRecordProcessor; getProvider(): LoggerProvider; getLoggerByName(name: string): Logger; getExporterUrl(): string; shutdown(): Promise; forceFlush(): Promise; postMessage(level: string, message: string, attributes?: Attributes, opts?: OTelLogEmitOptions): void; } //#endregion //#region src/logger/evlog.d.ts type EvlogDrainOptions = { config?: ResolvedSDKConfig; resourceAttributes?: Attributes; otelLogger?: OTelLogger; /** OTLP instrumentation scope name. */ scope?: string; /** Emit audit-shaped records (severity AUDIT, promoted audit.* attributes). */ auditMode?: boolean; }; type ParsedEvlogEmit = { levelLabel: string; body: string; attributes: Attributes; emitOpts: OTelLogEmitOptions; }; /** * Map an evlog {@link WideEvent} to OTLP log fields for {@link OTelLogger.postMessage}. */ declare function parseEvlogEvent(event: WideEvent, ctx?: Pick, options?: EvlogDrainOptions & { auditMode?: boolean; }): ParsedEvlogEmit; declare class OTelEvlogBridge { private readonly options?; constructor(options?: EvlogDrainOptions); emit(ctx: DrainContext): void; } /** * mxl drain that forwards wide events through the MXL {@link OTelLogger} * pipeline (same batching/export path as {@link initSDK} when initialized). */ declare function createEvlogDrain(options?: EvlogDrainOptions): (ctx: DrainContext) => Promise; /** * Enrich mxl wide events with trace id / span id from the active OpenTelemetry span. */ declare function createOtelTraceEnricher(opts?: { overwrite?: boolean; }): (ctx: EnrichContext) => void; /** * Routes only audit-bearing wide events to OTLP under scope `mxl.audit`. */ declare function createAuditOtelDrain(options?: EvlogDrainOptions): import("evlog").DrainFn; //#endregion export { createEvlogDrain as a, OTelLogEmitOptions as c, createAuditOtelDrain as i, OTelLogger as l, OTelEvlogBridge as n, createOtelTraceEnricher as o, ParsedEvlogEmit as r, parseEvlogEvent as s, EvlogDrainOptions as t }; //# sourceMappingURL=evlog-DP7bcV7t.d.cts.map