import { i as EnrichContext } from "./types-B82IuY7M.mjs"; //#region src/enrichers/index.d.ts interface EnricherOptions { /** * When true, overwrite any existing fields in the event. * Defaults to false to preserve user-provided data. */ overwrite?: boolean; } interface UserAgentInfo { raw: string; browser?: { name: string; version?: string; }; os?: { name: string; version?: string; }; device?: { type: 'mobile' | 'tablet' | 'desktop' | 'bot' | 'unknown'; }; } interface GeoInfo { country?: string; region?: string; regionCode?: string; city?: string; latitude?: number; longitude?: number; } interface RequestSizeInfo { requestBytes?: number; responseBytes?: number; } interface TraceContextInfo { traceparent?: string; tracestate?: string; traceId?: string; spanId?: string; } /** * Enrich events with parsed user agent data. * Sets `event.userAgent` with `UserAgentInfo` shape: `{ raw, browser?, os?, device? }`. */ declare function createUserAgentEnricher(options?: EnricherOptions): (ctx: EnrichContext) => void; /** * Enrich events with geo data from platform headers. * Sets `event.geo` with `GeoInfo` shape: `{ country?, region?, regionCode?, city?, latitude?, longitude? }`. * * Supports Vercel (`x-vercel-ip-*`) headers out of the box. * * **Cloudflare note:** Only `cf-ipcountry` is an actual HTTP header added by Cloudflare. * The `cf-region`, `cf-city`, `cf-latitude`, `cf-longitude` headers are NOT standard * Cloudflare headers — they are properties of `request.cf` which is not exposed as HTTP * headers. For full geo data on Cloudflare, write a custom enricher that reads `request.cf` * or use a Workers middleware to copy `cf` properties into custom headers. */ declare function createGeoEnricher(options?: EnricherOptions): (ctx: EnrichContext) => void; /** * Enrich events with request/response payload sizes. * Sets `event.requestSize` with `RequestSizeInfo` shape: `{ requestBytes?, responseBytes? }`. */ declare function createRequestSizeEnricher(options?: EnricherOptions): (ctx: EnrichContext) => void; /** * Enrich events with W3C trace context data. * Sets `event.traceContext` with `TraceContextInfo` shape: `{ traceparent?, tracestate?, traceId?, spanId? }`. * Also sets `event.traceId` and `event.spanId` at the top level. */ declare function createTraceContextEnricher(options?: EnricherOptions): (ctx: EnrichContext) => void; //#endregion export { EnricherOptions, GeoInfo, RequestSizeInfo, TraceContextInfo, UserAgentInfo, createGeoEnricher, createRequestSizeEnricher, createTraceContextEnricher, createUserAgentEnricher }; //# sourceMappingURL=enrichers.d.mts.map