import { a as instrumentQueueProducer, c as instrumentAI, d as instrumentKV, f as instrumentR2, i as instrumentAnalyticsEngine, l as instrumentBindings, n as instrumentRateLimiter, o as instrumentHyperdrive, p as instrumentServiceBinding, r as instrumentImages, s as instrumentVectorize, t as instrumentBrowserRendering, u as instrumentD1 } from "./bindings-xEZcXo5r.js"; import { n as instrumentDO, t as instrumentWorkflow } from "./handlers-C_VojUeA.js"; import { a as createWorkersLogger, c as getRequestLogger, i as WorkersLoggerOptions, l as getWorkflowLogger, n as ExecutionLogger, o as getActorLogger, r as ExecutionLoggerOptions, s as getQueueLogger, t as ExecutionLogSnapshot } from "./execution-logger-tgQmJeeU.js"; import { n as isNativeTracingAvailable, t as getNativeTracerFromCtx } from "./native-tracing-DSo5mody.js"; import { ConfigurationOption } from "autotel-edge"; export * from "autotel-edge"; //#region src/wrappers/instrument.d.ts /** * Instrument a Cloudflare Workers handler * * @example * ```typescript * import { instrument } from 'autotel-edge' * * const handler = { * async fetch(request, env, ctx) { * return new Response('Hello World') * } * } * * export default instrument(handler, { * exporter: { * url: env.OTLP_ENDPOINT, * headers: { 'x-api-key': env.API_KEY } * }, * service: { name: 'my-worker' } * }) * ``` */ declare function instrument(handler: ExportedHandler, config: ConfigurationOption): ExportedHandler; //#endregion //#region src/wrappers/wrap-module.d.ts /** * Wrap a Cloudflare Workers module-style handler * Alternative API style inspired by workers-honeycomb-logger * * @param config Configuration (can be static object or function) * @param handler The worker handler to wrap * @returns Instrumented handler */ declare function wrapModule(config: ConfigurationOption, handler: ExportedHandler): ExportedHandler; //#endregion //#region src/wrappers/wrap-do.d.ts /** * Wrap a Durable Object class with instrumentation * Alternative API style inspired by workers-honeycomb-logger * * @param config Configuration (can be static object or function) * @param doClass The Durable Object class to wrap * @returns Instrumented Durable Object class */ declare function wrapDurableObject(config: ConfigurationOption, doClass: new (state: DurableObjectState, env: any) => T): new (state: DurableObjectState, env: any) => T; //#endregion //#region src/wrappers/define-worker-fetch.d.ts type DefineWorkerFetchOptions = WorkersLoggerOptions; type WorkerFetchHandler = (request: Request, env: E, ctx: ExecutionContext, log: ExecutionLogger) => Response | Promise; /** * Wrap a Workers fetch handler so: * - the handler is instrumented (spans, propagation, waitUntil export flush) * - the handler receives a request-scoped logger as its fourth argument */ declare function defineWorkerFetch(config: ConfigurationOption, handler: WorkerFetchHandler, loggerOptions?: DefineWorkerFetchOptions): { fetch: (request: Request, env: E, ctx: ExecutionContext) => Promise; }; //#endregion //#region src/global/fetch.d.ts /** * Global fetch() instrumentation for autotel-edge * * Automatically traces all outgoing fetch() calls with: * - HTTP method, URL, status code * - Request/response headers * - Automatic context propagation * - Error tracking */ /** * Instrument the global fetch function * * This wraps globalThis.fetch to automatically create spans for all outgoing HTTP requests. * * **Note:** This is called automatically when the library is initialized with * `instrumentation.instrumentGlobalFetch: true` (default). */ declare function instrumentGlobalFetch(): void; //#endregion //#region src/global/cache.d.ts /** * Global Cache API instrumentation for Cloudflare Workers * * Automatically traces cache operations: * - cache.match() - Read from cache * - cache.put() - Write to cache * - cache.delete() - Delete from cache */ /** * Instrument the global caches API * * This wraps globalThis.caches to automatically create spans for all cache operations. * * **Note:** This is called automatically when the library is initialized with * `instrumentation.instrumentGlobalCache: true` (default). */ declare function instrumentGlobalCache(): void; //#endregion export { type DefineWorkerFetchOptions, type ExecutionLogSnapshot, type ExecutionLogger, type ExecutionLoggerOptions, type WorkerFetchHandler, type WorkersLoggerOptions, createWorkersLogger, defineWorkerFetch, getActorLogger, getNativeTracerFromCtx, getQueueLogger, getRequestLogger, getWorkflowLogger, instrument, instrumentAI, instrumentAnalyticsEngine, instrumentBindings, instrumentBrowserRendering, instrumentD1, instrumentDO, instrumentGlobalCache, instrumentGlobalFetch, instrumentHyperdrive, instrumentImages, instrumentKV, instrumentQueueProducer, instrumentR2, instrumentRateLimiter, instrumentServiceBinding, instrumentVectorize, instrumentWorkflow, isNativeTracingAvailable, wrapDurableObject, wrapModule }; //# sourceMappingURL=index.d.ts.map