import type { AttributeMap } from './mapping.js'; import type { Logger } from '@cat-factory/kernel'; /** An OTLP `AnyValue` in the JSON encoding (string / bool / int / double / string list). */ export type AnyValue = { stringValue: string; } | { boolValue: boolean; } | { intValue: string; } | { doubleValue: number; } | { arrayValue: { values: AnyValue[]; }; }; /** An OTLP `KeyValue` pair (an attribute). */ export interface KeyValue { key: string; value: AnyValue; } /** Encode a neutral attribute map as an OTLP `KeyValue[]`. */ export declare function keyValues(attrs: AttributeMap): KeyValue[]; /** * POST an OTLP/JSON payload to `endpoint`, best-effort. Observability must never break the * caller, so a non-2xx response or a transport error is only logged (never thrown) and the * batch is dropped — the documented worst case. Bounded by {@link SEND_TIMEOUT_MS} so a * hung collector can't dangle the caller's budget. */ export declare function postOtlp(opts: { fetchImpl: typeof fetch; endpoint: string; headers: Record; payload: unknown; logger?: Logger; timeoutMs?: number; }): Promise; //# sourceMappingURL=otlp.d.ts.map