@sentry/cloudflare 10.70.0 → 11.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -7
- package/build/cjs/{sdk.js → dev/baseSdk.js} +27 -17
- package/build/cjs/dev/baseSdk.js.map +1 -0
- package/build/cjs/dev/client.js.map +1 -0
- package/build/cjs/dev/debug-build.js.map +1 -0
- package/build/cjs/dev/defineCloudflareOptions.js.map +1 -0
- package/build/cjs/{durableobject.js → dev/durableobject.js} +21 -20
- package/build/cjs/dev/durableobject.js.map +1 -0
- package/build/cjs/dev/flush.js.map +1 -0
- package/build/cjs/{index.js → dev/index.js} +16 -17
- package/build/cjs/{index.js.map → dev/index.js.map} +1 -1
- package/build/cjs/dev/instrument.js.map +1 -0
- package/build/cjs/dev/instrumentations/agents/index.js.map +1 -0
- package/build/cjs/dev/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -0
- package/build/cjs/dev/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -0
- package/build/cjs/dev/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/agents/types.js +4 -4
- package/build/cjs/dev/instrumentations/agents/types.js.map +1 -0
- package/build/cjs/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -0
- package/build/cjs/dev/instrumentations/instrumentDurableObjectStorage.js.map +1 -0
- package/build/cjs/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -0
- package/build/cjs/dev/instrumentations/instrumentSqlStorage.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/instrumentWorkerEntrypoint.js +3 -3
- package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentD1.js +0 -4
- package/build/cjs/dev/instrumentations/worker/instrumentD1.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentEmail.js +3 -1
- package/build/cjs/dev/instrumentations/worker/instrumentEmail.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentEnv.js +3 -4
- package/build/cjs/dev/instrumentations/worker/instrumentEnv.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentFetch.js +9 -3
- package/build/cjs/dev/instrumentations/worker/instrumentFetch.js.map +1 -0
- package/build/cjs/dev/instrumentations/worker/instrumentFetcher.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentQueue.js +3 -2
- package/build/cjs/dev/instrumentations/worker/instrumentQueue.js.map +1 -0
- package/build/cjs/dev/instrumentations/worker/instrumentQueueProducer.js.map +1 -0
- package/build/cjs/dev/instrumentations/worker/instrumentR2.js.map +1 -0
- package/build/cjs/dev/instrumentations/worker/instrumentRateLimit.js.map +1 -0
- package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentScheduled.js +3 -1
- package/build/cjs/dev/instrumentations/worker/instrumentScheduled.js.map +1 -0
- package/build/cjs/dev/instrumentations/worker/instrumentTail.js.map +1 -0
- package/build/cjs/{integrations → dev/integrations}/fetch.js +1 -1
- package/build/cjs/dev/integrations/fetch.js.map +1 -0
- package/build/cjs/{integrations → dev/integrations}/httpServer.js +5 -4
- package/build/cjs/dev/integrations/httpServer.js.map +1 -0
- package/build/cjs/dev/integrations/spotlight.js.map +1 -0
- package/build/cjs/{nodejs_compat → dev}/integrations/tracing/vercelai.js +6 -6
- package/build/cjs/dev/integrations/tracing/vercelai.js.map +1 -0
- package/build/cjs/dev/opentelemetry/tracer.js.map +1 -0
- package/build/cjs/{options.js → dev/options.js} +8 -0
- package/build/cjs/dev/options.js.map +1 -0
- package/build/cjs/{pages-plugin.js → dev/pages-plugin.js} +8 -3
- package/build/cjs/dev/pages-plugin.js.map +1 -0
- package/build/cjs/{request.js → dev/request.js} +20 -10
- package/build/cjs/dev/request.js.map +1 -0
- package/build/cjs/dev/scope-utils.js.map +1 -0
- package/build/cjs/dev/sdk.js +19 -0
- package/build/cjs/dev/sdk.js.map +1 -0
- package/build/cjs/dev/transport.js.map +1 -0
- package/build/cjs/{utils → dev/utils}/instrumentContext.js +8 -13
- package/build/cjs/dev/utils/instrumentContext.js.map +1 -0
- package/build/cjs/dev/utils/internalSqlQuery.js.map +1 -0
- package/build/cjs/dev/utils/internalStorageKey.js.map +1 -0
- package/build/cjs/dev/utils/invocationScope.js.map +1 -0
- package/build/cjs/dev/utils/isBinding.js.map +1 -0
- package/build/cjs/dev/utils/isCloudflareClass.js.map +1 -0
- package/build/cjs/dev/utils/rpcMeta.js.map +1 -0
- package/build/cjs/dev/utils/streaming.js.map +1 -0
- package/build/cjs/dev/utils/traceLinks.js.map +1 -0
- package/build/cjs/dev/vendor/stacktrace.js.map +1 -0
- package/build/cjs/dev/vite/agentClass.js.map +1 -0
- package/build/cjs/dev/vite/autoInstrument.js.map +1 -0
- package/build/cjs/{vite → dev/vite}/index.js +4 -2
- package/build/cjs/dev/vite/index.js.map +1 -0
- package/build/cjs/dev/vite/instrumentFile.js.map +1 -0
- package/build/cjs/dev/vite/moduleShape.js.map +1 -0
- package/build/cjs/dev/vite/transform.js.map +1 -0
- package/build/cjs/dev/vite/workerEntrypoint.js.map +1 -0
- package/build/cjs/dev/vite/wranglerConfig.js.map +1 -0
- package/build/cjs/{withSentry.js → dev/withSentry.js} +2 -19
- package/build/cjs/dev/withSentry.js.map +1 -0
- package/build/cjs/{workflows.js → dev/workflows.js} +8 -3
- package/build/cjs/dev/workflows.js.map +1 -0
- package/build/cjs/dev/wrapMethodWithSentry.js.map +1 -0
- package/build/cjs/prod/baseSdk.js +73 -0
- package/build/cjs/prod/baseSdk.js.map +1 -0
- package/build/cjs/prod/client.js +122 -0
- package/build/cjs/prod/client.js.map +1 -0
- package/build/cjs/prod/debug-build.js +6 -0
- package/build/cjs/prod/debug-build.js.map +1 -0
- package/build/cjs/prod/defineCloudflareOptions.js +11 -0
- package/build/cjs/prod/defineCloudflareOptions.js.map +1 -0
- package/build/cjs/prod/durableobject.js +234 -0
- package/build/cjs/prod/durableobject.js.map +1 -0
- package/build/cjs/prod/flush.js +87 -0
- package/build/cjs/prod/flush.js.map +1 -0
- package/build/cjs/{nodejs_compat → prod}/index.js +34 -37
- package/build/cjs/{nodejs_compat → prod}/index.js.map +1 -1
- package/build/cjs/prod/instrument.js +52 -0
- package/build/cjs/prod/instrument.js.map +1 -0
- package/build/cjs/prod/instrumentations/agents/index.js +16 -0
- package/build/cjs/prod/instrumentations/agents/index.js.map +1 -0
- package/build/cjs/prod/instrumentations/agents/instrumentAgentCallableRpc.js +52 -0
- package/build/cjs/prod/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -0
- package/build/cjs/prod/instrumentations/agents/instrumentAgentRequestConversation.js +19 -0
- package/build/cjs/prod/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -0
- package/build/cjs/prod/instrumentations/agents/instrumentChatAgentConversation.js +31 -0
- package/build/cjs/prod/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -0
- package/build/cjs/prod/instrumentations/agents/types.js +77 -0
- package/build/cjs/prod/instrumentations/agents/types.js.map +1 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js +41 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectStorage.js +72 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectStorage.js.map +1 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js +40 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -0
- package/build/cjs/prod/instrumentations/instrumentSqlStorage.js +42 -0
- package/build/cjs/prod/instrumentations/instrumentSqlStorage.js.map +1 -0
- package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js +139 -0
- package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentD1.js +161 -0
- package/build/cjs/prod/instrumentations/worker/instrumentD1.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentEmail.js +63 -0
- package/build/cjs/prod/instrumentations/worker/instrumentEmail.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentEnv.js +90 -0
- package/build/cjs/prod/instrumentations/worker/instrumentEnv.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentFetch.js +54 -0
- package/build/cjs/prod/instrumentations/worker/instrumentFetch.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentFetcher.js +24 -0
- package/build/cjs/prod/instrumentations/worker/instrumentFetcher.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentQueue.js +82 -0
- package/build/cjs/prod/instrumentations/worker/instrumentQueue.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentQueueProducer.js +80 -0
- package/build/cjs/prod/instrumentations/worker/instrumentQueueProducer.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentR2.js +124 -0
- package/build/cjs/prod/instrumentations/worker/instrumentR2.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentRateLimit.js +29 -0
- package/build/cjs/prod/instrumentations/worker/instrumentRateLimit.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js +78 -0
- package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js.map +1 -0
- package/build/cjs/prod/instrumentations/worker/instrumentTail.js +60 -0
- package/build/cjs/prod/instrumentations/worker/instrumentTail.js.map +1 -0
- package/build/cjs/prod/integrations/fetch.js +119 -0
- package/build/cjs/prod/integrations/fetch.js.map +1 -0
- package/build/cjs/prod/integrations/httpServer.js +36 -0
- package/build/cjs/prod/integrations/httpServer.js.map +1 -0
- package/build/cjs/prod/integrations/spotlight.js +64 -0
- package/build/cjs/prod/integrations/spotlight.js.map +1 -0
- package/build/cjs/{integrations → prod/integrations}/tracing/vercelai.js +5 -5
- package/build/cjs/prod/integrations/tracing/vercelai.js.map +1 -0
- package/build/cjs/prod/opentelemetry/tracer.js +49 -0
- package/build/cjs/prod/opentelemetry/tracer.js.map +1 -0
- package/build/cjs/prod/options.js +33 -0
- package/build/cjs/prod/options.js.map +1 -0
- package/build/cjs/prod/pages-plugin.js +24 -0
- package/build/cjs/prod/pages-plugin.js.map +1 -0
- package/build/cjs/prod/request.js +132 -0
- package/build/cjs/prod/request.js.map +1 -0
- package/build/cjs/prod/scope-utils.js +22 -0
- package/build/cjs/prod/scope-utils.js.map +1 -0
- package/build/cjs/prod/sdk.js +19 -0
- package/build/cjs/prod/sdk.js.map +1 -0
- package/build/cjs/prod/transport.js +75 -0
- package/build/cjs/prod/transport.js.map +1 -0
- package/build/cjs/prod/utils/instrumentContext.js +63 -0
- package/build/cjs/prod/utils/instrumentContext.js.map +1 -0
- package/build/cjs/prod/utils/internalSqlQuery.js +25 -0
- package/build/cjs/prod/utils/internalSqlQuery.js.map +1 -0
- package/build/cjs/prod/utils/internalStorageKey.js +44 -0
- package/build/cjs/prod/utils/internalStorageKey.js.map +1 -0
- package/build/cjs/prod/utils/invocationScope.js +12 -0
- package/build/cjs/prod/utils/invocationScope.js.map +1 -0
- package/build/cjs/prod/utils/isBinding.js +37 -0
- package/build/cjs/prod/utils/isBinding.js.map +1 -0
- package/build/cjs/prod/utils/isCloudflareClass.js +23 -0
- package/build/cjs/prod/utils/isCloudflareClass.js.map +1 -0
- package/build/cjs/prod/utils/rpcMeta.js +39 -0
- package/build/cjs/prod/utils/rpcMeta.js.map +1 -0
- package/build/cjs/prod/utils/streaming.js +16 -0
- package/build/cjs/prod/utils/streaming.js.map +1 -0
- package/build/cjs/prod/utils/traceLinks.js +54 -0
- package/build/cjs/prod/utils/traceLinks.js.map +1 -0
- package/build/cjs/prod/vendor/stacktrace.js +28 -0
- package/build/cjs/prod/vendor/stacktrace.js.map +1 -0
- package/build/cjs/prod/vite/agentClass.js +114 -0
- package/build/cjs/prod/vite/agentClass.js.map +1 -0
- package/build/cjs/prod/vite/autoInstrument.js +94 -0
- package/build/cjs/prod/vite/autoInstrument.js.map +1 -0
- package/build/cjs/prod/vite/index.js +16 -0
- package/build/cjs/prod/vite/index.js.map +1 -0
- package/build/cjs/prod/vite/instrumentFile.js +31 -0
- package/build/cjs/prod/vite/instrumentFile.js.map +1 -0
- package/build/cjs/prod/vite/moduleShape.js +231 -0
- package/build/cjs/prod/vite/moduleShape.js.map +1 -0
- package/build/cjs/prod/vite/transform.js +149 -0
- package/build/cjs/prod/vite/transform.js.map +1 -0
- package/build/cjs/prod/vite/workerEntrypoint.js +66 -0
- package/build/cjs/prod/vite/workerEntrypoint.js.map +1 -0
- package/build/cjs/prod/vite/wranglerConfig.js +54 -0
- package/build/cjs/prod/vite/wranglerConfig.js.map +1 -0
- package/build/cjs/prod/withSentry.js +29 -0
- package/build/cjs/prod/withSentry.js.map +1 -0
- package/build/cjs/prod/workflows.js +139 -0
- package/build/cjs/prod/workflows.js.map +1 -0
- package/build/cjs/prod/wrapMethodWithSentry.js +134 -0
- package/build/cjs/prod/wrapMethodWithSentry.js.map +1 -0
- package/build/esm/{sdk.js → dev/baseSdk.js} +26 -17
- package/build/esm/dev/baseSdk.js.map +1 -0
- package/build/esm/dev/client.js.map +1 -0
- package/build/esm/dev/debug-build.js.map +1 -0
- package/build/esm/dev/defineCloudflareOptions.js.map +1 -0
- package/build/esm/{durableobject.js → dev/durableobject.js} +21 -20
- package/build/esm/dev/durableobject.js.map +1 -0
- package/build/esm/dev/flush.js.map +1 -0
- package/build/esm/dev/index.js +15 -0
- package/build/esm/{index.js.map → dev/index.js.map} +1 -1
- package/build/esm/dev/instrument.js.map +1 -0
- package/build/esm/dev/instrumentations/agents/index.js.map +1 -0
- package/build/esm/dev/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -0
- package/build/esm/dev/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -0
- package/build/esm/dev/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/agents/types.js +2 -2
- package/build/esm/dev/instrumentations/agents/types.js.map +1 -0
- package/build/esm/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -0
- package/build/esm/dev/instrumentations/instrumentDurableObjectStorage.js.map +1 -0
- package/build/esm/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -0
- package/build/esm/dev/instrumentations/instrumentSqlStorage.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/instrumentWorkerEntrypoint.js +2 -2
- package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentD1.js +1 -4
- package/build/esm/dev/instrumentations/worker/instrumentD1.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentEmail.js +3 -1
- package/build/esm/dev/instrumentations/worker/instrumentEmail.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentEnv.js +3 -4
- package/build/esm/dev/instrumentations/worker/instrumentEnv.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentFetch.js +10 -4
- package/build/esm/dev/instrumentations/worker/instrumentFetch.js.map +1 -0
- package/build/esm/dev/instrumentations/worker/instrumentFetcher.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentQueue.js +4 -3
- package/build/esm/dev/instrumentations/worker/instrumentQueue.js.map +1 -0
- package/build/esm/dev/instrumentations/worker/instrumentQueueProducer.js.map +1 -0
- package/build/esm/dev/instrumentations/worker/instrumentR2.js.map +1 -0
- package/build/esm/dev/instrumentations/worker/instrumentRateLimit.js.map +1 -0
- package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentScheduled.js +3 -1
- package/build/esm/dev/instrumentations/worker/instrumentScheduled.js.map +1 -0
- package/build/esm/dev/instrumentations/worker/instrumentTail.js.map +1 -0
- package/build/esm/{integrations → dev/integrations}/fetch.js +1 -1
- package/build/esm/dev/integrations/fetch.js.map +1 -0
- package/build/esm/{integrations → dev/integrations}/httpServer.js +5 -4
- package/build/esm/dev/integrations/httpServer.js.map +1 -0
- package/build/esm/dev/integrations/spotlight.js.map +1 -0
- package/build/esm/{integrations → dev/integrations}/tracing/vercelai.js +5 -5
- package/build/esm/dev/integrations/tracing/vercelai.js.map +1 -0
- package/build/esm/dev/opentelemetry/tracer.js.map +1 -0
- package/build/esm/{options.js → dev/options.js} +8 -0
- package/build/esm/dev/options.js.map +1 -0
- package/build/esm/dev/package.json +1 -0
- package/build/esm/{pages-plugin.js → dev/pages-plugin.js} +8 -3
- package/build/esm/dev/pages-plugin.js.map +1 -0
- package/build/esm/{request.js → dev/request.js} +21 -12
- package/build/esm/dev/request.js.map +1 -0
- package/build/esm/dev/scope-utils.js.map +1 -0
- package/build/esm/dev/sdk.js +16 -0
- package/build/esm/dev/sdk.js.map +1 -0
- package/build/esm/dev/transport.js.map +1 -0
- package/build/esm/{utils → dev/utils}/instrumentContext.js +8 -13
- package/build/esm/dev/utils/instrumentContext.js.map +1 -0
- package/build/esm/dev/utils/internalSqlQuery.js.map +1 -0
- package/build/esm/dev/utils/internalStorageKey.js.map +1 -0
- package/build/esm/dev/utils/invocationScope.js.map +1 -0
- package/build/esm/dev/utils/isBinding.js.map +1 -0
- package/build/esm/dev/utils/isCloudflareClass.js.map +1 -0
- package/build/esm/dev/utils/rpcMeta.js.map +1 -0
- package/build/esm/dev/utils/streaming.js.map +1 -0
- package/build/esm/{utils → dev/utils}/traceLinks.js +1 -1
- package/build/esm/dev/utils/traceLinks.js.map +1 -0
- package/build/esm/dev/vendor/stacktrace.js.map +1 -0
- package/build/esm/dev/vite/agentClass.js.map +1 -0
- package/build/esm/dev/vite/autoInstrument.js.map +1 -0
- package/build/esm/{vite → dev/vite}/index.js +4 -2
- package/build/esm/dev/vite/index.js.map +1 -0
- package/build/esm/dev/vite/instrumentFile.js.map +1 -0
- package/build/esm/dev/vite/moduleShape.js.map +1 -0
- package/build/esm/dev/vite/transform.js.map +1 -0
- package/build/esm/dev/vite/workerEntrypoint.js.map +1 -0
- package/build/esm/dev/vite/wranglerConfig.js.map +1 -0
- package/build/esm/{withSentry.js → dev/withSentry.js} +1 -18
- package/build/esm/dev/withSentry.js.map +1 -0
- package/build/esm/{workflows.js → dev/workflows.js} +7 -2
- package/build/esm/dev/workflows.js.map +1 -0
- package/build/esm/dev/wrapMethodWithSentry.js.map +1 -0
- package/build/esm/prod/baseSdk.js +69 -0
- package/build/esm/prod/baseSdk.js.map +1 -0
- package/build/esm/prod/client.js +120 -0
- package/build/esm/prod/client.js.map +1 -0
- package/build/esm/prod/debug-build.js +4 -0
- package/build/esm/prod/debug-build.js.map +1 -0
- package/build/esm/prod/defineCloudflareOptions.js +9 -0
- package/build/esm/prod/defineCloudflareOptions.js.map +1 -0
- package/build/esm/prod/durableobject.js +229 -0
- package/build/esm/prod/durableobject.js.map +1 -0
- package/build/esm/prod/flush.js +83 -0
- package/build/esm/prod/flush.js.map +1 -0
- package/build/esm/prod/index.js +15 -0
- package/build/esm/{nodejs_compat → prod}/index.js.map +1 -1
- package/build/esm/prod/instrument.js +48 -0
- package/build/esm/prod/instrument.js.map +1 -0
- package/build/esm/prod/instrumentations/agents/index.js +14 -0
- package/build/esm/prod/instrumentations/agents/index.js.map +1 -0
- package/build/esm/prod/instrumentations/agents/instrumentAgentCallableRpc.js +50 -0
- package/build/esm/prod/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -0
- package/build/esm/prod/instrumentations/agents/instrumentAgentRequestConversation.js +17 -0
- package/build/esm/prod/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -0
- package/build/esm/prod/instrumentations/agents/instrumentChatAgentConversation.js +29 -0
- package/build/esm/prod/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -0
- package/build/esm/prod/instrumentations/agents/types.js +69 -0
- package/build/esm/prod/instrumentations/agents/types.js.map +1 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js +38 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectStorage.js +70 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectStorage.js.map +1 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js +38 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -0
- package/build/esm/prod/instrumentations/instrumentSqlStorage.js +40 -0
- package/build/esm/prod/instrumentations/instrumentSqlStorage.js.map +1 -0
- package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js +137 -0
- package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentD1.js +159 -0
- package/build/esm/prod/instrumentations/worker/instrumentD1.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentEmail.js +61 -0
- package/build/esm/prod/instrumentations/worker/instrumentEmail.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentEnv.js +88 -0
- package/build/esm/prod/instrumentations/worker/instrumentEnv.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentFetch.js +51 -0
- package/build/esm/prod/instrumentations/worker/instrumentFetch.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentFetcher.js +22 -0
- package/build/esm/prod/instrumentations/worker/instrumentFetcher.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentQueue.js +79 -0
- package/build/esm/prod/instrumentations/worker/instrumentQueue.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentQueueProducer.js +78 -0
- package/build/esm/prod/instrumentations/worker/instrumentQueueProducer.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentR2.js +122 -0
- package/build/esm/prod/instrumentations/worker/instrumentR2.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentRateLimit.js +27 -0
- package/build/esm/prod/instrumentations/worker/instrumentRateLimit.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentScheduled.js +75 -0
- package/build/esm/prod/instrumentations/worker/instrumentScheduled.js.map +1 -0
- package/build/esm/prod/instrumentations/worker/instrumentTail.js +57 -0
- package/build/esm/prod/instrumentations/worker/instrumentTail.js.map +1 -0
- package/build/esm/prod/integrations/fetch.js +117 -0
- package/build/esm/prod/integrations/fetch.js.map +1 -0
- package/build/esm/prod/integrations/httpServer.js +33 -0
- package/build/esm/prod/integrations/httpServer.js.map +1 -0
- package/build/esm/prod/integrations/spotlight.js +61 -0
- package/build/esm/prod/integrations/spotlight.js.map +1 -0
- package/build/esm/prod/integrations/tracing/vercelai.js +16 -0
- package/build/esm/prod/integrations/tracing/vercelai.js.map +1 -0
- package/build/esm/prod/opentelemetry/tracer.js +47 -0
- package/build/esm/prod/opentelemetry/tracer.js.map +1 -0
- package/build/esm/prod/options.js +31 -0
- package/build/esm/prod/options.js.map +1 -0
- package/build/esm/prod/package.json +1 -0
- package/build/esm/prod/pages-plugin.js +22 -0
- package/build/esm/prod/pages-plugin.js.map +1 -0
- package/build/esm/prod/request.js +129 -0
- package/build/esm/prod/request.js.map +1 -0
- package/build/esm/prod/scope-utils.js +18 -0
- package/build/esm/prod/scope-utils.js.map +1 -0
- package/build/esm/prod/sdk.js +16 -0
- package/build/esm/prod/sdk.js.map +1 -0
- package/build/esm/prod/transport.js +72 -0
- package/build/esm/prod/transport.js.map +1 -0
- package/build/esm/prod/utils/instrumentContext.js +61 -0
- package/build/esm/prod/utils/instrumentContext.js.map +1 -0
- package/build/esm/prod/utils/internalSqlQuery.js +23 -0
- package/build/esm/prod/utils/internalSqlQuery.js.map +1 -0
- package/build/esm/prod/utils/internalStorageKey.js +41 -0
- package/build/esm/prod/utils/internalStorageKey.js.map +1 -0
- package/build/esm/prod/utils/invocationScope.js +10 -0
- package/build/esm/prod/utils/invocationScope.js.map +1 -0
- package/build/esm/prod/utils/isBinding.js +29 -0
- package/build/esm/prod/utils/isBinding.js.map +1 -0
- package/build/esm/prod/utils/isCloudflareClass.js +21 -0
- package/build/esm/prod/utils/isCloudflareClass.js.map +1 -0
- package/build/esm/prod/utils/rpcMeta.js +35 -0
- package/build/esm/prod/utils/rpcMeta.js.map +1 -0
- package/build/esm/prod/utils/streaming.js +14 -0
- package/build/esm/prod/utils/streaming.js.map +1 -0
- package/build/esm/prod/utils/traceLinks.js +49 -0
- package/build/esm/prod/utils/traceLinks.js.map +1 -0
- package/build/esm/prod/vendor/stacktrace.js +25 -0
- package/build/esm/prod/vendor/stacktrace.js.map +1 -0
- package/build/esm/prod/vite/agentClass.js +111 -0
- package/build/esm/prod/vite/agentClass.js.map +1 -0
- package/build/esm/prod/vite/autoInstrument.js +92 -0
- package/build/esm/prod/vite/autoInstrument.js.map +1 -0
- package/build/esm/prod/vite/index.js +14 -0
- package/build/esm/prod/vite/index.js.map +1 -0
- package/build/esm/prod/vite/instrumentFile.js +27 -0
- package/build/esm/prod/vite/instrumentFile.js.map +1 -0
- package/build/esm/prod/vite/moduleShape.js +227 -0
- package/build/esm/prod/vite/moduleShape.js.map +1 -0
- package/build/esm/prod/vite/transform.js +147 -0
- package/build/esm/prod/vite/transform.js.map +1 -0
- package/build/esm/prod/vite/workerEntrypoint.js +64 -0
- package/build/esm/prod/vite/workerEntrypoint.js.map +1 -0
- package/build/esm/prod/vite/wranglerConfig.js +52 -0
- package/build/esm/prod/vite/wranglerConfig.js.map +1 -0
- package/build/esm/prod/withSentry.js +27 -0
- package/build/esm/prod/withSentry.js.map +1 -0
- package/build/esm/prod/workflows.js +136 -0
- package/build/esm/prod/workflows.js.map +1 -0
- package/build/esm/prod/wrapMethodWithSentry.js +132 -0
- package/build/esm/prod/wrapMethodWithSentry.js.map +1 -0
- package/build/types/baseSdk.d.ts +28 -0
- package/build/types/baseSdk.d.ts.map +1 -0
- package/build/types/client.d.ts +12 -39
- package/build/types/client.d.ts.map +1 -1
- package/build/types/defineCloudflareOptions.d.ts +2 -2
- package/build/types/defineCloudflareOptions.d.ts.map +1 -1
- package/build/types/durableobject.d.ts +5 -4
- package/build/types/durableobject.d.ts.map +1 -1
- package/build/types/index.d.ts +3 -5
- package/build/types/index.d.ts.map +1 -1
- package/build/types/instrumentations/agents/types.d.ts.map +1 -1
- package/build/types/instrumentations/instrumentDurableObjectStorage.d.ts.map +1 -1
- package/build/types/instrumentations/instrumentSqlStorage.d.ts.map +1 -1
- package/build/types/instrumentations/instrumentWorkerEntrypoint.d.ts +2 -1
- package/build/types/instrumentations/instrumentWorkerEntrypoint.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentD1.d.ts +0 -16
- package/build/types/instrumentations/worker/instrumentD1.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentEmail.d.ts +2 -2
- package/build/types/instrumentations/worker/instrumentEmail.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentEnv.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentFetch.d.ts +2 -2
- package/build/types/instrumentations/worker/instrumentFetch.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentQueue.d.ts +2 -2
- package/build/types/instrumentations/worker/instrumentQueue.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentScheduled.d.ts +2 -2
- package/build/types/instrumentations/worker/instrumentScheduled.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentTail.d.ts +2 -2
- package/build/types/instrumentations/worker/instrumentTail.d.ts.map +1 -1
- package/build/types/integrations/httpServer.d.ts.map +1 -1
- package/build/types/integrations/spotlight.d.ts +1 -1
- package/build/types/integrations/tracing/vercelai.d.ts +2 -10
- package/build/types/integrations/tracing/vercelai.d.ts.map +1 -1
- package/build/types/options.d.ts.map +1 -1
- package/build/types/pages-plugin.d.ts +1 -1
- package/build/types/pages-plugin.d.ts.map +1 -1
- package/build/types/request.d.ts +17 -2
- package/build/types/request.d.ts.map +1 -1
- package/build/types/sdk.d.ts +8 -3
- package/build/types/sdk.d.ts.map +1 -1
- package/build/types/transport.d.ts.map +1 -1
- package/build/types/types.d.ts +85 -0
- package/build/types/types.d.ts.map +1 -0
- package/build/types/utils/instrumentContext.d.ts.map +1 -1
- package/build/types/utils/isCloudflareClass.d.ts +1 -1
- package/build/types/utils/isCloudflareClass.d.ts.map +1 -1
- package/build/types/vite/autoInstrument.d.ts.map +1 -1
- package/build/types/vite/index.d.ts +37 -61
- package/build/types/vite/index.d.ts.map +1 -1
- package/build/types/withSentry.d.ts +2 -2
- package/build/types/withSentry.d.ts.map +1 -1
- package/build/types/workflows.d.ts +5 -4
- package/build/types/workflows.d.ts.map +1 -1
- package/package.json +28 -51
- package/build/cjs/async.js +0 -63
- package/build/cjs/async.js.map +0 -1
- package/build/cjs/client.js.map +0 -1
- package/build/cjs/debug-build.js.map +0 -1
- package/build/cjs/defineCloudflareOptions.js.map +0 -1
- package/build/cjs/durableobject.js.map +0 -1
- package/build/cjs/flush.js.map +0 -1
- package/build/cjs/instrument.js.map +0 -1
- package/build/cjs/instrumentations/agents/index.js.map +0 -1
- package/build/cjs/instrumentations/agents/instrumentAgentCallableRpc.js.map +0 -1
- package/build/cjs/instrumentations/agents/instrumentAgentRequestConversation.js.map +0 -1
- package/build/cjs/instrumentations/agents/instrumentChatAgentConversation.js.map +0 -1
- package/build/cjs/instrumentations/agents/types.js.map +0 -1
- package/build/cjs/instrumentations/instrumentDurableObjectNamespace.js.map +0 -1
- package/build/cjs/instrumentations/instrumentDurableObjectStorage.js.map +0 -1
- package/build/cjs/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +0 -1
- package/build/cjs/instrumentations/instrumentSqlStorage.js.map +0 -1
- package/build/cjs/instrumentations/instrumentWorkerEntrypoint.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentD1.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentEmail.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentEnv.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentFetch.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentFetcher.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentQueue.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentQueueProducer.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentR2.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentRateLimit.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentScheduled.js.map +0 -1
- package/build/cjs/instrumentations/worker/instrumentTail.js.map +0 -1
- package/build/cjs/integrations/fetch.js.map +0 -1
- package/build/cjs/integrations/hono.js +0 -52
- package/build/cjs/integrations/hono.js.map +0 -1
- package/build/cjs/integrations/httpServer.js.map +0 -1
- package/build/cjs/integrations/spotlight.js.map +0 -1
- package/build/cjs/integrations/tracing/vercelai.js.map +0 -1
- package/build/cjs/nodejs_compat/integrations/tracing/vercelai.js.map +0 -1
- package/build/cjs/opentelemetry/tracer.js.map +0 -1
- package/build/cjs/options.js.map +0 -1
- package/build/cjs/pages-plugin.js.map +0 -1
- package/build/cjs/request.js.map +0 -1
- package/build/cjs/scope-utils.js.map +0 -1
- package/build/cjs/sdk.js.map +0 -1
- package/build/cjs/transport.js.map +0 -1
- package/build/cjs/utils/instrumentContext.js.map +0 -1
- package/build/cjs/utils/internalSqlQuery.js.map +0 -1
- package/build/cjs/utils/internalStorageKey.js.map +0 -1
- package/build/cjs/utils/invocationScope.js.map +0 -1
- package/build/cjs/utils/isBinding.js.map +0 -1
- package/build/cjs/utils/isCloudflareClass.js.map +0 -1
- package/build/cjs/utils/rpcMeta.js.map +0 -1
- package/build/cjs/utils/rpcOptions.js +0 -26
- package/build/cjs/utils/rpcOptions.js.map +0 -1
- package/build/cjs/utils/streaming.js.map +0 -1
- package/build/cjs/utils/traceLinks.js.map +0 -1
- package/build/cjs/vendor/stacktrace.js.map +0 -1
- package/build/cjs/vite/agentClass.js.map +0 -1
- package/build/cjs/vite/autoInstrument.js.map +0 -1
- package/build/cjs/vite/index.js.map +0 -1
- package/build/cjs/vite/instrumentFile.js.map +0 -1
- package/build/cjs/vite/moduleShape.js.map +0 -1
- package/build/cjs/vite/transform.js.map +0 -1
- package/build/cjs/vite/workerEntrypoint.js.map +0 -1
- package/build/cjs/vite/wranglerConfig.js.map +0 -1
- package/build/cjs/withSentry.js.map +0 -1
- package/build/cjs/workflows.js.map +0 -1
- package/build/cjs/wrapMethodWithSentry.js.map +0 -1
- package/build/esm/async.js +0 -61
- package/build/esm/async.js.map +0 -1
- package/build/esm/client.js.map +0 -1
- package/build/esm/debug-build.js.map +0 -1
- package/build/esm/defineCloudflareOptions.js.map +0 -1
- package/build/esm/durableobject.js.map +0 -1
- package/build/esm/flush.js.map +0 -1
- package/build/esm/index.js +0 -17
- package/build/esm/instrument.js.map +0 -1
- package/build/esm/instrumentations/agents/index.js.map +0 -1
- package/build/esm/instrumentations/agents/instrumentAgentCallableRpc.js.map +0 -1
- package/build/esm/instrumentations/agents/instrumentAgentRequestConversation.js.map +0 -1
- package/build/esm/instrumentations/agents/instrumentChatAgentConversation.js.map +0 -1
- package/build/esm/instrumentations/agents/types.js.map +0 -1
- package/build/esm/instrumentations/instrumentDurableObjectNamespace.js.map +0 -1
- package/build/esm/instrumentations/instrumentDurableObjectStorage.js.map +0 -1
- package/build/esm/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +0 -1
- package/build/esm/instrumentations/instrumentSqlStorage.js.map +0 -1
- package/build/esm/instrumentations/instrumentWorkerEntrypoint.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentD1.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentEmail.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentEnv.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentFetch.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentFetcher.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentQueue.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentQueueProducer.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentR2.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentRateLimit.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentScheduled.js.map +0 -1
- package/build/esm/instrumentations/worker/instrumentTail.js.map +0 -1
- package/build/esm/integrations/fetch.js.map +0 -1
- package/build/esm/integrations/hono.js +0 -49
- package/build/esm/integrations/hono.js.map +0 -1
- package/build/esm/integrations/httpServer.js.map +0 -1
- package/build/esm/integrations/spotlight.js.map +0 -1
- package/build/esm/integrations/tracing/vercelai.js.map +0 -1
- package/build/esm/nodejs_compat/index.js +0 -18
- package/build/esm/nodejs_compat/integrations/tracing/vercelai.js +0 -16
- package/build/esm/nodejs_compat/integrations/tracing/vercelai.js.map +0 -1
- package/build/esm/opentelemetry/tracer.js.map +0 -1
- package/build/esm/options.js.map +0 -1
- package/build/esm/package.json +0 -1
- package/build/esm/pages-plugin.js.map +0 -1
- package/build/esm/request.js.map +0 -1
- package/build/esm/scope-utils.js.map +0 -1
- package/build/esm/sdk.js.map +0 -1
- package/build/esm/transport.js.map +0 -1
- package/build/esm/utils/instrumentContext.js.map +0 -1
- package/build/esm/utils/internalSqlQuery.js.map +0 -1
- package/build/esm/utils/internalStorageKey.js.map +0 -1
- package/build/esm/utils/invocationScope.js.map +0 -1
- package/build/esm/utils/isBinding.js.map +0 -1
- package/build/esm/utils/isCloudflareClass.js.map +0 -1
- package/build/esm/utils/rpcMeta.js.map +0 -1
- package/build/esm/utils/rpcOptions.js +0 -24
- package/build/esm/utils/rpcOptions.js.map +0 -1
- package/build/esm/utils/streaming.js.map +0 -1
- package/build/esm/utils/traceLinks.js.map +0 -1
- package/build/esm/vendor/stacktrace.js.map +0 -1
- package/build/esm/vite/agentClass.js.map +0 -1
- package/build/esm/vite/autoInstrument.js.map +0 -1
- package/build/esm/vite/index.js.map +0 -1
- package/build/esm/vite/instrumentFile.js.map +0 -1
- package/build/esm/vite/moduleShape.js.map +0 -1
- package/build/esm/vite/transform.js.map +0 -1
- package/build/esm/vite/workerEntrypoint.js.map +0 -1
- package/build/esm/vite/wranglerConfig.js.map +0 -1
- package/build/esm/withSentry.js.map +0 -1
- package/build/esm/workflows.js.map +0 -1
- package/build/esm/wrapMethodWithSentry.js.map +0 -1
- package/build/types/async.d.ts +0 -11
- package/build/types/async.d.ts.map +0 -1
- package/build/types/integrations/hono.d.ts +0 -42
- package/build/types/integrations/hono.d.ts.map +0 -1
- package/build/types/nodejs_compat/index.d.ts +0 -4
- package/build/types/nodejs_compat/index.d.ts.map +0 -1
- package/build/types/nodejs_compat/integrations/tracing/vercelai.d.ts +0 -37
- package/build/types/nodejs_compat/integrations/tracing/vercelai.d.ts.map +0 -1
- package/build/types/utils/rpcOptions.d.ts +0 -13
- package/build/types/utils/rpcOptions.d.ts.map +0 -1
- package/build/types-ts3.8/async.d.ts +0 -11
- package/build/types-ts3.8/client.d.ts +0 -203
- package/build/types-ts3.8/debug-build.d.ts +0 -7
- package/build/types-ts3.8/defineCloudflareOptions.d.ts +0 -38
- package/build/types-ts3.8/durableobject.d.ts +0 -127
- package/build/types-ts3.8/executionContext.d.ts +0 -13
- package/build/types-ts3.8/flush.d.ts +0 -47
- package/build/types-ts3.8/index.d.ts +0 -19
- package/build/types-ts3.8/instrument.d.ts +0 -20
- package/build/types-ts3.8/instrumentations/agents/index.d.ts +0 -25
- package/build/types-ts3.8/instrumentations/agents/instrumentAgentCallableRpc.d.ts +0 -14
- package/build/types-ts3.8/instrumentations/agents/instrumentAgentRequestConversation.d.ts +0 -16
- package/build/types-ts3.8/instrumentations/agents/instrumentChatAgentConversation.d.ts +0 -23
- package/build/types-ts3.8/instrumentations/agents/types.d.ts +0 -94
- package/build/types-ts3.8/instrumentations/instrumentDurableObjectNamespace.d.ts +0 -13
- package/build/types-ts3.8/instrumentations/instrumentDurableObjectStorage.d.ts +0 -19
- package/build/types-ts3.8/instrumentations/instrumentDurableObjectSyncKvStorage.d.ts +0 -3
- package/build/types-ts3.8/instrumentations/instrumentSqlStorage.d.ts +0 -9
- package/build/types-ts3.8/instrumentations/instrumentWorkerEntrypoint.d.ts +0 -42
- package/build/types-ts3.8/instrumentations/worker/instrumentD1.d.ts +0 -19
- package/build/types-ts3.8/instrumentations/worker/instrumentEmail.d.ts +0 -8
- package/build/types-ts3.8/instrumentations/worker/instrumentEnv.d.ts +0 -18
- package/build/types-ts3.8/instrumentations/worker/instrumentFetch.d.ts +0 -12
- package/build/types-ts3.8/instrumentations/worker/instrumentFetcher.d.ts +0 -10
- package/build/types-ts3.8/instrumentations/worker/instrumentQueue.d.ts +0 -12
- package/build/types-ts3.8/instrumentations/worker/instrumentQueueProducer.d.ts +0 -10
- package/build/types-ts3.8/instrumentations/worker/instrumentR2.d.ts +0 -9
- package/build/types-ts3.8/instrumentations/worker/instrumentRateLimit.d.ts +0 -6
- package/build/types-ts3.8/instrumentations/worker/instrumentScheduled.d.ts +0 -12
- package/build/types-ts3.8/instrumentations/worker/instrumentTail.d.ts +0 -12
- package/build/types-ts3.8/integrations/fetch.d.ts +0 -19
- package/build/types-ts3.8/integrations/hono.d.ts +0 -42
- package/build/types-ts3.8/integrations/httpServer.d.ts +0 -63
- package/build/types-ts3.8/integrations/spotlight.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/vercelai.d.ts +0 -47
- package/build/types-ts3.8/nodejs_compat/index.d.ts +0 -4
- package/build/types-ts3.8/nodejs_compat/integrations/tracing/vercelai.d.ts +0 -37
- package/build/types-ts3.8/opentelemetry/tracer.d.ts +0 -6
- package/build/types-ts3.8/options.d.ts +0 -17
- package/build/types-ts3.8/pages-plugin.d.ts +0 -34
- package/build/types-ts3.8/request.d.ts +0 -25
- package/build/types-ts3.8/scope-utils.d.ts +0 -15
- package/build/types-ts3.8/sdk.d.ts +0 -10
- package/build/types-ts3.8/transport.d.ts +0 -34
- package/build/types-ts3.8/utils/instrumentContext.d.ts +0 -16
- package/build/types-ts3.8/utils/internalSqlQuery.d.ts +0 -20
- package/build/types-ts3.8/utils/internalStorageKey.d.ts +0 -22
- package/build/types-ts3.8/utils/invocationScope.d.ts +0 -24
- package/build/types-ts3.8/utils/isBinding.d.ts +0 -77
- package/build/types-ts3.8/utils/isCloudflareClass.d.ts +0 -30
- package/build/types-ts3.8/utils/rpcMeta.d.ts +0 -23
- package/build/types-ts3.8/utils/rpcOptions.d.ts +0 -13
- package/build/types-ts3.8/utils/streaming.d.ts +0 -17
- package/build/types-ts3.8/utils/traceLinks.d.ts +0 -28
- package/build/types-ts3.8/vendor/stacktrace.d.ts +0 -11
- package/build/types-ts3.8/vite/agentClass.d.ts +0 -41
- package/build/types-ts3.8/vite/autoInstrument.d.ts +0 -22
- package/build/types-ts3.8/vite/index.d.ts +0 -98
- package/build/types-ts3.8/vite/instrumentFile.d.ts +0 -22
- package/build/types-ts3.8/vite/moduleShape.d.ts +0 -52
- package/build/types-ts3.8/vite/transform.d.ts +0 -65
- package/build/types-ts3.8/vite/workerEntrypoint.d.ts +0 -12
- package/build/types-ts3.8/vite/wranglerConfig.d.ts +0 -43
- package/build/types-ts3.8/withSentry.d.ts +0 -16
- package/build/types-ts3.8/workflows.d.ts +0 -25
- package/build/types-ts3.8/wrapMethodWithSentry.d.ts +0 -43
- /package/build/cjs/{client.js → dev/client.js} +0 -0
- /package/build/cjs/{debug-build.js → dev/debug-build.js} +0 -0
- /package/build/cjs/{defineCloudflareOptions.js → dev/defineCloudflareOptions.js} +0 -0
- /package/build/cjs/{flush.js → dev/flush.js} +0 -0
- /package/build/cjs/{instrument.js → dev/instrument.js} +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/agents/index.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/agents/instrumentAgentCallableRpc.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/agents/instrumentAgentRequestConversation.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/agents/instrumentChatAgentConversation.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/instrumentDurableObjectNamespace.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/instrumentDurableObjectStorage.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/instrumentDurableObjectSyncKvStorage.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/instrumentSqlStorage.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentFetcher.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentQueueProducer.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentR2.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentRateLimit.js +0 -0
- /package/build/cjs/{instrumentations → dev/instrumentations}/worker/instrumentTail.js +0 -0
- /package/build/cjs/{integrations → dev/integrations}/spotlight.js +0 -0
- /package/build/cjs/{opentelemetry → dev/opentelemetry}/tracer.js +0 -0
- /package/build/cjs/{scope-utils.js → dev/scope-utils.js} +0 -0
- /package/build/cjs/{transport.js → dev/transport.js} +0 -0
- /package/build/cjs/{utils → dev/utils}/internalSqlQuery.js +0 -0
- /package/build/cjs/{utils → dev/utils}/internalStorageKey.js +0 -0
- /package/build/cjs/{utils → dev/utils}/invocationScope.js +0 -0
- /package/build/cjs/{utils → dev/utils}/isBinding.js +0 -0
- /package/build/cjs/{utils → dev/utils}/isCloudflareClass.js +0 -0
- /package/build/cjs/{utils → dev/utils}/rpcMeta.js +0 -0
- /package/build/cjs/{utils → dev/utils}/streaming.js +0 -0
- /package/build/cjs/{utils → dev/utils}/traceLinks.js +0 -0
- /package/build/cjs/{vendor → dev/vendor}/stacktrace.js +0 -0
- /package/build/cjs/{vite → dev/vite}/agentClass.js +0 -0
- /package/build/cjs/{vite → dev/vite}/autoInstrument.js +0 -0
- /package/build/cjs/{vite → dev/vite}/instrumentFile.js +0 -0
- /package/build/cjs/{vite → dev/vite}/moduleShape.js +0 -0
- /package/build/cjs/{vite → dev/vite}/transform.js +0 -0
- /package/build/cjs/{vite → dev/vite}/workerEntrypoint.js +0 -0
- /package/build/cjs/{vite → dev/vite}/wranglerConfig.js +0 -0
- /package/build/cjs/{wrapMethodWithSentry.js → dev/wrapMethodWithSentry.js} +0 -0
- /package/build/esm/{client.js → dev/client.js} +0 -0
- /package/build/esm/{debug-build.js → dev/debug-build.js} +0 -0
- /package/build/esm/{defineCloudflareOptions.js → dev/defineCloudflareOptions.js} +0 -0
- /package/build/esm/{flush.js → dev/flush.js} +0 -0
- /package/build/esm/{instrument.js → dev/instrument.js} +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/agents/index.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/agents/instrumentAgentCallableRpc.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/agents/instrumentAgentRequestConversation.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/agents/instrumentChatAgentConversation.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/instrumentDurableObjectNamespace.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/instrumentDurableObjectStorage.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/instrumentDurableObjectSyncKvStorage.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/instrumentSqlStorage.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentFetcher.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentQueueProducer.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentR2.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentRateLimit.js +0 -0
- /package/build/esm/{instrumentations → dev/instrumentations}/worker/instrumentTail.js +0 -0
- /package/build/esm/{integrations → dev/integrations}/spotlight.js +0 -0
- /package/build/esm/{opentelemetry → dev/opentelemetry}/tracer.js +0 -0
- /package/build/esm/{scope-utils.js → dev/scope-utils.js} +0 -0
- /package/build/esm/{transport.js → dev/transport.js} +0 -0
- /package/build/esm/{utils → dev/utils}/internalSqlQuery.js +0 -0
- /package/build/esm/{utils → dev/utils}/internalStorageKey.js +0 -0
- /package/build/esm/{utils → dev/utils}/invocationScope.js +0 -0
- /package/build/esm/{utils → dev/utils}/isBinding.js +0 -0
- /package/build/esm/{utils → dev/utils}/isCloudflareClass.js +0 -0
- /package/build/esm/{utils → dev/utils}/rpcMeta.js +0 -0
- /package/build/esm/{utils → dev/utils}/streaming.js +0 -0
- /package/build/esm/{vendor → dev/vendor}/stacktrace.js +0 -0
- /package/build/esm/{vite → dev/vite}/agentClass.js +0 -0
- /package/build/esm/{vite → dev/vite}/autoInstrument.js +0 -0
- /package/build/esm/{vite → dev/vite}/instrumentFile.js +0 -0
- /package/build/esm/{vite → dev/vite}/moduleShape.js +0 -0
- /package/build/esm/{vite → dev/vite}/transform.js +0 -0
- /package/build/esm/{vite → dev/vite}/workerEntrypoint.js +0 -0
- /package/build/esm/{vite → dev/vite}/wranglerConfig.js +0 -0
- /package/build/esm/{wrapMethodWithSentry.js → dev/wrapMethodWithSentry.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/nodejs_compat/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a copy of the Vercel AI integration from the Cloudflare SDK (src/integrations/tracing/vercelai.ts).
|
|
3
|
-
*
|
|
4
|
-
* The only difference is that it includes tracing channel support
|
|
5
|
-
* because the default Vercel AI integration needs `nodejs_als`, while this one uses `nodejs_compat`.
|
|
6
|
-
*/
|
|
7
|
-
import { type VercelAiOptions } from '@sentry/server-utils';
|
|
8
|
-
/**
|
|
9
|
-
* Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.
|
|
10
|
-
* This integration is not enabled by default, you need to manually add it.
|
|
11
|
-
*
|
|
12
|
-
* For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).
|
|
13
|
-
*
|
|
14
|
-
* You need to enable collecting spans for a specific call by setting
|
|
15
|
-
* `experimental_telemetry.isEnabled` to `true` in the first argument of the function call.
|
|
16
|
-
*
|
|
17
|
-
* ```javascript
|
|
18
|
-
* const result = await generateText({
|
|
19
|
-
* model: openai('gpt-4-turbo'),
|
|
20
|
-
* experimental_telemetry: { isEnabled: true },
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* If you want to collect inputs and outputs for a specific call, you must specifically opt-in to each
|
|
25
|
-
* function call by setting `experimental_telemetry.recordInputs` and `experimental_telemetry.recordOutputs`
|
|
26
|
-
* to `true`.
|
|
27
|
-
*
|
|
28
|
-
* ```javascript
|
|
29
|
-
* const result = await generateText({
|
|
30
|
-
* model: openai('gpt-4-turbo'),
|
|
31
|
-
* experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },
|
|
32
|
-
* });
|
|
33
|
-
*/
|
|
34
|
-
export declare const vercelAIIntegration: (options?: VercelAiOptions | undefined) => import("@sentry/core").Integration & {
|
|
35
|
-
name: string;
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=vercelai.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vercelai.d.ts","sourceRoot":"","sources":["../../../../../src/nodejs_compat/integrations/tracing/vercelai.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAyD,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAanH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,mBAAmB;;CAA0C,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { CloudflareOptions } from '../client';
|
|
2
|
-
/**
|
|
3
|
-
* Gets the effective RPC propagation setting, handling deprecation of `instrumentPrototypeMethods`.
|
|
4
|
-
*
|
|
5
|
-
* Priority:
|
|
6
|
-
* 1. If `enableRpcTracePropagation` is set, use it (ignore `instrumentPrototypeMethods`)
|
|
7
|
-
* 2. If only `instrumentPrototypeMethods` is set, use it with deprecation warning
|
|
8
|
-
* 3. If neither is set, return `false`
|
|
9
|
-
*
|
|
10
|
-
* @returns The effective setting for RPC trace propagation
|
|
11
|
-
*/
|
|
12
|
-
export declare function getEffectiveRpcPropagation(options: CloudflareOptions): boolean;
|
|
13
|
-
//# sourceMappingURL=rpcOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rpcOptions.d.ts","sourceRoot":"","sources":["../../../src/utils/rpcOptions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAGnD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CA+B9E"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sets the async context strategy to use AsyncLocalStorage.
|
|
3
|
-
*
|
|
4
|
-
* AsyncLocalStorage is only available in the cloudflare workers runtime if you set
|
|
5
|
-
* compatibility_flags = ["nodejs_compat"]
|
|
6
|
-
*
|
|
7
|
-
* @internal Only exported to be used in higher-level Sentry packages
|
|
8
|
-
* @hidden Only exported to be used in higher-level Sentry packages
|
|
9
|
-
*/
|
|
10
|
-
export declare function setAsyncLocalStorageAsyncContextStrategy(): void;
|
|
11
|
-
//# sourceMappingURL=async.d.ts.map
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import { ClientOptions, Options } from '@sentry/core';
|
|
2
|
-
import { ServerRuntimeClient } from '@sentry/core';
|
|
3
|
-
import { ExecutionContextCompat } from './executionContext';
|
|
4
|
-
import { makeFlushLock } from './flush';
|
|
5
|
-
import { CloudflareTransportOptions } from './transport';
|
|
6
|
-
/**
|
|
7
|
-
* The Sentry Cloudflare SDK Client.
|
|
8
|
-
*
|
|
9
|
-
* @see CloudflareClientOptions for documentation on configuration options.
|
|
10
|
-
* @see ServerRuntimeClient for usage documentation.
|
|
11
|
-
*/
|
|
12
|
-
export declare class CloudflareClient extends ServerRuntimeClient {
|
|
13
|
-
private readonly _flushLock;
|
|
14
|
-
private _pendingSpans;
|
|
15
|
-
private _spanCompletionPromise;
|
|
16
|
-
private _resolveSpanCompletion;
|
|
17
|
-
private _unsubscribeSpanStart;
|
|
18
|
-
private _unsubscribeSpanEnd;
|
|
19
|
-
/**
|
|
20
|
-
* Creates a new Cloudflare SDK instance.
|
|
21
|
-
* @param options Configuration options for this SDK.
|
|
22
|
-
*/
|
|
23
|
-
constructor(options: CloudflareClientOptions);
|
|
24
|
-
/**
|
|
25
|
-
* Flushes pending operations and ensures all data is processed.
|
|
26
|
-
* If a timeout is provided, the operation will be completed within the specified time limit.
|
|
27
|
-
*
|
|
28
|
-
* It will wait for all pending spans to complete before flushing.
|
|
29
|
-
*
|
|
30
|
-
* @param {number} [timeout] - Optional timeout in milliseconds to force the completion of the flush operation.
|
|
31
|
-
* @return {Promise<boolean>} A promise that resolves to a boolean indicating whether the flush operation was successful.
|
|
32
|
-
*/
|
|
33
|
-
flush(timeout?: number): Promise<boolean>;
|
|
34
|
-
/**
|
|
35
|
-
* Disposes of the client and releases all resources.
|
|
36
|
-
*
|
|
37
|
-
* This method clears all Cloudflare-specific state in addition to the base client cleanup.
|
|
38
|
-
* It unsubscribes from span lifecycle events and clears pending span tracking.
|
|
39
|
-
*
|
|
40
|
-
* Call this method after flushing to allow the client to be garbage collected.
|
|
41
|
-
* After calling dispose(), the client should not be used anymore.
|
|
42
|
-
*/
|
|
43
|
-
dispose(): void;
|
|
44
|
-
/** @inheritDoc */
|
|
45
|
-
protected _setupIntegrations(): void;
|
|
46
|
-
/**
|
|
47
|
-
* Resets the span completion promise and resolve function.
|
|
48
|
-
*/
|
|
49
|
-
private _resetSpanCompletionPromise;
|
|
50
|
-
}
|
|
51
|
-
interface BaseCloudflareOptions {
|
|
52
|
-
/**
|
|
53
|
-
* @ignore Used internally to disable the deDupeIntegration for workflows.
|
|
54
|
-
* @hidden Used internally to disable the deDupeIntegration for workflows.
|
|
55
|
-
* @default true
|
|
56
|
-
*/
|
|
57
|
-
enableDedupe?: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* The Cloudflare SDK is not OpenTelemetry native, however, we set up some OpenTelemetry compatibility
|
|
60
|
-
* via a custom trace provider.
|
|
61
|
-
* This ensures that any spans emitted via `@opentelemetry/api` will be captured by Sentry.
|
|
62
|
-
* HOWEVER, big caveat: This does not handle custom context handling, it will always work off the current scope.
|
|
63
|
-
* This should be good enough for many, but not all integrations.
|
|
64
|
-
*
|
|
65
|
-
* If you want to opt-out of setting up the OpenTelemetry compatibility tracer, set this to `true`.
|
|
66
|
-
*
|
|
67
|
-
* @default false
|
|
68
|
-
*/
|
|
69
|
-
skipOpenTelemetrySetup?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Enable trace propagation for RPC calls between Workers, Durable Objects, and Service Bindings.
|
|
72
|
-
*
|
|
73
|
-
* When enabled, trace context (sentry-trace + baggage) is propagated across:
|
|
74
|
-
* - `stub.fetch()` calls to Durable Objects (via HTTP headers)
|
|
75
|
-
* - Service binding `fetch()` calls (via HTTP headers)
|
|
76
|
-
* - RPC method calls to Durable Objects and WorkerEntrypoints (via trailing argument)
|
|
77
|
-
*
|
|
78
|
-
* When enabled on the **receiver side** (DurableObject or WorkerEntrypoint), the SDK will also:
|
|
79
|
-
* - Extract and continue traces from incoming RPC calls
|
|
80
|
-
* - Create spans for each RPC method invocation
|
|
81
|
-
* - Capture errors thrown by RPC methods
|
|
82
|
-
*
|
|
83
|
-
* **Important:** This option should be enabled on **both sides** for full trace propagation.
|
|
84
|
-
*
|
|
85
|
-
* @default false
|
|
86
|
-
* @example
|
|
87
|
-
* ```ts
|
|
88
|
-
* // Worker side (caller)
|
|
89
|
-
* export default Sentry.withSentry(
|
|
90
|
-
* (env) => ({
|
|
91
|
-
* dsn: env.SENTRY_DSN,
|
|
92
|
-
* enableRpcTracePropagation: true,
|
|
93
|
-
* }),
|
|
94
|
-
* handler,
|
|
95
|
-
* );
|
|
96
|
-
*
|
|
97
|
-
* // Durable Object side (receiver)
|
|
98
|
-
* export const MyDO = Sentry.instrumentDurableObjectWithSentry(
|
|
99
|
-
* (env) => ({
|
|
100
|
-
* dsn: env.SENTRY_DSN,
|
|
101
|
-
* enableRpcTracePropagation: true,
|
|
102
|
-
* }),
|
|
103
|
-
* MyDOBase,
|
|
104
|
-
* );
|
|
105
|
-
*
|
|
106
|
-
* // WorkerEntrypoint side (receiver)
|
|
107
|
-
* export const MyEntrypoint = Sentry.withSentry(
|
|
108
|
-
* env => ({ dsn: env.SENTRY_DSN, enableRpcTracePropagation: true }),
|
|
109
|
-
* MyEntrypointBase,
|
|
110
|
-
* );
|
|
111
|
-
* ```
|
|
112
|
-
*/
|
|
113
|
-
enableRpcTracePropagation?: boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Table names that should stay instrumented even though they match the reserved `cf_` prefix used
|
|
116
|
-
* by Durable Object frameworks (`agents`, `partyserver`, ...) for their internal SQLite tables.
|
|
117
|
-
*
|
|
118
|
-
* By default, `exec` queries against `cf_`-prefixed tables are treated as framework noise and no
|
|
119
|
-
* `db.query` span is created for them. If one of your own tables happens to use this prefix, add it
|
|
120
|
-
* here to opt it back into instrumentation. Entries are matched against each table name in the
|
|
121
|
-
* query summary — strings must match exactly, while regular expressions give you prefix/pattern
|
|
122
|
-
* matching.
|
|
123
|
-
*
|
|
124
|
-
* @default []
|
|
125
|
-
* @example
|
|
126
|
-
* ```ts
|
|
127
|
-
* export default Sentry.withSentry(
|
|
128
|
-
* (env) => ({
|
|
129
|
-
* dsn: env.SENTRY_DSN,
|
|
130
|
-
* durableObjectSqlSpanAllowlist: ['cf_my_table', /^cf_reports_/],
|
|
131
|
-
* }),
|
|
132
|
-
* handler,
|
|
133
|
-
* );
|
|
134
|
-
* ```
|
|
135
|
-
*/
|
|
136
|
-
durableObjectSqlSpanAllowlist?: Array<string | RegExp>;
|
|
137
|
-
/**
|
|
138
|
-
* KV keys that should stay instrumented even though they match a reserved prefix used by Durable
|
|
139
|
-
* Object frameworks (`agents`, `partyserver`, ...) for their internal storage entries.
|
|
140
|
-
*
|
|
141
|
-
* By default, KV reads/writes (`get`, `put`, `delete`, `list`) of `cf_`- or `__ps_`-prefixed keys
|
|
142
|
-
* are treated as framework noise and no `durable_object_storage_*` span is created for them,
|
|
143
|
-
* mirroring how `cf_`-prefixed SQL tables are handled (see {@link durableObjectSqlSpanAllowlist}).
|
|
144
|
-
* If one of your own keys happens to use such a prefix, add it here to opt it back into
|
|
145
|
-
* instrumentation. Strings must match exactly, while regular expressions give you prefix/pattern
|
|
146
|
-
* matching.
|
|
147
|
-
*
|
|
148
|
-
* @default []
|
|
149
|
-
* @example
|
|
150
|
-
* ```ts
|
|
151
|
-
* export default Sentry.withSentry(
|
|
152
|
-
* (env) => ({
|
|
153
|
-
* dsn: env.SENTRY_DSN,
|
|
154
|
-
* durableObjectStorageSpanAllowlist: ['cf_my_key', /^cf_reports_/],
|
|
155
|
-
* }),
|
|
156
|
-
* handler,
|
|
157
|
-
* );
|
|
158
|
-
* ```
|
|
159
|
-
*/
|
|
160
|
-
durableObjectStorageSpanAllowlist?: Array<string | RegExp>;
|
|
161
|
-
/**
|
|
162
|
-
* @deprecated Use `enableRpcTracePropagation` instead. This option will be removed in a future major version.
|
|
163
|
-
*
|
|
164
|
-
* Enable instrumentation of prototype methods for DurableObjects.
|
|
165
|
-
*
|
|
166
|
-
* When `true`, the SDK will wrap all methods on the DurableObject prototype chain
|
|
167
|
-
* to automatically create spans and capture errors for RPC method calls.
|
|
168
|
-
*
|
|
169
|
-
* When an array of strings is provided, only the specified method names will be instrumented.
|
|
170
|
-
*
|
|
171
|
-
* @default false
|
|
172
|
-
*/
|
|
173
|
-
instrumentPrototypeMethods?: boolean | string[];
|
|
174
|
-
/**
|
|
175
|
-
* If you use Spotlight by Sentry during development, use
|
|
176
|
-
* this option to forward captured Sentry events to Spotlight.
|
|
177
|
-
*
|
|
178
|
-
* Either set it to true, or provide a specific Spotlight Sidecar URL.
|
|
179
|
-
*
|
|
180
|
-
* More details: https://spotlightjs.com/
|
|
181
|
-
*
|
|
182
|
-
* IMPORTANT: Only set this option to `true` while developing, not in production!
|
|
183
|
-
*/
|
|
184
|
-
spotlight?: boolean | string;
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Configuration options for the Sentry Cloudflare SDK
|
|
188
|
-
*
|
|
189
|
-
* @see @sentry/core Options for more information.
|
|
190
|
-
*/
|
|
191
|
-
export interface CloudflareOptions extends Options<CloudflareTransportOptions>, BaseCloudflareOptions {
|
|
192
|
-
ctx?: ExecutionContextCompat;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Configuration options for the Sentry Cloudflare SDK Client class
|
|
196
|
-
*
|
|
197
|
-
* @see CloudflareClient for more information.
|
|
198
|
-
*/
|
|
199
|
-
export interface CloudflareClientOptions extends ClientOptions<CloudflareTransportOptions>, BaseCloudflareOptions {
|
|
200
|
-
flushLock?: ReturnType<typeof makeFlushLock>;
|
|
201
|
-
}
|
|
202
|
-
export {};
|
|
203
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.
|
|
3
|
-
*
|
|
4
|
-
* ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.
|
|
5
|
-
*/
|
|
6
|
-
export declare const DEBUG_BUILD: boolean;
|
|
7
|
-
//# sourceMappingURL=debug-build.d.ts.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { env as cloudflareEnv } from 'cloudflare:workers';
|
|
2
|
-
import { CloudflareOptions } from './client';
|
|
3
|
-
/**
|
|
4
|
-
* Define the Sentry options for a Cloudflare Worker in a dedicated module.
|
|
5
|
-
*
|
|
6
|
-
* This is the recommended way to configure the SDK when using the Vite plugin's
|
|
7
|
-
* auto-instrumentation: place an `instrument.server.{ts,js,mjs}` file next to
|
|
8
|
-
* the worker entry whose **default export** is the result of this function. The
|
|
9
|
-
* plugin picks it up automatically and hands it to `withSentry`.
|
|
10
|
-
*
|
|
11
|
-
* Unlike Node's `Sentry.init(...)`, the options cannot be applied at module
|
|
12
|
-
* load time on Cloudflare: the DSN and other settings typically come from the
|
|
13
|
-
* per-request `env`, which only exists inside the handler. Pass a callback to
|
|
14
|
-
* read from `env`, or a static object when no `env` access is needed — either
|
|
15
|
-
* way you get full type-checking and autocomplete on {@link CloudflareOptions}.
|
|
16
|
-
*
|
|
17
|
-
* At runtime this is a thin pass-through; it only normalizes a static object
|
|
18
|
-
* into a callback so the plugin always imports a `(env) => options` function.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```ts
|
|
22
|
-
* // src/instrument.server.ts
|
|
23
|
-
* import { defineCloudflareOptions } from '@sentry/cloudflare';
|
|
24
|
-
*
|
|
25
|
-
* export default defineCloudflareOptions((env) => ({
|
|
26
|
-
* dsn: env.SENTRY_DSN,
|
|
27
|
-
* tracesSampleRate: 1.0,
|
|
28
|
-
* }));
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* // Static options — no `env` access needed
|
|
34
|
-
* export default defineCloudflareOptions({ tracesSampleRate: 1.0 });
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export declare function defineCloudflareOptions<Env = typeof cloudflareEnv>(optionsOrCallback: CloudflareOptions | ((env: Env) => CloudflareOptions | undefined)): (env: Env) => CloudflareOptions | undefined;
|
|
38
|
-
//# sourceMappingURL=defineCloudflareOptions.d.ts.map
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { DurableObject } from 'cloudflare:workers';
|
|
2
|
-
import { CloudflareOptions } from './client';
|
|
3
|
-
/**
|
|
4
|
-
* The instrumented context passed between the shared construction helpers.
|
|
5
|
-
*
|
|
6
|
-
* This is intentionally `any` rather than `ReturnType<typeof instrumentContext<DurableObjectState>>`.
|
|
7
|
-
* A concrete `DurableObjectState` here forces `tsc` to structurally relate its `storage: SqlStorage`
|
|
8
|
-
* graph against the `ExecutionContext | InstrumentedDurableObjectState` parameter of
|
|
9
|
-
* `wrapMethodWithSentry`, while the RPC-branded `DurableObject` from `cloudflare:workers` is also in
|
|
10
|
-
* scope. That union comparison explodes (1296×1296) and hangs the type build. The original inline
|
|
11
|
-
* implementation avoided this only incidentally, because `ctx` reached it as `any` through the Proxy
|
|
12
|
-
* `construct` trap. Keeping the shared context `any` preserves that behavior.
|
|
13
|
-
*/
|
|
14
|
-
type InstrumentedDurableObjectContext = any;
|
|
15
|
-
/**
|
|
16
|
-
* Constructs a Durable Object instance and instruments its built-in handler methods
|
|
17
|
-
* (`fetch`, `alarm`, `webSocketMessage`, `webSocketClose`, `webSocketError`).
|
|
18
|
-
*
|
|
19
|
-
* This is the shared construction path used by both {@link instrumentDurableObjectWithSentry}
|
|
20
|
-
* and {@link instrumentAgentWithSentry}. It intentionally does NOT apply the RPC prototype-method
|
|
21
|
-
* instrumentation — callers apply that last via {@link finalizeWithRpcInstrumentation}, after any
|
|
22
|
-
* additional per-instance instrumentation has been layered onto the returned object.
|
|
23
|
-
*
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
|
-
export declare function constructInstrumentedDurableObject<E, T extends DurableObject<E>>(target: new (state: DurableObjectState, env: E) => T, ctx: DurableObjectState, env: E, newTarget: NewableFunction, optionsCallback: (env: E) => CloudflareOptions): {
|
|
27
|
-
obj: T;
|
|
28
|
-
options: CloudflareOptions;
|
|
29
|
-
context: InstrumentedDurableObjectContext;
|
|
30
|
-
frameworkManagedMethods: ReadonlySet<string>;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Adds trace propagation to a constructed Durable Object's RPC methods.
|
|
34
|
-
*
|
|
35
|
-
* RPC methods are wrapped on the prototype because Cloudflare dispatches them with the Durable
|
|
36
|
-
* Object instance as the receiver. This preserves native private-field access and keeps the methods
|
|
37
|
-
* visible to Cloudflare's RPC dispatcher. Built-in handlers, Agent handlers, and methods managed by
|
|
38
|
-
* another framework are left untouched.
|
|
39
|
-
*
|
|
40
|
-
* Call this after all per-instance instrumentation has been applied. If RPC trace propagation is
|
|
41
|
-
* disabled, the object is returned unchanged.
|
|
42
|
-
*
|
|
43
|
-
* @param obj The constructed Durable Object instance.
|
|
44
|
-
* @param options The resolved SDK options for this instance.
|
|
45
|
-
* @param context The instrumented execution context for this instance.
|
|
46
|
-
* @param excludedMethods Method names owned by another framework and therefore not safe to wrap.
|
|
47
|
-
* @returns The same Durable Object instance, with eligible prototype methods instrumented.
|
|
48
|
-
* @internal
|
|
49
|
-
*/
|
|
50
|
-
export declare function finalizeWithRpcInstrumentation<T extends object>(obj: T, options: CloudflareOptions, context: InstrumentedDurableObjectContext, excludedMethods?: ReadonlySet<string>): T;
|
|
51
|
-
/**
|
|
52
|
-
* Instruments a Durable Object class to capture errors and performance data.
|
|
53
|
-
*
|
|
54
|
-
* Instruments the following methods by default:
|
|
55
|
-
* - fetch
|
|
56
|
-
* - alarm
|
|
57
|
-
* - webSocketMessage
|
|
58
|
-
* - webSocketClose
|
|
59
|
-
* - webSocketError
|
|
60
|
-
*
|
|
61
|
-
* To instrument RPC methods (prototype methods), enable the `enableRpcTracePropagation` option.
|
|
62
|
-
*
|
|
63
|
-
* @param optionsCallback Function that returns the options for the SDK initialization.
|
|
64
|
-
* @param DurableObjectClass The Durable Object class to instrument.
|
|
65
|
-
* @returns The instrumented Durable Object class.
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```ts
|
|
69
|
-
* class MyDurableObjectBase extends DurableObject {
|
|
70
|
-
* constructor(ctx: DurableObjectState, env: Env) {
|
|
71
|
-
* super(ctx, env);
|
|
72
|
-
* }
|
|
73
|
-
* }
|
|
74
|
-
*
|
|
75
|
-
* export const MyDurableObject = instrumentDurableObjectWithSentry(
|
|
76
|
-
* env => ({
|
|
77
|
-
* dsn: env.SENTRY_DSN,
|
|
78
|
-
* tracesSampleRate: 1.0,
|
|
79
|
-
* }),
|
|
80
|
-
* MyDurableObjectBase,
|
|
81
|
-
* );
|
|
82
|
-
* ```
|
|
83
|
-
*/
|
|
84
|
-
export declare function instrumentDurableObjectWithSentry<E, T extends DurableObject<E>, C extends new (state: DurableObjectState, env: E) => T>(optionsCallback: (env: E) => CloudflareOptions, DurableObjectClass: C): C;
|
|
85
|
-
/**
|
|
86
|
-
* Instruments a Cloudflare [`agents`](https://www.npmjs.com/package/agents) Agent class with Sentry.
|
|
87
|
-
*
|
|
88
|
-
* An `Agent` is a Durable Object under the hood, so this applies the same instrumentation as
|
|
89
|
-
* {@link instrumentDurableObjectWithSentry} (request transactions, `alarm`, WebSocket handlers, RPC
|
|
90
|
-
* trace propagation, SQL spans) and additionally captures Agent-specific telemetry via
|
|
91
|
-
* `instrumentCloudflareAgent`:
|
|
92
|
-
*
|
|
93
|
-
* - **Callable RPC spans** — a span (op `rpc`) for each `@callable()` method invoked over WebSocket.
|
|
94
|
-
* - **Breadcrumbs** — for every Agent observability event (`rpc`, `state:update`, `connect`,
|
|
95
|
-
* `disconnect`, `schedule:*`, `queue:*`, `workflow:*`, `email:*`, `mcp:*`, ...).
|
|
96
|
-
*
|
|
97
|
-
* Cloudflare Workers cannot auto-instrument, so the Agent class must be wrapped manually.
|
|
98
|
-
*
|
|
99
|
-
* @param optionsCallback Function that returns the options for the SDK initialization.
|
|
100
|
-
* @param AgentClass The Agent class to instrument.
|
|
101
|
-
* @returns The instrumented Agent class.
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* ```ts
|
|
105
|
-
* import { Agent, callable, routeAgentRequest } from 'agents';
|
|
106
|
-
* import * as Sentry from '@sentry/cloudflare';
|
|
107
|
-
*
|
|
108
|
-
* class MyAgentBase extends Agent<Env> {
|
|
109
|
-
* @callable()
|
|
110
|
-
* async greet(name: string): Promise<string> {
|
|
111
|
-
* return `Hello, ${name}!`;
|
|
112
|
-
* }
|
|
113
|
-
* }
|
|
114
|
-
*
|
|
115
|
-
* export const MyAgent = Sentry.instrumentAgentWithSentry(
|
|
116
|
-
* env => ({
|
|
117
|
-
* dsn: env.SENTRY_DSN,
|
|
118
|
-
* tracesSampleRate: 1.0,
|
|
119
|
-
* enableRpcTracePropagation: true,
|
|
120
|
-
* }),
|
|
121
|
-
* MyAgentBase,
|
|
122
|
-
* );
|
|
123
|
-
* ```
|
|
124
|
-
*/
|
|
125
|
-
export declare function instrumentAgentWithSentry<E, T extends DurableObject<E>, C extends new (state: DurableObjectState, env: E) => T>(optionsCallback: (env: E) => CloudflareOptions, AgentClass: C): C;
|
|
126
|
-
export {};
|
|
127
|
-
//# sourceMappingURL=durableobject.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ExecutionContext } from '@cloudflare/workers-types';
|
|
2
|
-
/**
|
|
3
|
-
* A structural subset of `ExecutionContext` that is compatible with both `@cloudflare/workers-types`
|
|
4
|
-
* v4 and v5.
|
|
5
|
-
*
|
|
6
|
-
* v5 added `exports` and `tracing` as required members. Referencing the full `ExecutionContext` in
|
|
7
|
-
* public input positions would force consumers on v4 (still allowed by our `peerDependencies` range)
|
|
8
|
-
* to provide members their types don't have. We only ever use `waitUntil` (plus a runtime
|
|
9
|
-
* `'storage' in ctx` check), so picking the members that exist in both majors keeps a context
|
|
10
|
-
* constructed against either version assignable here.
|
|
11
|
-
*/
|
|
12
|
-
export type ExecutionContextCompat = Pick<ExecutionContext, 'waitUntil' | 'passThroughOnException'> | ExecutionContext;
|
|
13
|
-
//# sourceMappingURL=executionContext.d.ts.map
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ExecutionContext } from '@cloudflare/workers-types';
|
|
2
|
-
import { Client } from '@sentry/core';
|
|
3
|
-
import { ExecutionContextCompat } from './executionContext';
|
|
4
|
-
type FlushLock = {
|
|
5
|
-
readonly ready: Promise<void>;
|
|
6
|
-
readonly finalize: () => Promise<void>;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Returns the original (un-instrumented) waitUntil function for a context.
|
|
10
|
-
* This should be used when calling waitUntil with flushAndDispose to avoid deadlock.
|
|
11
|
-
*
|
|
12
|
-
* The flush lock mechanism wraps context.waitUntil to track pending tasks.
|
|
13
|
-
* If we call waitUntil(flushAndDispose(client)) through the instrumented version,
|
|
14
|
-
* it creates a deadlock because:
|
|
15
|
-
* 1. The instrumented waitUntil acquires the flush lock
|
|
16
|
-
* 2. flushAndDispose calls client.flush() which waits for the lock to be released
|
|
17
|
-
* 3. The lock won't be released until the waitUntil promise completes
|
|
18
|
-
* 4. The waitUntil promise won't complete until flush() returns
|
|
19
|
-
*
|
|
20
|
-
* By using the original waitUntil for flush operations, we bypass this issue.
|
|
21
|
-
*/
|
|
22
|
-
export declare function getOriginalWaitUntil(context: ExecutionContextCompat): ExecutionContext['waitUntil'];
|
|
23
|
-
/**
|
|
24
|
-
* Enhances the given execution context by wrapping its `waitUntil` method with a proxy
|
|
25
|
-
* to monitor pending tasks, and provides a flusher function to ensure all tasks
|
|
26
|
-
* have been completed before executing any subsequent logic.
|
|
27
|
-
*
|
|
28
|
-
* @param {ExecutionContext} context - The execution context to be enhanced. If no context is provided, the function returns undefined.
|
|
29
|
-
* @return {FlushLock} Returns a flusher function if a valid context is provided, otherwise undefined.
|
|
30
|
-
*/
|
|
31
|
-
export declare function makeFlushLock(context: ExecutionContextCompat): FlushLock;
|
|
32
|
-
/**
|
|
33
|
-
* Flushes the client and then disposes of it to allow garbage collection.
|
|
34
|
-
* This should be called at the end of each request to prevent memory leaks.
|
|
35
|
-
*
|
|
36
|
-
* This function never rejects. On Workers, a rejected promise passed to
|
|
37
|
-
* `ctx.waitUntil` marks the whole invocation as `outcome: exception` even when
|
|
38
|
-
* the handler itself completed successfully. Since flush/dispose is internal
|
|
39
|
-
* SDK housekeeping, a failure here must not fail the user's invocation.
|
|
40
|
-
*
|
|
41
|
-
* @param client - The CloudflareClient instance to flush and dispose
|
|
42
|
-
* @param timeout - Timeout in milliseconds for the flush operation
|
|
43
|
-
* @returns A promise that resolves when flush and dispose are complete
|
|
44
|
-
*/
|
|
45
|
-
export declare function flushAndDispose(client: Client | undefined, timeout?: number): Promise<void>;
|
|
46
|
-
export {};
|
|
47
|
-
//# sourceMappingURL=flush.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, FeatureFlagsIntegration, Session, SeverityLevel, Span, StackFrame, Stacktrace, Thread, User, Metric, ExclusiveEventHintOrCaptureContext, CaptureContext, } from '@sentry/core';
|
|
2
|
-
export { CloudflareOptions } from './client';
|
|
3
|
-
export { addEventProcessor, addBreadcrumb, addIntegration, captureException, captureEvent, captureMessage, captureFeedback, close, createTransport, lastEventId, flush, getClient, isInitialized, isEnabled, getCurrentScope, getGlobalScope, getIsolationScope, setCurrentClient, Scope, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setAttribute, setAttributes, setUser, setConversationId, getSpanStatusFromHttpCode, setHttpStatus, withScope, withIsolationScope, captureCheckIn, withMonitor, setMeasurement, getActiveSpan, getRootSpan, getTraceData, getTraceMetaTags, startSpan, startInactiveSpan, startSpanManual, startNewTrace, bindScopeToEmitter, suppressTracing, withActiveSpan, getSpanDescendants, continueTrace, functionToStringIntegration, inboundFiltersIntegration, instrumentOpenAiClient, instrumentGoogleGenAIClient, instrumentAnthropicAiClient, eventFiltersIntegration, linkedErrorsIntegration, requestDataIntegration, extraErrorDataIntegration, dedupeIntegration, rewriteFramesIntegration, captureConsoleIntegration, moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient, instrumentPostgresJsSql, zodErrorsIntegration, consoleIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, trpcMiddleware, spanToJSON, spanToTraceHeader, spanToBaggageHeader, updateSpanName, wrapMcpServerWithSentry, consoleLoggingIntegration, createConsolaReporter, createLangChainCallbackHandler, instrumentLangChainEmbeddings, featureFlagsIntegration, growthbookIntegration, logger, metrics, withStreamedSpan, spanStreamingIntegration, instrumentStateGraph, instrumentLangGraph, instrumentCreateReactAgent, } from '@sentry/core';
|
|
4
|
-
export { withSentry } from './withSentry';
|
|
5
|
-
export { defineCloudflareOptions } from './defineCloudflareOptions';
|
|
6
|
-
export { instrumentAgentWithSentry, instrumentDurableObjectWithSentry } from './durableobject';
|
|
7
|
-
export { sentryPagesPlugin } from './pages-plugin';
|
|
8
|
-
export { wrapRequestHandler } from './request';
|
|
9
|
-
export { CloudflareClient } from './client';
|
|
10
|
-
export { getDefaultIntegrations } from './sdk';
|
|
11
|
-
export { httpServerIntegration } from './integrations/httpServer';
|
|
12
|
-
export { fetchIntegration } from './integrations/fetch';
|
|
13
|
-
export { spotlightIntegration } from './integrations/spotlight';
|
|
14
|
-
export { vercelAIIntegration } from './integrations/tracing/vercelai';
|
|
15
|
-
export { honoIntegration } from './integrations/hono';
|
|
16
|
-
export { instrumentD1WithSentry } from './instrumentations/worker/instrumentD1';
|
|
17
|
-
export { instrumentWorkflowWithSentry } from './workflows';
|
|
18
|
-
export { setAsyncLocalStorageAsyncContextStrategy } from './async';
|
|
19
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mark an object as instrumented, storing the instrumented version.
|
|
3
|
-
* @param original The original uninstrumented object
|
|
4
|
-
* @param instrumented The instrumented version (defaults to original if not provided)
|
|
5
|
-
*/
|
|
6
|
-
export declare function markAsInstrumented<T>(original: T, instrumented?: T): void;
|
|
7
|
-
/**
|
|
8
|
-
* Get the instrumented version of an object, if available.
|
|
9
|
-
* Returns the instrumented version if the object was previously instrumented,
|
|
10
|
-
* or undefined if not found.
|
|
11
|
-
*/
|
|
12
|
-
export declare function getInstrumented<T>(obj: T): T | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* Returns the already-instrumented version of `original` if one exists,
|
|
15
|
-
* otherwise calls `instrumentFn` to create it, marks the mapping, and returns it.
|
|
16
|
-
*
|
|
17
|
-
* @param noMark - If true, skips storing the original→instrumented mapping.
|
|
18
|
-
*/
|
|
19
|
-
export declare function ensureInstrumented<T>(original: T, instrumentFn: (original: T) => T, noMark?: boolean): T;
|
|
20
|
-
//# sourceMappingURL=instrument.d.ts.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Instruments an instance of a Cloudflare [`agents`](https://www.npmjs.com/package/agents) `Agent`
|
|
3
|
-
* with Sentry, adding telemetry that is specific to the Agent's runtime behavior:
|
|
4
|
-
*
|
|
5
|
-
* - **Callable RPC spans** — a span (op `rpc`) for each `@callable()` method invoked over WebSocket.
|
|
6
|
-
* - **Conversation correlation** — sets the conversation id on the scope for each unit of agent
|
|
7
|
-
* work — chat turn, callable RPC call, or HTTP request — so `gen_ai` spans created within it are
|
|
8
|
-
* correlated, for chat and plain agents alike. The id is minted once per agent instance and
|
|
9
|
-
* rotated when the chat is cleared (the `message:clear` observability event); it is persisted to
|
|
10
|
-
* Durable Object storage so it survives hibernation.
|
|
11
|
-
*
|
|
12
|
-
* It only hooks the `agents` package internals and uses Sentry's tracing primitives. On Cloudflare
|
|
13
|
-
* Workers, prefer `instrumentAgentWithSentry`, which additionally instruments the Durable Object
|
|
14
|
-
* handlers and initializes the SDK; that function calls this one internally.
|
|
15
|
-
*
|
|
16
|
-
* The hooks replace own-properties on the instance and defer to the original implementation, so
|
|
17
|
-
* they compose with any other instrumentation applied to the same instance.
|
|
18
|
-
*
|
|
19
|
-
* @param agent The `agents` `Agent` instance to instrument.
|
|
20
|
-
* @returns The same instance, instrumented.
|
|
21
|
-
*
|
|
22
|
-
* @internal Use `instrumentAgentWithSentry` instead — this is called internally by it.
|
|
23
|
-
*/
|
|
24
|
-
export declare function instrumentCloudflareAgent<T extends object>(agent: T): T;
|
|
25
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AgentInternals } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Wraps the Agent's `onMessage` handler to create a span for each `@callable()` RPC invocation.
|
|
4
|
-
* RPC requests arrive as WebSocket messages, so this span nests under the active transaction for
|
|
5
|
-
* the WebSocket message (on Cloudflare, the instrumented Durable Object `webSocketMessage` hook).
|
|
6
|
-
*
|
|
7
|
-
* Also sets the conversation id on the scope for the duration of the call: callable methods are the
|
|
8
|
-
* unit of work for plain (non-chat) agents, which run LLM calls just like chat turns do. It is
|
|
9
|
-
* awaited so the id is on the scope before the method body creates any span; the `agents`
|
|
10
|
-
* `onMessage` own property this wraps is already `async`, so the promise return is nothing new to
|
|
11
|
-
* the WebSocket dispatch upstream.
|
|
12
|
-
*/
|
|
13
|
-
export declare function instrumentAgentCallableRpc(obj: AgentInternals): void;
|
|
14
|
-
//# sourceMappingURL=instrumentAgentCallableRpc.d.ts.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { AgentInternals } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Correlates the AI spans of an HTTP-driven agent turn with a conversation id on the active scope.
|
|
4
|
-
*
|
|
5
|
-
* `onRequest` is the third unit of agent work, alongside chat turns and `@callable()` RPC: the
|
|
6
|
-
* `agents` router sends every non-WebSocket request to it, which is how REST endpoints and webhooks
|
|
7
|
-
* reach an agent.
|
|
8
|
-
*
|
|
9
|
-
* `agents` installs `onRequest` as an own property in the `Agent` constructor (as it does
|
|
10
|
-
* `onMessage`), and we instrument after construction, so wrapping the own property is what the
|
|
11
|
-
* router ends up calling. That own property is already `async`, and partyserver's `fetch` awaits it,
|
|
12
|
-
* so returning a promise from this wrapper — to get the conversation id onto the scope before the
|
|
13
|
-
* request handler creates any span — keeps the existing contract.
|
|
14
|
-
*/
|
|
15
|
-
export declare function instrumentAgentRequestConversation(obj: AgentInternals): void;
|
|
16
|
-
//# sourceMappingURL=instrumentAgentRequestConversation.d.ts.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { AgentInternals } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* For chat agents (`AIChatAgent` from `@cloudflare/ai-chat`), correlates each chat turn's AI spans
|
|
4
|
-
* with a conversation id on the active scope.
|
|
5
|
-
*
|
|
6
|
-
* In the Agents model one agent instance is one long-lived conversation, so the conversation id is
|
|
7
|
-
* minted once per instance and persisted to Durable Object storage, which is what carries it across
|
|
8
|
-
* hibernation (that destroys the in-memory instance). When the user clears the chat, they expect a
|
|
9
|
-
* fresh conversation — but recreating the Durable Object for that would also drop the MCP/OAuth
|
|
10
|
-
* state stored per instance (GitHub/Sentry sign-in). To get a fresh conversation id *without*
|
|
11
|
-
* losing that state, we rotate the persisted id when the SDK reports a cleared chat.
|
|
12
|
-
*
|
|
13
|
-
* The id itself is not attached to spans here — `setAgentConversationId` resolves it, and the SDK's
|
|
14
|
-
* `conversationIdIntegration` picks it off the scope at `spanStart` to stamp
|
|
15
|
-
* `gen_ai.conversation.id` onto the AI spans created inside the turn (e.g. by the Workers AI
|
|
16
|
-
* instrumentation), which correlates a turn's model and tool calls.
|
|
17
|
-
*
|
|
18
|
-
* Plain (non-chat) `Agent`s do not define `onChatMessage`, so they are skipped here — their unit
|
|
19
|
-
* of work is the callable RPC method, where `instrumentAgentCallableRpc` sets the conversation id
|
|
20
|
-
* instead.
|
|
21
|
-
*/
|
|
22
|
-
export declare function instrumentChatAgentConversation(obj: AgentInternals): void;
|
|
23
|
-
//# sourceMappingURL=instrumentChatAgentConversation.d.ts.map
|