@sentry/cloudflare 11.0.0-alpha.1 → 11.0.0-beta.0
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/build/cjs/dev/baseSdk.js +20 -8
- package/build/cjs/dev/baseSdk.js.map +1 -1
- package/build/cjs/dev/client.js +118 -25
- package/build/cjs/dev/client.js.map +1 -1
- package/build/cjs/dev/clientCache.js +15 -0
- package/build/cjs/dev/clientCache.js.map +1 -0
- package/build/cjs/dev/defineCloudflareOptions.js.map +1 -1
- package/build/cjs/dev/durableobject.js +4 -62
- package/build/cjs/dev/durableobject.js.map +1 -1
- package/build/cjs/dev/flush.js +6 -4
- package/build/cjs/dev/flush.js.map +1 -1
- package/build/cjs/dev/index.js +8 -7
- package/build/cjs/dev/index.js.map +1 -1
- package/build/cjs/dev/instrumentations/agents/instrumentAgentCallableRpc.js +3 -1
- package/build/cjs/dev/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -1
- package/build/cjs/dev/instrumentations/instrumentDurableObjectHandlers.js +123 -0
- package/build/cjs/dev/instrumentations/instrumentDurableObjectHandlers.js.map +1 -0
- package/build/cjs/dev/instrumentations/instrumentDurableObjectNamespace.js +4 -4
- package/build/cjs/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/cjs/dev/instrumentations/instrumentDurableObjectStorage.js +3 -1
- package/build/cjs/dev/instrumentations/instrumentDurableObjectStorage.js.map +1 -1
- package/build/cjs/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js +3 -1
- package/build/cjs/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -1
- package/build/cjs/dev/instrumentations/instrumentSqlStorage.js +6 -3
- package/build/cjs/dev/instrumentations/instrumentSqlStorage.js.map +1 -1
- package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js +9 -16
- package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentD1.js +10 -3
- package/build/cjs/dev/instrumentations/worker/instrumentD1.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentEmail.js +4 -2
- package/build/cjs/dev/instrumentations/worker/instrumentEmail.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentEnv.js +5 -12
- package/build/cjs/dev/instrumentations/worker/instrumentEnv.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentFetch.js +8 -8
- package/build/cjs/dev/instrumentations/worker/instrumentFetch.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentQueue.js +4 -2
- package/build/cjs/dev/instrumentations/worker/instrumentQueue.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentQueueProducer.js +3 -2
- package/build/cjs/dev/instrumentations/worker/instrumentQueueProducer.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentR2.js +21 -18
- package/build/cjs/dev/instrumentations/worker/instrumentR2.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentScheduled.js +4 -2
- package/build/cjs/dev/instrumentations/worker/instrumentScheduled.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentTail.js +2 -0
- package/build/cjs/dev/instrumentations/worker/instrumentTail.js.map +1 -1
- package/build/cjs/dev/integrations/fetch.js +1 -11
- package/build/cjs/dev/integrations/fetch.js.map +1 -1
- package/build/cjs/dev/opentelemetry/tracer.js +2 -40
- package/build/cjs/dev/opentelemetry/tracer.js.map +1 -1
- package/build/cjs/dev/pages-plugin.js +2 -2
- package/build/cjs/dev/pages-plugin.js.map +1 -1
- package/build/cjs/dev/request.js +2 -123
- package/build/cjs/dev/request.js.map +1 -1
- package/build/cjs/dev/sdk.js +11 -6
- package/build/cjs/dev/sdk.js.map +1 -1
- package/build/cjs/dev/transport.js +1 -1
- package/build/cjs/dev/transport.js.map +1 -1
- package/build/cjs/dev/utils/invocationContext.js +41 -0
- package/build/cjs/dev/utils/invocationContext.js.map +1 -0
- package/build/cjs/dev/utils/invocationScope.js +7 -2
- package/build/cjs/dev/utils/invocationScope.js.map +1 -1
- package/build/cjs/dev/utils/isBinding.js +0 -4
- package/build/cjs/dev/utils/isBinding.js.map +1 -1
- package/build/cjs/dev/utils/rpcPropagation.js +15 -0
- package/build/cjs/dev/utils/rpcPropagation.js.map +1 -0
- package/build/cjs/dev/vendor/stacktrace.js +2 -1
- package/build/cjs/dev/vendor/stacktrace.js.map +1 -1
- package/build/cjs/dev/vite/autoInstrument.js +2 -1
- package/build/cjs/dev/vite/autoInstrument.js.map +1 -1
- package/build/cjs/dev/vite/index.js.map +1 -1
- package/build/cjs/dev/vite/transform.js +30 -5
- package/build/cjs/dev/vite/transform.js.map +1 -1
- package/build/cjs/dev/vite/wranglerConfig.js +21 -1
- package/build/cjs/dev/vite/wranglerConfig.js.map +1 -1
- package/build/cjs/dev/withSentry.js.map +1 -1
- package/build/cjs/dev/workflows.js +45 -33
- package/build/cjs/dev/workflows.js.map +1 -1
- package/build/cjs/dev/wrapMethodWithSentry.js +51 -15
- package/build/cjs/dev/wrapMethodWithSentry.js.map +1 -1
- package/build/cjs/dev/wrapRequestHandlerWithInit.js +134 -0
- package/build/cjs/dev/wrapRequestHandlerWithInit.js.map +1 -0
- package/build/cjs/prod/baseSdk.js +20 -8
- package/build/cjs/prod/baseSdk.js.map +1 -1
- package/build/cjs/prod/client.js +118 -25
- package/build/cjs/prod/client.js.map +1 -1
- package/build/cjs/prod/clientCache.js +15 -0
- package/build/cjs/prod/clientCache.js.map +1 -0
- package/build/cjs/prod/defineCloudflareOptions.js.map +1 -1
- package/build/cjs/prod/durableobject.js +4 -62
- package/build/cjs/prod/durableobject.js.map +1 -1
- package/build/cjs/prod/flush.js +6 -4
- package/build/cjs/prod/flush.js.map +1 -1
- package/build/cjs/prod/index.js +8 -7
- package/build/cjs/prod/index.js.map +1 -1
- package/build/cjs/prod/instrumentations/agents/instrumentAgentCallableRpc.js +3 -1
- package/build/cjs/prod/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -1
- package/build/cjs/prod/instrumentations/instrumentDurableObjectHandlers.js +123 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectHandlers.js.map +1 -0
- package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js +4 -4
- package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/cjs/prod/instrumentations/instrumentDurableObjectStorage.js +3 -1
- package/build/cjs/prod/instrumentations/instrumentDurableObjectStorage.js.map +1 -1
- package/build/cjs/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js +3 -1
- package/build/cjs/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -1
- package/build/cjs/prod/instrumentations/instrumentSqlStorage.js +6 -3
- package/build/cjs/prod/instrumentations/instrumentSqlStorage.js.map +1 -1
- package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js +9 -16
- package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentD1.js +10 -3
- package/build/cjs/prod/instrumentations/worker/instrumentD1.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentEmail.js +4 -2
- package/build/cjs/prod/instrumentations/worker/instrumentEmail.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentEnv.js +5 -12
- package/build/cjs/prod/instrumentations/worker/instrumentEnv.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentFetch.js +8 -8
- package/build/cjs/prod/instrumentations/worker/instrumentFetch.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentQueue.js +4 -2
- package/build/cjs/prod/instrumentations/worker/instrumentQueue.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentQueueProducer.js +3 -2
- package/build/cjs/prod/instrumentations/worker/instrumentQueueProducer.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentR2.js +21 -18
- package/build/cjs/prod/instrumentations/worker/instrumentR2.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js +4 -2
- package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentTail.js +2 -0
- package/build/cjs/prod/instrumentations/worker/instrumentTail.js.map +1 -1
- package/build/cjs/prod/integrations/fetch.js +1 -11
- package/build/cjs/prod/integrations/fetch.js.map +1 -1
- package/build/cjs/prod/opentelemetry/tracer.js +2 -40
- package/build/cjs/prod/opentelemetry/tracer.js.map +1 -1
- package/build/cjs/prod/pages-plugin.js +2 -2
- package/build/cjs/prod/pages-plugin.js.map +1 -1
- package/build/cjs/prod/request.js +2 -123
- package/build/cjs/prod/request.js.map +1 -1
- package/build/cjs/prod/sdk.js +11 -6
- package/build/cjs/prod/sdk.js.map +1 -1
- package/build/cjs/prod/transport.js +1 -1
- package/build/cjs/prod/transport.js.map +1 -1
- package/build/cjs/prod/utils/invocationContext.js +41 -0
- package/build/cjs/prod/utils/invocationContext.js.map +1 -0
- package/build/cjs/prod/utils/invocationScope.js +7 -2
- package/build/cjs/prod/utils/invocationScope.js.map +1 -1
- package/build/cjs/prod/utils/isBinding.js +0 -4
- package/build/cjs/prod/utils/isBinding.js.map +1 -1
- package/build/cjs/prod/utils/rpcPropagation.js +15 -0
- package/build/cjs/prod/utils/rpcPropagation.js.map +1 -0
- package/build/cjs/prod/vendor/stacktrace.js +2 -1
- package/build/cjs/prod/vendor/stacktrace.js.map +1 -1
- package/build/cjs/prod/vite/autoInstrument.js +2 -1
- package/build/cjs/prod/vite/autoInstrument.js.map +1 -1
- package/build/cjs/prod/vite/index.js.map +1 -1
- package/build/cjs/prod/vite/transform.js +30 -5
- package/build/cjs/prod/vite/transform.js.map +1 -1
- package/build/cjs/prod/vite/wranglerConfig.js +21 -1
- package/build/cjs/prod/vite/wranglerConfig.js.map +1 -1
- package/build/cjs/prod/withSentry.js.map +1 -1
- package/build/cjs/prod/workflows.js +45 -33
- package/build/cjs/prod/workflows.js.map +1 -1
- package/build/cjs/prod/wrapMethodWithSentry.js +51 -15
- package/build/cjs/prod/wrapMethodWithSentry.js.map +1 -1
- package/build/cjs/prod/wrapRequestHandlerWithInit.js +134 -0
- package/build/cjs/prod/wrapRequestHandlerWithInit.js.map +1 -0
- package/build/esm/dev/baseSdk.js +21 -9
- package/build/esm/dev/baseSdk.js.map +1 -1
- package/build/esm/dev/client.js +118 -25
- package/build/esm/dev/client.js.map +1 -1
- package/build/esm/dev/clientCache.js +12 -0
- package/build/esm/dev/clientCache.js.map +1 -0
- package/build/esm/dev/defineCloudflareOptions.js.map +1 -1
- package/build/esm/dev/durableobject.js +5 -63
- package/build/esm/dev/durableobject.js.map +1 -1
- package/build/esm/dev/flush.js +6 -4
- package/build/esm/dev/flush.js.map +1 -1
- package/build/esm/dev/index.js +4 -4
- package/build/esm/dev/instrumentations/agents/instrumentAgentCallableRpc.js +4 -2
- package/build/esm/dev/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -1
- package/build/esm/dev/instrumentations/instrumentDurableObjectHandlers.js +121 -0
- package/build/esm/dev/instrumentations/instrumentDurableObjectHandlers.js.map +1 -0
- package/build/esm/dev/instrumentations/instrumentDurableObjectNamespace.js +4 -4
- package/build/esm/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/esm/dev/instrumentations/instrumentDurableObjectStorage.js +3 -1
- package/build/esm/dev/instrumentations/instrumentDurableObjectStorage.js.map +1 -1
- package/build/esm/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js +3 -1
- package/build/esm/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -1
- package/build/esm/dev/instrumentations/instrumentSqlStorage.js +5 -2
- package/build/esm/dev/instrumentations/instrumentSqlStorage.js.map +1 -1
- package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js +9 -16
- package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentD1.js +11 -4
- package/build/esm/dev/instrumentations/worker/instrumentD1.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentEmail.js +7 -5
- package/build/esm/dev/instrumentations/worker/instrumentEmail.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentEnv.js +6 -13
- package/build/esm/dev/instrumentations/worker/instrumentEnv.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentFetch.js +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentFetch.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentQueue.js +7 -5
- package/build/esm/dev/instrumentations/worker/instrumentQueue.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentQueueProducer.js +4 -3
- package/build/esm/dev/instrumentations/worker/instrumentQueueProducer.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentR2.js +22 -19
- package/build/esm/dev/instrumentations/worker/instrumentR2.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentScheduled.js +7 -5
- package/build/esm/dev/instrumentations/worker/instrumentScheduled.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentTail.js +2 -0
- package/build/esm/dev/instrumentations/worker/instrumentTail.js.map +1 -1
- package/build/esm/dev/integrations/fetch.js +2 -12
- package/build/esm/dev/integrations/fetch.js.map +1 -1
- package/build/esm/dev/opentelemetry/tracer.js +2 -40
- package/build/esm/dev/opentelemetry/tracer.js.map +1 -1
- package/build/esm/dev/package.json +1 -1
- package/build/esm/dev/pages-plugin.js +1 -1
- package/build/esm/dev/pages-plugin.js.map +1 -1
- package/build/esm/dev/request.js +2 -122
- package/build/esm/dev/request.js.map +1 -1
- package/build/esm/dev/sdk.js +11 -7
- package/build/esm/dev/sdk.js.map +1 -1
- package/build/esm/dev/transport.js +1 -1
- package/build/esm/dev/transport.js.map +1 -1
- package/build/esm/dev/utils/invocationContext.js +37 -0
- package/build/esm/dev/utils/invocationContext.js.map +1 -0
- package/build/esm/dev/utils/invocationScope.js +7 -2
- package/build/esm/dev/utils/invocationScope.js.map +1 -1
- package/build/esm/dev/utils/isBinding.js +1 -4
- package/build/esm/dev/utils/isBinding.js.map +1 -1
- package/build/esm/dev/utils/rpcPropagation.js +13 -0
- package/build/esm/dev/utils/rpcPropagation.js.map +1 -0
- package/build/esm/dev/utils/traceLinks.js +1 -1
- package/build/esm/dev/vendor/stacktrace.js +2 -1
- package/build/esm/dev/vendor/stacktrace.js.map +1 -1
- package/build/esm/dev/vite/autoInstrument.js +2 -1
- package/build/esm/dev/vite/autoInstrument.js.map +1 -1
- package/build/esm/dev/vite/index.js.map +1 -1
- package/build/esm/dev/vite/transform.js +30 -5
- package/build/esm/dev/vite/transform.js.map +1 -1
- package/build/esm/dev/vite/wranglerConfig.js +21 -2
- package/build/esm/dev/vite/wranglerConfig.js.map +1 -1
- package/build/esm/dev/withSentry.js.map +1 -1
- package/build/esm/dev/workflows.js +48 -36
- package/build/esm/dev/workflows.js.map +1 -1
- package/build/esm/dev/wrapMethodWithSentry.js +53 -17
- package/build/esm/dev/wrapMethodWithSentry.js.map +1 -1
- package/build/esm/dev/wrapRequestHandlerWithInit.js +132 -0
- package/build/esm/dev/wrapRequestHandlerWithInit.js.map +1 -0
- package/build/esm/prod/baseSdk.js +21 -9
- package/build/esm/prod/baseSdk.js.map +1 -1
- package/build/esm/prod/client.js +118 -25
- package/build/esm/prod/client.js.map +1 -1
- package/build/esm/prod/clientCache.js +12 -0
- package/build/esm/prod/clientCache.js.map +1 -0
- package/build/esm/prod/defineCloudflareOptions.js.map +1 -1
- package/build/esm/prod/durableobject.js +5 -63
- package/build/esm/prod/durableobject.js.map +1 -1
- package/build/esm/prod/flush.js +6 -4
- package/build/esm/prod/flush.js.map +1 -1
- package/build/esm/prod/index.js +4 -4
- package/build/esm/prod/instrumentations/agents/instrumentAgentCallableRpc.js +4 -2
- package/build/esm/prod/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -1
- package/build/esm/prod/instrumentations/instrumentDurableObjectHandlers.js +121 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectHandlers.js.map +1 -0
- package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js +4 -4
- package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/esm/prod/instrumentations/instrumentDurableObjectStorage.js +3 -1
- package/build/esm/prod/instrumentations/instrumentDurableObjectStorage.js.map +1 -1
- package/build/esm/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js +3 -1
- package/build/esm/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -1
- package/build/esm/prod/instrumentations/instrumentSqlStorage.js +5 -2
- package/build/esm/prod/instrumentations/instrumentSqlStorage.js.map +1 -1
- package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js +9 -16
- package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentD1.js +11 -4
- package/build/esm/prod/instrumentations/worker/instrumentD1.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentEmail.js +7 -5
- package/build/esm/prod/instrumentations/worker/instrumentEmail.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentEnv.js +6 -13
- package/build/esm/prod/instrumentations/worker/instrumentEnv.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentFetch.js +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentFetch.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentQueue.js +7 -5
- package/build/esm/prod/instrumentations/worker/instrumentQueue.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentQueueProducer.js +4 -3
- package/build/esm/prod/instrumentations/worker/instrumentQueueProducer.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentR2.js +22 -19
- package/build/esm/prod/instrumentations/worker/instrumentR2.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentScheduled.js +7 -5
- package/build/esm/prod/instrumentations/worker/instrumentScheduled.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentTail.js +2 -0
- package/build/esm/prod/instrumentations/worker/instrumentTail.js.map +1 -1
- package/build/esm/prod/integrations/fetch.js +2 -12
- package/build/esm/prod/integrations/fetch.js.map +1 -1
- package/build/esm/prod/opentelemetry/tracer.js +2 -40
- package/build/esm/prod/opentelemetry/tracer.js.map +1 -1
- package/build/esm/prod/package.json +1 -1
- package/build/esm/prod/pages-plugin.js +1 -1
- package/build/esm/prod/pages-plugin.js.map +1 -1
- package/build/esm/prod/request.js +2 -122
- package/build/esm/prod/request.js.map +1 -1
- package/build/esm/prod/sdk.js +11 -7
- package/build/esm/prod/sdk.js.map +1 -1
- package/build/esm/prod/transport.js +1 -1
- package/build/esm/prod/transport.js.map +1 -1
- package/build/esm/prod/utils/invocationContext.js +37 -0
- package/build/esm/prod/utils/invocationContext.js.map +1 -0
- package/build/esm/prod/utils/invocationScope.js +7 -2
- package/build/esm/prod/utils/invocationScope.js.map +1 -1
- package/build/esm/prod/utils/isBinding.js +1 -4
- package/build/esm/prod/utils/isBinding.js.map +1 -1
- package/build/esm/prod/utils/rpcPropagation.js +13 -0
- package/build/esm/prod/utils/rpcPropagation.js.map +1 -0
- package/build/esm/prod/utils/traceLinks.js +1 -1
- package/build/esm/prod/vendor/stacktrace.js +2 -1
- package/build/esm/prod/vendor/stacktrace.js.map +1 -1
- package/build/esm/prod/vite/autoInstrument.js +2 -1
- package/build/esm/prod/vite/autoInstrument.js.map +1 -1
- package/build/esm/prod/vite/index.js.map +1 -1
- package/build/esm/prod/vite/transform.js +30 -5
- package/build/esm/prod/vite/transform.js.map +1 -1
- package/build/esm/prod/vite/wranglerConfig.js +21 -2
- package/build/esm/prod/vite/wranglerConfig.js.map +1 -1
- package/build/esm/prod/withSentry.js.map +1 -1
- package/build/esm/prod/workflows.js +48 -36
- package/build/esm/prod/workflows.js.map +1 -1
- package/build/esm/prod/wrapMethodWithSentry.js +53 -17
- package/build/esm/prod/wrapMethodWithSentry.js.map +1 -1
- package/build/esm/prod/wrapRequestHandlerWithInit.js +132 -0
- package/build/esm/prod/wrapRequestHandlerWithInit.js.map +1 -0
- package/build/types/baseSdk.d.ts +8 -0
- package/build/types/baseSdk.d.ts.map +1 -1
- package/build/types/client.d.ts +91 -18
- package/build/types/client.d.ts.map +1 -1
- package/build/types/clientCache.d.ts +8 -0
- package/build/types/clientCache.d.ts.map +1 -0
- package/build/types/defineCloudflareOptions.d.ts +3 -2
- package/build/types/defineCloudflareOptions.d.ts.map +1 -1
- package/build/types/durableobject.d.ts +5 -7
- package/build/types/durableobject.d.ts.map +1 -1
- package/build/types/flush.d.ts +2 -0
- package/build/types/flush.d.ts.map +1 -1
- package/build/types/index.d.ts +4 -4
- package/build/types/index.d.ts.map +1 -1
- package/build/types/instrumentations/agents/instrumentAgentCallableRpc.d.ts.map +1 -1
- package/build/types/instrumentations/instrumentDurableObjectHandlers.d.ts +28 -0
- package/build/types/instrumentations/instrumentDurableObjectHandlers.d.ts.map +1 -0
- package/build/types/instrumentations/instrumentDurableObjectNamespace.d.ts +2 -1
- package/build/types/instrumentations/instrumentDurableObjectNamespace.d.ts.map +1 -1
- package/build/types/instrumentations/instrumentDurableObjectStorage.d.ts.map +1 -1
- package/build/types/instrumentations/instrumentDurableObjectSyncKvStorage.d.ts.map +1 -1
- package/build/types/instrumentations/instrumentSqlStorage.d.ts.map +1 -1
- package/build/types/instrumentations/instrumentWorkerEntrypoint.d.ts +2 -3
- package/build/types/instrumentations/instrumentWorkerEntrypoint.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentD1.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentEmail.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentEnv.d.ts +0 -1
- package/build/types/instrumentations/worker/instrumentEnv.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentQueue.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentQueueProducer.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentR2.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentScheduled.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentTail.d.ts.map +1 -1
- package/build/types/integrations/fetch.d.ts.map +1 -1
- package/build/types/opentelemetry/tracer.d.ts.map +1 -1
- package/build/types/pages-plugin.d.ts +3 -1
- package/build/types/pages-plugin.d.ts.map +1 -1
- package/build/types/request.d.ts +5 -31
- package/build/types/request.d.ts.map +1 -1
- package/build/types/sdk.d.ts +13 -4
- package/build/types/sdk.d.ts.map +1 -1
- package/build/types/transport.d.ts.map +1 -1
- package/build/types/types.d.ts +28 -0
- package/build/types/types.d.ts.map +1 -1
- package/build/types/utils/invocationContext.d.ts +58 -0
- package/build/types/utils/invocationContext.d.ts.map +1 -0
- package/build/types/utils/invocationScope.d.ts +2 -1
- package/build/types/utils/invocationScope.d.ts.map +1 -1
- package/build/types/utils/isBinding.d.ts +1 -9
- package/build/types/utils/isBinding.d.ts.map +1 -1
- package/build/types/utils/rpcPropagation.d.ts +10 -0
- package/build/types/utils/rpcPropagation.d.ts.map +1 -0
- package/build/types/vendor/stacktrace.d.ts.map +1 -1
- package/build/types/vite/autoInstrument.d.ts.map +1 -1
- package/build/types/vite/index.d.ts +4 -0
- package/build/types/vite/index.d.ts.map +1 -1
- package/build/types/vite/transform.d.ts +3 -0
- package/build/types/vite/transform.d.ts.map +1 -1
- package/build/types/vite/wranglerConfig.d.ts +13 -0
- package/build/types/vite/wranglerConfig.d.ts.map +1 -1
- package/build/types/withSentry.d.ts +2 -3
- package/build/types/withSentry.d.ts.map +1 -1
- package/build/types/workflows.d.ts +3 -3
- package/build/types/workflows.d.ts.map +1 -1
- package/build/types/wrapMethodWithSentry.d.ts +6 -1
- package/build/types/wrapMethodWithSentry.d.ts.map +1 -1
- package/build/types/wrapRequestHandlerWithInit.d.ts +31 -0
- package/build/types/wrapRequestHandlerWithInit.d.ts.map +1 -0
- package/package.json +6 -4
- package/build/cjs/dev/instrumentations/worker/instrumentRateLimit.js +0 -29
- package/build/cjs/dev/instrumentations/worker/instrumentRateLimit.js.map +0 -1
- package/build/cjs/dev/integrations/tracing/vercelai.js +0 -18
- package/build/cjs/dev/integrations/tracing/vercelai.js.map +0 -1
- package/build/cjs/prod/instrumentations/worker/instrumentRateLimit.js +0 -29
- package/build/cjs/prod/instrumentations/worker/instrumentRateLimit.js.map +0 -1
- package/build/cjs/prod/integrations/tracing/vercelai.js +0 -18
- package/build/cjs/prod/integrations/tracing/vercelai.js.map +0 -1
- package/build/esm/dev/instrumentations/worker/instrumentRateLimit.js +0 -27
- package/build/esm/dev/instrumentations/worker/instrumentRateLimit.js.map +0 -1
- package/build/esm/dev/integrations/tracing/vercelai.js +0 -16
- package/build/esm/dev/integrations/tracing/vercelai.js.map +0 -1
- package/build/esm/prod/instrumentations/worker/instrumentRateLimit.js +0 -27
- package/build/esm/prod/instrumentations/worker/instrumentRateLimit.js.map +0 -1
- package/build/esm/prod/integrations/tracing/vercelai.js +0 -16
- package/build/esm/prod/integrations/tracing/vercelai.js.map +0 -1
- package/build/types/instrumentations/worker/instrumentRateLimit.d.ts +0 -6
- package/build/types/instrumentations/worker/instrumentRateLimit.d.ts.map +0 -1
- package/build/types/integrations/tracing/vercelai.d.ts +0 -39
- package/build/types/integrations/tracing/vercelai.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DurableObject } from 'cloudflare:workers';
|
|
2
2
|
import type { CloudflareOptions } from './client';
|
|
3
|
-
import type { DefaultEnv, ResolveEnv } from './types';
|
|
3
|
+
import type { DefaultEnv, ResolveEnv, StrictCloudflareOptions } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* The instrumented context passed between the shared construction helpers.
|
|
6
6
|
*
|
|
@@ -38,8 +38,7 @@ export declare function constructInstrumentedDurableObject<E, T extends DurableO
|
|
|
38
38
|
* visible to Cloudflare's RPC dispatcher. Built-in handlers, Agent handlers, and methods managed by
|
|
39
39
|
* another framework are left untouched.
|
|
40
40
|
*
|
|
41
|
-
* Call this after all per-instance instrumentation has been applied.
|
|
42
|
-
* disabled, the object is returned unchanged.
|
|
41
|
+
* Call this after all per-instance instrumentation has been applied.
|
|
43
42
|
*
|
|
44
43
|
* @param obj The constructed Durable Object instance.
|
|
45
44
|
* @param options The resolved SDK options for this instance.
|
|
@@ -59,8 +58,7 @@ export declare function finalizeWithRpcInstrumentation<T extends object>(obj: T,
|
|
|
59
58
|
* - webSocketClose
|
|
60
59
|
* - webSocketError
|
|
61
60
|
*
|
|
62
|
-
* RPC methods (prototype methods) are instrumented
|
|
63
|
-
* to `false` to opt out.
|
|
61
|
+
* RPC methods (prototype methods) are instrumented too, so an incoming trace continues into them.
|
|
64
62
|
*
|
|
65
63
|
* @param optionsCallback Function that returns the options for the SDK initialization.
|
|
66
64
|
* @param DurableObjectClass The Durable Object class to instrument.
|
|
@@ -83,7 +81,7 @@ export declare function finalizeWithRpcInstrumentation<T extends object>(obj: T,
|
|
|
83
81
|
* );
|
|
84
82
|
* ```
|
|
85
83
|
*/
|
|
86
|
-
export declare function instrumentDurableObjectWithSentry<Env = DefaultEnv, T extends DurableObject<any> = DurableObject<Env>, C extends new (state: DurableObjectState, env: any) => T = new (state: DurableObjectState, env: any) => T>(optionsCallback: (env: ResolveEnv<C, Env>) =>
|
|
84
|
+
export declare function instrumentDurableObjectWithSentry<Env = DefaultEnv, T extends DurableObject<any> = DurableObject<Env>, C extends new (state: DurableObjectState, env: any) => T = new (state: DurableObjectState, env: any) => T, O = unknown>(optionsCallback: (env: ResolveEnv<C, Env>) => StrictCloudflareOptions<O>, DurableObjectClass: C): C;
|
|
87
85
|
/**
|
|
88
86
|
* Instruments a Cloudflare [`agents`](https://www.npmjs.com/package/agents) Agent class with Sentry.
|
|
89
87
|
*
|
|
@@ -123,6 +121,6 @@ export declare function instrumentDurableObjectWithSentry<Env = DefaultEnv, T ex
|
|
|
123
121
|
* );
|
|
124
122
|
* ```
|
|
125
123
|
*/
|
|
126
|
-
export declare function instrumentAgentWithSentry<Env = DefaultEnv, T extends DurableObject<any> = DurableObject<Env>, C extends new (state: DurableObjectState, env: any) => T = new (state: DurableObjectState, env: any) => T>(optionsCallback: (env: ResolveEnv<C, Env>) =>
|
|
124
|
+
export declare function instrumentAgentWithSentry<Env = DefaultEnv, T extends DurableObject<any> = DurableObject<Env>, C extends new (state: DurableObjectState, env: any) => T = new (state: DurableObjectState, env: any) => T, O = unknown>(optionsCallback: (env: ResolveEnv<C, Env>) => StrictCloudflareOptions<O>, AgentClass: C): C;
|
|
127
125
|
export {};
|
|
128
126
|
//# sourceMappingURL=durableobject.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durableobject.d.ts","sourceRoot":"","sources":["../../src/durableobject.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"durableobject.d.ts","sourceRoot":"","sources":["../../src/durableobject.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAQlD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAG/E;;;;;;;;;;GAUG;AAEH,KAAK,gCAAgC,GAAG,GAAG,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,wBAAgB,kCAAkC,CAAC,CAAC,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAC9E,MAAM,EAAE,KAAK,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,EACpD,GAAG,EAAE,kBAAkB,EACvB,GAAG,EAAE,CAAC,EACN,SAAS,EAAE,eAAe,EAC1B,eAAe,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,iBAAiB,GAC7C;IACD,GAAG,EAAE,CAAC,CAAC;IACP,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,gCAAgC,CAAC;IAC1C,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC9C,CA4BA;AA0FD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,MAAM,EAC7D,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gCAAgC,EACzC,eAAe,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GACpC,CAAC,CAMH;AA6GD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,iCAAiC,CAC/C,GAAG,GAAG,UAAU,EAEhB,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,EAEjD,CAAC,SAAS,KAAK,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,GAAG,KAAK,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,EACzG,CAAC,GAAG,OAAO,EACX,eAAe,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,uBAAuB,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,GAAG,CAAC,CAcpG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,GAAG,UAAU,EAEhB,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,EAEjD,CAAC,SAAS,KAAK,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,GAAG,KAAK,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,EACzG,CAAC,GAAG,OAAO,EACX,eAAe,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,uBAAuB,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,CAoB5F"}
|
package/build/types/flush.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ export declare function makeFlushLock(context: ExecutionContextCompat): FlushLoc
|
|
|
32
32
|
/**
|
|
33
33
|
* Flushes the client and then disposes of it to allow garbage collection.
|
|
34
34
|
* This should be called at the end of each request to prevent memory leaks.
|
|
35
|
+
* Cached clients (`cacheClient`) are reused across invocations, so
|
|
36
|
+
* they are flushed but not disposed.
|
|
35
37
|
*
|
|
36
38
|
* This function never rejects. On Workers, a rejected promise passed to
|
|
37
39
|
* `ctx.waitUntil` marks the whole invocation as `outcome: exception` even when
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flush.d.ts","sourceRoot":"","sources":["../../src/flush.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC,CAAC;AAcF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAKnG;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,SAAS,CA8BxE;AAoCD
|
|
1
|
+
{"version":3,"file":"flush.d.ts","sourceRoot":"","sources":["../../src/flush.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC,CAAC;AAcF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAKnG;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,SAAS,CA8BxE;AAoCD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,SAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB/F"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export type { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, FeatureFlagsIntegration, Session, SeverityLevel, Span, StackFrame, Stacktrace, Thread, User, Metric, ExclusiveEventHintOrCaptureContext, CaptureContext, } from '@sentry/core';
|
|
2
2
|
export type { 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, eventFiltersIntegration, linkedErrorsIntegration, requestDataIntegration, extraErrorDataIntegration, dedupeIntegration, rewriteFramesIntegration, captureConsoleIntegration, moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient,
|
|
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, eventFiltersIntegration, linkedErrorsIntegration, requestDataIntegration, extraErrorDataIntegration, dedupeIntegration, rewriteFramesIntegration, captureConsoleIntegration, moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, consoleIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SENTRY_SEGMENT_NAME_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, spanToStaticSpanJSON, spanToJSON, spanToTraceHeader, spanToBaggageHeader, updateSpanName, consoleLoggingIntegration, createConsolaReporter, featureFlagsIntegration, growthbookIntegration, logger, metrics, withStaticSpan, withStreamedSpan, spanStreamingIntegration, } from '@sentry/core';
|
|
4
|
+
export { instrumentPostgresJsSql, trpcMiddleware, wrapMcpServerWithSentry } from '@sentry/core/server';
|
|
4
5
|
export { withSentry } from './withSentry';
|
|
5
6
|
export { defineCloudflareOptions } from './defineCloudflareOptions';
|
|
6
7
|
export { instrumentAgentWithSentry, instrumentDurableObjectWithSentry } from './durableobject';
|
|
7
8
|
export { sentryPagesPlugin } from './pages-plugin';
|
|
8
9
|
export { CloudflareClient } from './client';
|
|
9
|
-
export { getDefaultIntegrations } from './sdk';
|
|
10
|
+
export { _INTERNAL_wrapRequestHandler, getDefaultIntegrations } from './sdk';
|
|
10
11
|
export { httpServerIntegration } from './integrations/httpServer';
|
|
11
12
|
export { fetchIntegration } from './integrations/fetch';
|
|
12
13
|
export { spotlightIntegration } from './integrations/spotlight';
|
|
13
|
-
export { vercelAIIntegration } from '
|
|
14
|
-
export { otlpIntegration, getOtlpTracesEndpoint, prismaIntegration, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, instrumentWorkersAiClient, createLangChainCallbackHandler, instrumentLangChainEmbeddings, instrumentStateGraph, instrumentCreateReactAgent, } from '@sentry/server-utils';
|
|
14
|
+
export { openTelemetryIntegration, getOtlpTracesEndpoint, prismaIntegration, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, instrumentWorkersAiClient, createLangChainCallbackHandler, instrumentLangChainEmbeddings, instrumentStateGraph, instrumentCreateReactAgent, vercelAIIntegration, } from '@sentry/server-utils';
|
|
15
15
|
export { instrumentWorkflowWithSentry } from './workflows';
|
|
16
16
|
export { setAsyncLocalStorageAsyncContextStrategy } from '@sentry/server-utils/no-diagnostic-channels';
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,uBAAuB,EACvB,OAAO,EACP,aAAa,EACb,IAAI,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,EACJ,MAAM,EACN,kCAAkC,EAClC,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,KAAK,EACL,eAAe,EACf,WAAW,EACX,KAAK,EACL,SAAS,EACT,aAAa,EACb,SAAS,EACT,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,YAAY,EACZ,aAAa,EACb,OAAO,EACP,iBAAiB,EACjB,yBAAyB,EACzB,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,cAAc,EACd,aAAa,EACb,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,2BAA2B,EAC3B,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,wBAAwB,EACxB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,uBAAuB,EACvB,OAAO,EACP,aAAa,EACb,IAAI,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,EACJ,MAAM,EACN,kCAAkC,EAClC,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,KAAK,EACL,eAAe,EACf,WAAW,EACX,KAAK,EACL,SAAS,EACT,aAAa,EACb,SAAS,EACT,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,YAAY,EACZ,aAAa,EACb,OAAO,EACP,iBAAiB,EACjB,yBAAyB,EACzB,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,cAAc,EACd,aAAa,EACb,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,2BAA2B,EAC3B,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,4BAA4B,EAC5B,gCAAgC,EAChC,0BAA0B,EAC1B,qCAAqC,EACrC,oBAAoB,EACpB,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,yBAAyB,EACzB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,MAAM,EACN,OAAO,EACP,cAAc,EAEd,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEvG,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,iCAAiC,EAAE,MAAM,iBAAiB,CAAC;AAC/F,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAE7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,2BAA2B,EAC3B,yBAAyB,EACzB,8BAA8B,EAC9B,6BAA6B,EAC7B,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,wCAAwC,EAAE,MAAM,6CAA6C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentAgentCallableRpc.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/agents/instrumentAgentCallableRpc.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"instrumentAgentCallableRpc.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/agents/instrumentAgentCallableRpc.ts"],"names":[],"mappings":"AAIA,OAAO,EAAqB,KAAK,cAAc,EAA8C,MAAM,SAAS,CAAC;AAE7G;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI,CA+BpE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { DurableObject } from 'cloudflare:workers';
|
|
2
|
+
import type { CloudflareOptions } from '../client';
|
|
3
|
+
/**
|
|
4
|
+
* The instrumented context of the Durable Object being wrapped.
|
|
5
|
+
*
|
|
6
|
+
* Kept as `any` for the same reason as in `durableobject.ts`: a concrete `DurableObjectState` here
|
|
7
|
+
* makes `tsc` relate its `SqlStorage` graph against the parameter union of `wrapMethodWithSentry`,
|
|
8
|
+
* which hangs the type build.
|
|
9
|
+
*/
|
|
10
|
+
type InstrumentedDurableObjectContext = any;
|
|
11
|
+
/**
|
|
12
|
+
* Instruments the built-in Durable Object handler methods on a constructed instance.
|
|
13
|
+
*
|
|
14
|
+
* These are the methods that are available on a Durable Object
|
|
15
|
+
* ref: https://developers.cloudflare.com/durable-objects/api/base/
|
|
16
|
+
* - obj.alarm
|
|
17
|
+
* - obj.fetch
|
|
18
|
+
* - obj.webSocketError
|
|
19
|
+
* - obj.webSocketClose
|
|
20
|
+
* - obj.webSocketMessage
|
|
21
|
+
*
|
|
22
|
+
* Any other public methods on the Durable Object instance are RPC calls.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function instrumentDurableObjectHandlers<E, T extends DurableObject<E>>(obj: T, options: CloudflareOptions, context: InstrumentedDurableObjectContext): void;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=instrumentDurableObjectHandlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentDurableObjectHandlers.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentDurableObjectHandlers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAOnD;;;;;;GAMG;AAEH,KAAK,gCAAgC,GAAG,GAAG,CAAC;AAE5C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,+BAA+B,CAAC,CAAC,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAC3E,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gCAAgC,GACxC,IAAI,CAqGN"}
|
|
@@ -8,6 +8,7 @@ export declare const STUB_NON_RPC_METHODS: Set<string>;
|
|
|
8
8
|
* - `namespace.idFromName(name)` / `namespace.idFromString(id)` / `namespace.newUniqueId()` with breadcrumbs
|
|
9
9
|
*
|
|
10
10
|
* @param namespace - The DurableObjectNamespace to instrument
|
|
11
|
+
* @param propagateRpcTrace - Whether RPC method calls on the returned stubs carry trace context
|
|
11
12
|
*/
|
|
12
|
-
export declare function instrumentDurableObjectNamespace(namespace: DurableObjectNamespace): DurableObjectNamespace;
|
|
13
|
+
export declare function instrumentDurableObjectNamespace(namespace: DurableObjectNamespace, propagateRpcTrace?: boolean): DurableObjectNamespace;
|
|
13
14
|
//# sourceMappingURL=instrumentDurableObjectNamespace.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentDurableObjectNamespace.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentDurableObjectNamespace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAqB,MAAM,2BAA2B,CAAC;AAK3F,eAAO,MAAM,oBAAoB,aAAuC,CAAC;AAEzE
|
|
1
|
+
{"version":3,"file":"instrumentDurableObjectNamespace.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentDurableObjectNamespace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAqB,MAAM,2BAA2B,CAAC;AAK3F,eAAO,MAAM,oBAAoB,aAAuC,CAAC;AAEzE;;;;;;;;;GASG;AACH,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,sBAAsB,EACjC,iBAAiB,UAAQ,GACxB,sBAAsB,CAoBxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentDurableObjectStorage.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentDurableObjectStorage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAA6B,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentDurableObjectStorage.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentDurableObjectStorage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAA6B,MAAM,2BAA2B,CAAC;AAcjG,KAAK,SAAS,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,oBAAoB,EAC7B,SAAS,CAAC,EAAE,SAAS,GACpB,oBAAoB,CAkFtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentDurableObjectSyncKvStorage.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentDurableObjectSyncKvStorage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentDurableObjectSyncKvStorage.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentDurableObjectSyncKvStorage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAS/D,wBAAgB,oCAAoC,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAmCzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentSqlStorage.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentSqlStorage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentSqlStorage.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentSqlStorage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQ5D;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAyChE"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { WorkerEntrypoint } from 'cloudflare:workers';
|
|
2
|
-
import type {
|
|
3
|
-
import type { DefaultEnv, ResolveEnv } from '../types';
|
|
2
|
+
import type { DefaultEnv, ResolveEnv, StrictCloudflareOptions } from '../types';
|
|
4
3
|
export type WorkerEntrypointConstructor<Env = unknown, Props = {}> = new (ctx: ExecutionContext, env: any) => InstanceType<typeof WorkerEntrypoint<Env, Props>>;
|
|
5
4
|
/**
|
|
6
5
|
* Instruments a WorkerEntrypoint class to capture errors and performance data.
|
|
@@ -39,5 +38,5 @@ export type WorkerEntrypointConstructor<Env = unknown, Props = {}> = new (ctx: E
|
|
|
39
38
|
* );
|
|
40
39
|
* ```
|
|
41
40
|
*/
|
|
42
|
-
export declare function instrumentWorkerEntrypoint<Env = DefaultEnv, Props = {}, T extends WorkerEntrypoint<any, any> = WorkerEntrypoint<Env, Props>, C extends new (ctx: ExecutionContext, env: any) => T = new (ctx: ExecutionContext, env: any) => T>(optionsCallback: (env: ResolveEnv<C, Env>) =>
|
|
41
|
+
export declare function instrumentWorkerEntrypoint<Env = DefaultEnv, Props = {}, T extends WorkerEntrypoint<any, any> = WorkerEntrypoint<Env, Props>, C extends new (ctx: ExecutionContext, env: any) => T = new (ctx: ExecutionContext, env: any) => T, O = unknown>(optionsCallback: (env: ResolveEnv<C, Env>) => StrictCloudflareOptions<O> | undefined, WorkerEntrypointClass: C): C;
|
|
43
42
|
//# sourceMappingURL=instrumentWorkerEntrypoint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentWorkerEntrypoint.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentWorkerEntrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentWorkerEntrypoint.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentWorkerEntrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKpE,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAoChF,MAAM,MAAM,2BAA2B,CAAC,GAAG,GAAG,OAAO,EAAE,KAAK,GAAG,EAAE,IAAI,KACnE,GAAG,EAAE,gBAAgB,EAGrB,GAAG,EAAE,GAAG,KACL,YAAY,CAAC,OAAO,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAyDvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,GAAG,UAAU,EAChB,KAAK,GAAG,EAAE,EAEV,CAAC,SAAS,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,EAEnE,CAAC,SAAS,KAAK,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,EACjG,CAAC,GAAG,OAAO,EACX,eAAe,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,uBAAuB,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,qBAAqB,EAAE,CAAC,GAAG,CAAC,CAkFnH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentD1.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentD1.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAsD,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentD1.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentD1.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAsD,MAAM,2BAA2B,CAAC;AAoOhH,wBAAgB,YAAY,CAAC,EAAE,EAAE,UAAU,GAAG,UAAU,CAEvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentEmail.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentEmail.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentEmail.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentEmail.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAI/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAqDtD;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,kBAAkB,EACzE,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN"}
|
|
@@ -8,7 +8,6 @@ import type { CloudflareOptions } from '../../client';
|
|
|
8
8
|
* - Service bindings / JSRPC proxies
|
|
9
9
|
* - Queue producers (via `send` + `sendBatch` duck-typing)
|
|
10
10
|
* - R2 Buckets (via `head` + `put` + `createMultipartUpload` duck-typing)
|
|
11
|
-
* - Rate limiters (via `limit` duck-typing)
|
|
12
11
|
* - Workers AI (via `run` + `gateway` + `toMarkdown` duck-typing)
|
|
13
12
|
*
|
|
14
13
|
* @param env - The Cloudflare env object to instrument
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentEnv.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentEnv.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentEnv.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentEnv.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAuBtD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,GAAG,CAoF7G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentQueue.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentQueue.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentQueue.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentQueue.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAIjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AA2DtD;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,kBAAkB,EACzE,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,CAAC,SAAS,gBAAgB,EACxE,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gBAAgB,GACxB,IAAI,CAaN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentQueueProducer.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentQueueProducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,KAAK,EAA2C,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentQueueProducer.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentQueueProducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAsB,KAAK,EAA2C,MAAM,2BAA2B,CAAC;AA2DpH;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAsCzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentR2.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentR2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAoC,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentR2.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentR2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAoC,MAAM,2BAA2B,CAAC;AA4H5F;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAuCxF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentScheduled.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentScheduled.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentScheduled.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentScheduled.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAIjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAoDtD;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,CAAC,SAAS,kBAAkB,EAC7E,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,CAAC,SAAS,gBAAgB,EAC5E,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gBAAgB,GACxB,IAAI,CAaN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentTail.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentTail.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentTail.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentTail.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAoCtD;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,kBAAkB,EACxE,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,gBAAgB,EACvE,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gBAAgB,GACxB,IAAI,CAWN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/integrations/fetch.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,0BAA0B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACvD;
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/integrations/fetch.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,0BAA0B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACvD;AAoED;;GAEG;AACH,eAAO,MAAM,gBAAgB;;CAAuC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracer.d.ts","sourceRoot":"","sources":["../../../src/opentelemetry/tracer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tracer.d.ts","sourceRoot":"","sources":["../../../src/opentelemetry/tracer.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CloudflareOptions } from './client';
|
|
2
|
+
import type { StrictCloudflareOptions } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* Plugin middleware for Cloudflare Pages.
|
|
4
5
|
*
|
|
@@ -30,5 +31,6 @@ import type { CloudflareOptions } from './client';
|
|
|
30
31
|
* @param handlerOrOptions Configuration options or a function that returns configuration options.
|
|
31
32
|
* @returns A plugin function that can be used in Cloudflare Pages.
|
|
32
33
|
*/
|
|
33
|
-
export declare function sentryPagesPlugin<Env = any, Params extends string = any, Data extends Record<string, unknown> = Record<string, unknown>, PluginParams = any>(
|
|
34
|
+
export declare function sentryPagesPlugin<Env = any, Params extends string = any, Data extends Record<string, unknown> = Record<string, unknown>, PluginParams = any, O = unknown>(handler: (context: EventPluginContext<Env, Params, Data, PluginParams>) => StrictCloudflareOptions<O>): PagesPluginFunction<Env, Params, Data, PluginParams>;
|
|
35
|
+
export declare function sentryPagesPlugin<Env = any, Params extends string = any, Data extends Record<string, unknown> = Record<string, unknown>, PluginParams = any>(options: CloudflareOptions): PagesPluginFunction<Env, Params, Data, PluginParams>;
|
|
34
36
|
//# sourceMappingURL=pages-plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages-plugin.d.ts","sourceRoot":"","sources":["../../src/pages-plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"pages-plugin.d.ts","sourceRoot":"","sources":["../../src/pages-plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIlD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAKH,wBAAgB,iBAAiB,CAE/B,GAAG,GAAG,GAAG,EAET,MAAM,SAAS,MAAM,GAAG,GAAG,EAC3B,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAE9D,YAAY,GAAG,GAAG,EAClB,CAAC,GAAG,OAAO,EAEX,OAAO,EAAE,CAAC,OAAO,EAAE,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,KAAK,uBAAuB,CAAC,CAAC,CAAC,GACpG,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;AACxD,wBAAgB,iBAAiB,CAE/B,GAAG,GAAG,GAAG,EAET,MAAM,SAAS,MAAM,GAAG,GAAG,EAC3B,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAE9D,YAAY,GAAG,GAAG,EAClB,OAAO,EAAE,iBAAiB,GAAG,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC"}
|
package/build/types/request.d.ts
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
import type { ExecutionContextCompat } from './executionContext';
|
|
4
|
-
interface RequestHandlerWrapperOptions {
|
|
5
|
-
options: CloudflareOptions;
|
|
6
|
-
request: Request<unknown, IncomingRequestCfProperties<unknown> | CfProperties<unknown>>;
|
|
7
|
-
context: ExecutionContextCompat | undefined;
|
|
8
|
-
/**
|
|
9
|
-
* If true, errors will be captured, rethrown and sent to Sentry.
|
|
10
|
-
* Otherwise, errors are rethrown but not captured.
|
|
11
|
-
*
|
|
12
|
-
* You most likely don't want to set this to `false`, if you use `wrapRequestHandler` directly.
|
|
13
|
-
* This is primarily meant as an escape hatch for higher-level SDKs relying on additional error
|
|
14
|
-
* capturing mechanisms where this wrapper captures errors too early or too generally.
|
|
15
|
-
*
|
|
16
|
-
* @default true
|
|
17
|
-
*/
|
|
18
|
-
captureErrors?: boolean;
|
|
19
|
-
}
|
|
20
|
-
type InitSdk = (options: CloudflareOptions) => CloudflareClient | undefined;
|
|
1
|
+
import type { CloudflareOptions } from './client';
|
|
2
|
+
import { type RequestHandlerWrapperOptions } from './wrapRequestHandlerWithInit';
|
|
21
3
|
/**
|
|
22
4
|
* Wraps a cloudflare request handler in Sentry instrumentation.
|
|
23
5
|
*
|
|
@@ -26,15 +8,7 @@ type InitSdk = (options: CloudflareOptions) => CloudflareClient | undefined;
|
|
|
26
8
|
* Oxygen). On a runtime that has `nodejs_compat`, pass `defaultIntegrations:
|
|
27
9
|
* getDefaultIntegrations(options)` in `options` to get the full set instead.
|
|
28
10
|
*/
|
|
29
|
-
export declare function wrapRequestHandler(wrapperOptions: RequestHandlerWrapperOptions,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
*
|
|
33
|
-
* Wrappers that are only reachable from the main entry point — where `nodejs_compat` is a
|
|
34
|
-
* requirement anyway — pass `init` from `sdk.ts` to get the full default integrations.
|
|
35
|
-
*
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
|
-
export declare function wrapRequestHandlerWithInit(wrapperOptions: RequestHandlerWrapperOptions, handler: (...args: unknown[]) => Response | Promise<Response>, initSdk: InitSdk): Promise<Response>;
|
|
39
|
-
export {};
|
|
11
|
+
export declare function wrapRequestHandler(wrapperOptions: Omit<RequestHandlerWrapperOptions, 'options'> & {
|
|
12
|
+
options: Omit<CloudflareOptions, 'enableOpenTelemetrySetup'>;
|
|
13
|
+
}, handler: (...args: unknown[]) => Response | Promise<Response>): Promise<Response>;
|
|
40
14
|
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,KAAK,4BAA4B,EAA8B,MAAM,8BAA8B,CAAC;AAE7G;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,IAAI,CAAC,4BAA4B,EAAE,SAAS,CAAC,GAAG;IAG9D,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,0BAA0B,CAAC,CAAC;CAC9D,EACD,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAC5D,OAAO,CAAC,QAAQ,CAAC,CAEnB"}
|
package/build/types/sdk.d.ts
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import type { Integration } from '@sentry/core';
|
|
2
2
|
import type { CloudflareClient, CloudflareOptions } from './client';
|
|
3
|
+
import { type RequestHandlerWrapperOptions } from './wrapRequestHandlerWithInit';
|
|
4
|
+
export { _clearGlobalClientCache } from './clientCache';
|
|
3
5
|
/**
|
|
4
6
|
* Get the default integrations for the Cloudflare SDK.
|
|
5
|
-
*
|
|
6
|
-
* This is the full set and requires the `nodejs_compat` compatibility flag. Runtimes that cannot
|
|
7
|
-
* enable it (e.g. Shopify Oxygen) go through `wrapRequestHandler`, which only sets up
|
|
8
|
-
* `getBaseDefaultIntegrations`.
|
|
9
7
|
*/
|
|
10
8
|
export declare function getDefaultIntegrations(options: CloudflareOptions): Integration[];
|
|
11
9
|
/**
|
|
12
10
|
* Initializes the cloudflare SDK.
|
|
13
11
|
*/
|
|
14
12
|
export declare function init(options: CloudflareOptions): CloudflareClient | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* `wrapRequestHandler` backed by `init`, so the request gets the full default integrations and
|
|
15
|
+
* honors `enableOpenTelemetrySetup`. The `@sentry/cloudflare/request` variant deliberately skips
|
|
16
|
+
* both to stay usable without `nodejs_compat`.
|
|
17
|
+
*
|
|
18
|
+
* For framework SDKs building on the main entry point, e.g. SvelteKit, whose OpenTelemetry spans
|
|
19
|
+
* need the tracer provider.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function _INTERNAL_wrapRequestHandler(wrapperOptions: RequestHandlerWrapperOptions, handler: (...args: unknown[]) => Response | Promise<Response>): Promise<Response>;
|
|
15
24
|
//# sourceMappingURL=sdk.d.ts.map
|
package/build/types/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEpE,OAAO,EAAE,KAAK,4BAA4B,EAA8B,MAAM,8BAA8B,CAAC;AAG7G,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAExD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,WAAW,EAAE,CAEhF;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,SAAS,CAY7E;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,4BAA4B,EAC5C,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAC5D,OAAO,CAAC,QAAQ,CAAC,CAEnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,4BAA4B,EAAoB,MAAM,cAAc,CAAC;AAGpH,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB;IACtE,iFAAiF;IACjF,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,iCAAiC;IACjC,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B;
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,4BAA4B,EAAoB,MAAM,cAAc,CAAC;AAGpH,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB;IACtE,iFAAiF;IACjF,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,iCAAiC;IACjC,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B;AAUD;;;;;;;GAOG;AACH,qBAAa,qBAAqB;IAGzB,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC,CAAC;IAE3D,OAAO,CAAC,cAAc,CAAsD;IAE5E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IAErC,YAAmB,WAAW,SAAgC,EAI7D;IAED;;OAEG;IACI,GAAG,CAAC,YAAY,EAAE,MAAM,WAAW,CAAC,4BAA4B,CAAC,GAAG,WAAW,CAAC,4BAA4B,CAAC,CAOnH;IAED;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAyBnD;CACF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,0BAA0B,GAAG,SAAS,CAkCtF"}
|
package/build/types/types.d.ts
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
import type { env as cloudflareEnv } from 'cloudflare:workers';
|
|
2
|
+
import type { CloudflareOptions } from './client';
|
|
2
3
|
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
4
|
+
/**
|
|
5
|
+
* `CloudflareOptions` for the options *callbacks*, where the excess property check does not reach.
|
|
6
|
+
*
|
|
7
|
+
* A plain `CloudflareOptions` parameter already rejects unknown keys when the caller writes a
|
|
8
|
+
* direct object literal, which is why it is enough everywhere else. That check only applies to
|
|
9
|
+
* literals TypeScript still sees as "fresh", though, and freshness is lost across a function
|
|
10
|
+
* boundary — the literal returned from `withSentry(() => ({ dsn, tracesSampleRte: 1 }), handler)`
|
|
11
|
+
* is compared as part of a function type, so the typo passes. Since `env` only exists at request
|
|
12
|
+
* time, a callback is the only way to configure these APIs, so the check has to be rebuilt:
|
|
13
|
+
* inferring the literal into `O` and intersecting it with a `never` map over its extra keys puts
|
|
14
|
+
* the error back on the offending property.
|
|
15
|
+
*
|
|
16
|
+
* `O` is deliberately unconstrained: a `CloudflareOptions` constraint makes inference fail for an
|
|
17
|
+
* options object whose keys are *all* unknown, and TypeScript then silently falls back to the type
|
|
18
|
+
* parameter default instead of reporting anything. The `CloudflareOptions` member of the
|
|
19
|
+
* intersection carries the actual check on known keys.
|
|
20
|
+
*
|
|
21
|
+
* The function-rejecting branch keeps "returned the options factory instead of calling it" an
|
|
22
|
+
* error. A plain `CloudflareOptions` target rejects functions via the weak type check (no shared
|
|
23
|
+
* properties), but an intersection is only weak-type checked when every member is weak, and the
|
|
24
|
+
* `Record` member has no properties at all — so without the guard a function would slip through.
|
|
25
|
+
* `keyof` of a function type is `never`, so the never-map alone cannot catch it.
|
|
26
|
+
*
|
|
27
|
+
* Two known gaps: this only covers top level keys, and unlike a plain excess property check it
|
|
28
|
+
* also rejects a pre-built object carrying extra keys.
|
|
29
|
+
*/
|
|
30
|
+
export type StrictCloudflareOptions<O> = O extends (...args: never[]) => unknown ? never : O & CloudflareOptions & Record<Exclude<keyof O, keyof CloudflareOptions>, never>;
|
|
3
31
|
/**
|
|
4
32
|
* A handler method of an `ExportedHandler` (`fetch`, `scheduled`, `queue`, ...).
|
|
5
33
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,GAC5E,KAAK,GACL,CAAC,GAAG,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,iBAAiB,CAAC,EAAE,KAAK,CAAC,CAAC;AAErF;;GAEG;AAEH,KAAK,gBAAgB,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC;AAEhE;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,IAAI,CAAC,EAAE,gBAAgB,CAAC;CACzB;AAED,KAAK,iBAAiB,GAAG,MAAM,kBAAkB,CAAC;AAElD;;;;;GAKG;AAEH,KAAK,aAAa,CAAC,MAAM,IACvB,KAAK,CAAC,MAAM,CAAC,SAAS,IAAI,GACtB,KAAK,GAEL,MAAM,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,GAAG,GAC1D,GAAG,GACH,KAAK,CAAC;AAEd;;;;;;;;GAQG;AACH,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,kBAAkB,GACtD;KACG,CAAC,IAAI,iBAAiB,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK;CAC1E,CAAC,iBAAiB,CAAC,GACpB,KAAK,CAAC;AAEV;;;;;GAKG;AAEH,KAAK,uBAAuB,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,GAAG,GAAG,GAAG,KAAK,CAAC;AAEhG;;;GAGG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAC9D,uBAAuB,CAAC,CAAC,CAAC,GAC1B,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAE3B;;;;GAIG;AAEH,KAAK,kBAAkB,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;AAE7F;;;;;;;;;;GAUG;AACH,MAAM,MAAM,UAAU,CAAC,OAAO,EAAE,WAAW,IACzC,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,IAAI,GACrD,WAAW,GACX,OAAO,SAAS,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,GACnD,WAAW,GACX,CAAC,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GACrD,WAAW,GACX,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,OAAO,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,GAEjE,GAAG,GACH,OAAO,aAAa,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ExecutionContext } from '@cloudflare/workers-types';
|
|
2
|
+
import type { Scope } from '@sentry/core';
|
|
3
|
+
import type { ExecutionContextCompat } from '../executionContext';
|
|
4
|
+
/**
|
|
5
|
+
* State owned by a single invocation (request, RPC call, cron, ...).
|
|
6
|
+
*
|
|
7
|
+
* A cached client (`cacheClient`) is shared by all invocations running in the same
|
|
8
|
+
* isolate, so anything invocation-owned must not live on the client: two overlapping
|
|
9
|
+
* requests would otherwise overwrite each other's state (e.g. the execution context
|
|
10
|
+
* used to register eager flushes) and the earlier invocation's envelopes would be
|
|
11
|
+
* suspended when the later invocation ends.
|
|
12
|
+
*
|
|
13
|
+
* The state rides on the invocation's forked isolation scope, which the async
|
|
14
|
+
* context strategy (AsyncLocalStorage) hands back for exactly the async context that
|
|
15
|
+
* owns the invocation — including detached continuations created inside it. A symbol
|
|
16
|
+
* key keeps it off `Scope.clone()` and out of serialized event data.
|
|
17
|
+
*/
|
|
18
|
+
export interface InvocationState {
|
|
19
|
+
/**
|
|
20
|
+
* The execution context of the invocation that owns this scope. Eager envelope
|
|
21
|
+
* sends are registered with this context's `waitUntil`, so they are attributed to
|
|
22
|
+
* the invocation that captured the data even when invocations overlap.
|
|
23
|
+
*/
|
|
24
|
+
readonly ctx: ExecutionContextCompat | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Set on the client's `flush` hook, the invocation's natural flush point.
|
|
27
|
+
* Captures before it are drained by that flush; captures after it (in
|
|
28
|
+
* `waitUntil` work or detached continuations) have no later flush to ride and
|
|
29
|
+
* are delivered eagerly.
|
|
30
|
+
*/
|
|
31
|
+
flushPointReached?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* `ctx.waitUntil` resolved once for this invocation (see `getInvocationWaitUntil`).
|
|
34
|
+
* `null` once resolved to "no usable waitUntil".
|
|
35
|
+
*/
|
|
36
|
+
waitUntil?: ExecutionContext['waitUntil'] | null;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Returns the invocation's original (un-instrumented) `waitUntil`, bound to its context,
|
|
40
|
+
* resolving it on first use and caching it on the state. Reading `ctx.waitUntil` on a
|
|
41
|
+
* native `ExecutionContext`/`DurableObjectState` goes through the runtime's property
|
|
42
|
+
* getter every time; one read per invocation is enough.
|
|
43
|
+
*/
|
|
44
|
+
export declare function getInvocationWaitUntil(state: InvocationState): ExecutionContext['waitUntil'] | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Attaches invocation state to a forked isolation scope. Only meaningful on a scope
|
|
47
|
+
* that outlives nothing but this invocation — never attach to the default isolation
|
|
48
|
+
* scope, which is shared by every invocation in the isolate.
|
|
49
|
+
*/
|
|
50
|
+
export declare function setInvocationState(scope: Scope, state: InvocationState): void;
|
|
51
|
+
/**
|
|
52
|
+
* Returns the state of the invocation that owns the current async context, or
|
|
53
|
+
* `undefined` outside any instrumented invocation (the default isolation scope is
|
|
54
|
+
* shared, so state read from it could not be attributed to one invocation — and it
|
|
55
|
+
* is never attached there in the first place).
|
|
56
|
+
*/
|
|
57
|
+
export declare function getInvocationState(): InvocationState | undefined;
|
|
58
|
+
//# sourceMappingURL=invocationContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invocationContext.d.ts","sourceRoot":"","sources":["../../../src/utils/invocationContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,GAAG,EAAE,sBAAsB,GAAG,SAAS,CAAC;IACjD;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;CAClD;AAID;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CAAC,WAAW,CAAC,GAAG,SAAS,CAaxG;AAMD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI,CAU7E;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,GAAG,SAAS,CAMhE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Scope } from '@sentry/core';
|
|
2
|
+
import type { ExecutionContextCompat } from '../executionContext';
|
|
2
3
|
/**
|
|
3
4
|
* Runs `callback` on the isolation scope for the current invocation.
|
|
4
5
|
*
|
|
@@ -20,5 +21,5 @@ import { type Scope } from '@sentry/core';
|
|
|
20
21
|
* default scope even inside an invocation; there the fork degrades to a no-op, which the stack strategy
|
|
21
22
|
* tolerates. This matches the approach used by `patchEventHandler` in Nuxt.
|
|
22
23
|
*/
|
|
23
|
-
export declare function withInvocationIsolationScope<T>(callback: (scope: Scope) => T): T;
|
|
24
|
+
export declare function withInvocationIsolationScope<T>(callback: (scope: Scope) => T, context?: ExecutionContextCompat): T;
|
|
24
25
|
//# sourceMappingURL=invocationScope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocationScope.d.ts","sourceRoot":"","sources":["../../../src/utils/invocationScope.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,KAAK,EAAsB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"invocationScope.d.ts","sourceRoot":"","sources":["../../../src/utils/invocationScope.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,KAAK,EAAsB,MAAM,cAAc,CAAC;AAC3G,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,CAAC,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,CAAC,CAWlH"}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
31
31
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
32
32
|
*/
|
|
33
|
-
import type { Ai, D1Database, DurableObjectNamespace, Queue, R2Bucket
|
|
33
|
+
import type { Ai, D1Database, DurableObjectNamespace, Queue, R2Bucket } from '@cloudflare/workers-types';
|
|
34
34
|
/**
|
|
35
35
|
* Checks if a value is a JSRPC proxy (service binding).
|
|
36
36
|
*
|
|
@@ -66,12 +66,4 @@ export declare function isAiBinding(item: unknown): item is Ai;
|
|
|
66
66
|
* R2Bucket has `head`, `put`, and `createMultipartUpload` methods.
|
|
67
67
|
*/
|
|
68
68
|
export declare function isR2Bucket(item: unknown): item is R2Bucket;
|
|
69
|
-
/**
|
|
70
|
-
* Duck-type check for RateLimit bindings.
|
|
71
|
-
* RateLimit only exposes a single `limit` method. Because that is a fairly
|
|
72
|
-
* common method name, this check is intentionally run after the more specific
|
|
73
|
-
* binding checks (Queue, R2, D1) in `instrumentEnv`, so those win when a binding
|
|
74
|
-
* also happens to expose `limit`.
|
|
75
|
-
*/
|
|
76
|
-
export declare function isRateLimit(item: unknown): item is RateLimit;
|
|
77
69
|
//# sourceMappingURL=isBinding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isBinding.d.ts","sourceRoot":"","sources":["../../../src/utils/isBinding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,UAAU,EAAE,sBAAsB,EAAE,KAAK,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"isBinding.d.ts","sourceRoot":"","sources":["../../../src/utils/isBinding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,UAAU,EAAE,sBAAsB,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEzG;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,OAAO,CAMtD;AAID;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,sBAAsB,CAEtF;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,KAAK,CAEpD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,UAAU,CAQ9D;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,EAAE,CAQrD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,QAAQ,CAQ1D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CloudflareOptions } from '../client';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the per-binding predicate that decides whether a binding takes part in RPC trace
|
|
4
|
+
* propagation.
|
|
5
|
+
*
|
|
6
|
+
* Callers only. Receivers continue an incoming trace whenever one arrives, so they have nothing to
|
|
7
|
+
* match against.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createRpcPropagationResolver(options: CloudflareOptions | undefined): (bindingName: string) => boolean;
|
|
10
|
+
//# sourceMappingURL=rpcPropagation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpcPropagation.d.ts","sourceRoot":"","sources":["../../../src/utils/rpcPropagation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAInD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,iBAAiB,GAAG,SAAS,GAAG,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAUrH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stacktrace.d.ts","sourceRoot":"","sources":["../../../src/vendor/stacktrace.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAsC,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"stacktrace.d.ts","sourceRoot":"","sources":["../../../src/vendor/stacktrace.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAsC,WAAW,EAAE,MAAM,cAAc,CAAC;AA8BpF;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAO1E;AAED,sCAAsC;AACtC,eAAO,MAAM,kBAAkB,EAAE,WAAkE,CAAC"}
|