import { T as WideEvent, r as DrainContext } from "../types-B82IuY7M.mjs"; //#region src/adapters/otlp.d.ts interface OTLPConfig { /** OTLP HTTP endpoint (e.g., http://localhost:4318) */ endpoint: string; /** Override service name (defaults to event.service) */ serviceName?: string; /** Additional resource attributes */ resourceAttributes?: Record; /** Custom headers (e.g., for authentication) */ headers?: Record; /** Request timeout in milliseconds. Default: 5000 */ timeout?: number; } /** OTLP Log Record structure */ interface OTLPLogRecord { timeUnixNano: string; severityNumber: number; severityText: string; body: { stringValue: string; }; attributes: Array<{ key: string; value: { stringValue?: string; intValue?: string; boolValue?: boolean; }; }>; traceId?: string; spanId?: string; } /** * Convert an mxllog WideEvent to an OTLP LogRecord. */ declare function toOTLPLogRecord(event: WideEvent): OTLPLogRecord; /** * Create a drain function for sending logs to an OTLP endpoint. * * Configuration priority (highest to lowest): * 1. Overrides passed to createOTLPDrain() * 2. runtimeConfig.mxllog.otlp (NUXT_EVLOG_OTLP_*) * 3. runtimeConfig.otlp (NUXT_OTLP_*) * 4. Environment variables: OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_SERVICE_NAME * * @example * ```ts * // Zero config - reads from runtimeConfig or env vars * nitroApp.hooks.hook('mxllog:drain', createOTLPDrain()) * * // With overrides * nitroApp.hooks.hook('mxllog:drain', createOTLPDrain({ * endpoint: 'http://localhost:4318', * })) * ``` */ declare function createOTLPDrain(overrides?: Partial): (ctx: DrainContext | DrainContext[]) => Promise; /** * Send a single event to an OTLP endpoint. * * @example * ```ts * await sendToOTLP(event, { * endpoint: 'http://localhost:4318', * }) * ``` */ declare function sendToOTLP(event: WideEvent, config: OTLPConfig): Promise; /** * Send a batch of events to an OTLP endpoint. * * @example * ```ts * await sendBatchToOTLP(events, { * endpoint: 'http://localhost:4318', * }) * ``` */ declare function sendBatchToOTLP(events: WideEvent[], config: OTLPConfig): Promise; //#endregion export { OTLPConfig, OTLPLogRecord, createOTLPDrain, sendBatchToOTLP, sendToOTLP, toOTLPLogRecord }; //# sourceMappingURL=otlp.d.mts.map