@sentry/cloudflare 11.11.0 → 11.13.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/_virtual/_rolldown/runtime.js +22 -0
- package/build/cjs/dev/baseSdk.js +98 -103
- package/build/cjs/dev/baseSdk.js.map +1 -1
- package/build/cjs/dev/client.js +213 -237
- package/build/cjs/dev/client.js.map +1 -1
- package/build/cjs/dev/clientCache.js +8 -8
- package/build/cjs/dev/clientCache.js.map +1 -1
- package/build/cjs/dev/debug-build.js +9 -5
- package/build/cjs/dev/debug-build.js.map +1 -1
- package/build/cjs/dev/defineCloudflareOptions.js +5 -8
- package/build/cjs/dev/defineCloudflareOptions.js.map +1 -1
- package/build/cjs/dev/durableobject.js +290 -163
- package/build/cjs/dev/durableobject.js.map +1 -1
- package/build/cjs/dev/flush.js +104 -77
- package/build/cjs/dev/flush.js.map +1 -1
- package/build/cjs/dev/index.js +181 -182
- package/build/cjs/dev/instrument.js +53 -39
- package/build/cjs/dev/instrument.js.map +1 -1
- package/build/cjs/dev/instrumentations/agents/index.js +34 -13
- package/build/cjs/dev/instrumentations/agents/index.js.map +1 -1
- package/build/cjs/dev/instrumentations/agents/instrumentAgentCallableRpc.js +46 -49
- package/build/cjs/dev/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -1
- package/build/cjs/dev/instrumentations/agents/instrumentAgentRequestConversation.js +23 -16
- package/build/cjs/dev/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -1
- package/build/cjs/dev/instrumentations/agents/instrumentChatAgentConversation.js +36 -28
- package/build/cjs/dev/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -1
- package/build/cjs/dev/instrumentations/agents/types.js +103 -58
- package/build/cjs/dev/instrumentations/agents/types.js.map +1 -1
- package/build/cjs/dev/instrumentations/instrumentDurableObjectHandlers.js +87 -118
- package/build/cjs/dev/instrumentations/instrumentDurableObjectHandlers.js.map +1 -1
- package/build/cjs/dev/instrumentations/instrumentDurableObjectNamespace.js +46 -44
- package/build/cjs/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/cjs/dev/instrumentations/instrumentDurableObjectStorage.js +70 -71
- package/build/cjs/dev/instrumentations/instrumentDurableObjectStorage.js.map +1 -1
- package/build/cjs/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js +31 -39
- package/build/cjs/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -1
- package/build/cjs/dev/instrumentations/instrumentSqlStorage.js +50 -52
- package/build/cjs/dev/instrumentations/instrumentSqlStorage.js.map +1 -1
- package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js +136 -123
- package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentD1.js +131 -146
- package/build/cjs/dev/instrumentations/worker/instrumentD1.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentEmail.js +63 -61
- package/build/cjs/dev/instrumentations/worker/instrumentEmail.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentEnv.js +83 -87
- package/build/cjs/dev/instrumentations/worker/instrumentEnv.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentFetch.js +41 -48
- package/build/cjs/dev/instrumentations/worker/instrumentFetch.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentFetcher.js +25 -21
- package/build/cjs/dev/instrumentations/worker/instrumentFetcher.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentKV.js +54 -67
- package/build/cjs/dev/instrumentations/worker/instrumentKV.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentQueue.js +100 -76
- package/build/cjs/dev/instrumentations/worker/instrumentQueue.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentQueueProducer.js +91 -75
- package/build/cjs/dev/instrumentations/worker/instrumentQueueProducer.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentR2.js +128 -115
- package/build/cjs/dev/instrumentations/worker/instrumentR2.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentScheduled.js +90 -94
- package/build/cjs/dev/instrumentations/worker/instrumentScheduled.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentTail.js +100 -55
- package/build/cjs/dev/instrumentations/worker/instrumentTail.js.map +1 -1
- package/build/cjs/dev/integrations/cronTriggers.js +130 -85
- package/build/cjs/dev/integrations/cronTriggers.js.map +1 -1
- package/build/cjs/dev/integrations/fetch.js +9 -9
- package/build/cjs/dev/integrations/fetch.js.map +1 -1
- package/build/cjs/dev/integrations/httpServer.js +41 -22
- package/build/cjs/dev/integrations/httpServer.js.map +1 -1
- package/build/cjs/dev/integrations/spotlight.js +52 -55
- package/build/cjs/dev/integrations/spotlight.js.map +1 -1
- package/build/cjs/dev/opentelemetry/tracer.js +10 -8
- package/build/cjs/dev/opentelemetry/tracer.js.map +1 -1
- package/build/cjs/dev/options.js +55 -39
- package/build/cjs/dev/options.js.map +1 -1
- package/build/cjs/dev/orchestrion-deferred-channels.js +45 -29
- package/build/cjs/dev/orchestrion-deferred-channels.js.map +1 -1
- package/build/cjs/dev/orchestrion-diagnostics-channel.js +97 -72
- package/build/cjs/dev/orchestrion-diagnostics-channel.js.map +1 -1
- package/build/cjs/dev/pages-plugin.js +20 -21
- package/build/cjs/dev/pages-plugin.js.map +1 -1
- package/build/cjs/dev/request.js +16 -10
- package/build/cjs/dev/request.js.map +1 -1
- package/build/cjs/dev/scope-utils.js +12 -12
- package/build/cjs/dev/scope-utils.js.map +1 -1
- package/build/cjs/dev/sdk.js +24 -15
- package/build/cjs/dev/sdk.js.map +1 -1
- package/build/cjs/dev/transport.js +93 -86
- package/build/cjs/dev/transport.js.map +1 -1
- package/build/cjs/dev/utils/asyncContextStrategy.js +10 -10
- package/build/cjs/dev/utils/asyncContextStrategy.js.map +1 -1
- package/build/cjs/dev/utils/bindingPropagation.js +24 -0
- package/build/cjs/dev/utils/bindingPropagation.js.map +1 -0
- package/build/cjs/dev/utils/cloudflareTrace.js +34 -0
- package/build/cjs/dev/utils/cloudflareTrace.js.map +1 -0
- package/build/cjs/dev/utils/instrumentContext.js +74 -58
- package/build/cjs/dev/utils/instrumentContext.js.map +1 -1
- package/build/cjs/dev/utils/internalSqlQuery.js +38 -21
- package/build/cjs/dev/utils/internalSqlQuery.js.map +1 -1
- package/build/cjs/dev/utils/internalStorageKey.js +41 -38
- package/build/cjs/dev/utils/internalStorageKey.js.map +1 -1
- package/build/cjs/dev/utils/invocationContext.js +42 -32
- package/build/cjs/dev/utils/invocationContext.js.map +1 -1
- package/build/cjs/dev/utils/invocationScope.js +45 -21
- package/build/cjs/dev/utils/invocationScope.js.map +1 -1
- package/build/cjs/dev/utils/isBinding.js +47 -15
- package/build/cjs/dev/utils/isBinding.js.map +1 -1
- package/build/cjs/dev/utils/isCloudflareClass.js +11 -20
- package/build/cjs/dev/utils/isCloudflareClass.js.map +1 -1
- package/build/cjs/dev/utils/queueTraceMeta.js +33 -0
- package/build/cjs/dev/utils/queueTraceMeta.js.map +1 -0
- package/build/cjs/dev/utils/rpcMeta.js +37 -27
- package/build/cjs/dev/utils/rpcMeta.js.map +1 -1
- package/build/cjs/dev/utils/traceLinks.js +52 -42
- package/build/cjs/dev/utils/traceLinks.js.map +1 -1
- package/build/cjs/dev/vendor/stacktrace.js +32 -24
- package/build/cjs/dev/vendor/stacktrace.js.map +1 -1
- package/build/cjs/dev/vite/agentClass.js +105 -98
- package/build/cjs/dev/vite/agentClass.js.map +1 -1
- package/build/cjs/dev/vite/autoInstrument.js +121 -122
- package/build/cjs/dev/vite/autoInstrument.js.map +1 -1
- package/build/cjs/dev/vite/index.js +44 -21
- package/build/cjs/dev/vite/index.js.map +1 -1
- package/build/cjs/dev/vite/instrumentFile.js +37 -20
- package/build/cjs/dev/vite/instrumentFile.js.map +1 -1
- package/build/cjs/dev/vite/mastraObservability.js +19 -12
- package/build/cjs/dev/vite/mastraObservability.js.map +1 -1
- package/build/cjs/dev/vite/moduleShape.js +220 -201
- package/build/cjs/dev/vite/moduleShape.js.map +1 -1
- package/build/cjs/dev/vite/providedModulePlugin.js +62 -45
- package/build/cjs/dev/vite/providedModulePlugin.js.map +1 -1
- package/build/cjs/dev/vite/transform.js +333 -284
- package/build/cjs/dev/vite/transform.js.map +1 -1
- package/build/cjs/dev/vite/workerEntrypoint.js +66 -57
- package/build/cjs/dev/vite/workerEntrypoint.js.map +1 -1
- package/build/cjs/dev/vite/wranglerConfig.js +92 -67
- package/build/cjs/dev/vite/wranglerConfig.js.map +1 -1
- package/build/cjs/dev/withSentry.js +32 -26
- package/build/cjs/dev/withSentry.js.map +1 -1
- package/build/cjs/dev/workflows.js +165 -149
- package/build/cjs/dev/workflows.js.map +1 -1
- package/build/cjs/dev/wrapMethodWithSentry.js +148 -169
- package/build/cjs/dev/wrapMethodWithSentry.js.map +1 -1
- package/build/cjs/dev/wrapRequestHandlerWithInit.js +78 -72
- package/build/cjs/dev/wrapRequestHandlerWithInit.js.map +1 -1
- package/build/cjs/prod/_virtual/_rolldown/runtime.js +22 -0
- package/build/cjs/prod/baseSdk.js +94 -93
- package/build/cjs/prod/baseSdk.js.map +1 -1
- package/build/cjs/prod/client.js +213 -237
- package/build/cjs/prod/client.js.map +1 -1
- package/build/cjs/prod/clientCache.js +8 -8
- package/build/cjs/prod/clientCache.js.map +1 -1
- package/build/cjs/prod/debug-build.js +9 -5
- package/build/cjs/prod/debug-build.js.map +1 -1
- package/build/cjs/prod/defineCloudflareOptions.js +5 -8
- package/build/cjs/prod/defineCloudflareOptions.js.map +1 -1
- package/build/cjs/prod/durableobject.js +290 -163
- package/build/cjs/prod/durableobject.js.map +1 -1
- package/build/cjs/prod/flush.js +104 -77
- package/build/cjs/prod/flush.js.map +1 -1
- package/build/cjs/prod/index.js +181 -182
- package/build/cjs/prod/instrument.js +53 -39
- package/build/cjs/prod/instrument.js.map +1 -1
- package/build/cjs/prod/instrumentations/agents/index.js +34 -13
- package/build/cjs/prod/instrumentations/agents/index.js.map +1 -1
- package/build/cjs/prod/instrumentations/agents/instrumentAgentCallableRpc.js +46 -49
- package/build/cjs/prod/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -1
- package/build/cjs/prod/instrumentations/agents/instrumentAgentRequestConversation.js +23 -16
- package/build/cjs/prod/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -1
- package/build/cjs/prod/instrumentations/agents/instrumentChatAgentConversation.js +36 -28
- package/build/cjs/prod/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -1
- package/build/cjs/prod/instrumentations/agents/types.js +103 -58
- package/build/cjs/prod/instrumentations/agents/types.js.map +1 -1
- package/build/cjs/prod/instrumentations/instrumentDurableObjectHandlers.js +87 -118
- package/build/cjs/prod/instrumentations/instrumentDurableObjectHandlers.js.map +1 -1
- package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js +46 -44
- package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/cjs/prod/instrumentations/instrumentDurableObjectStorage.js +70 -71
- package/build/cjs/prod/instrumentations/instrumentDurableObjectStorage.js.map +1 -1
- package/build/cjs/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js +31 -39
- package/build/cjs/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -1
- package/build/cjs/prod/instrumentations/instrumentSqlStorage.js +50 -52
- package/build/cjs/prod/instrumentations/instrumentSqlStorage.js.map +1 -1
- package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js +136 -123
- package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentD1.js +131 -146
- package/build/cjs/prod/instrumentations/worker/instrumentD1.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentEmail.js +63 -61
- package/build/cjs/prod/instrumentations/worker/instrumentEmail.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentEnv.js +83 -87
- package/build/cjs/prod/instrumentations/worker/instrumentEnv.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentFetch.js +41 -48
- package/build/cjs/prod/instrumentations/worker/instrumentFetch.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentFetcher.js +25 -21
- package/build/cjs/prod/instrumentations/worker/instrumentFetcher.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentKV.js +54 -67
- package/build/cjs/prod/instrumentations/worker/instrumentKV.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentQueue.js +100 -76
- package/build/cjs/prod/instrumentations/worker/instrumentQueue.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentQueueProducer.js +91 -75
- package/build/cjs/prod/instrumentations/worker/instrumentQueueProducer.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentR2.js +128 -115
- package/build/cjs/prod/instrumentations/worker/instrumentR2.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js +90 -94
- package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentTail.js +100 -55
- package/build/cjs/prod/instrumentations/worker/instrumentTail.js.map +1 -1
- package/build/cjs/prod/integrations/cronTriggers.js +130 -85
- package/build/cjs/prod/integrations/cronTriggers.js.map +1 -1
- package/build/cjs/prod/integrations/fetch.js +9 -9
- package/build/cjs/prod/integrations/fetch.js.map +1 -1
- package/build/cjs/prod/integrations/httpServer.js +41 -22
- package/build/cjs/prod/integrations/httpServer.js.map +1 -1
- package/build/cjs/prod/integrations/spotlight.js +52 -55
- package/build/cjs/prod/integrations/spotlight.js.map +1 -1
- package/build/cjs/prod/opentelemetry/tracer.js +10 -8
- package/build/cjs/prod/opentelemetry/tracer.js.map +1 -1
- package/build/cjs/prod/options.js +37 -24
- package/build/cjs/prod/options.js.map +1 -1
- package/build/cjs/prod/orchestrion-deferred-channels.js +45 -29
- package/build/cjs/prod/orchestrion-deferred-channels.js.map +1 -1
- package/build/cjs/prod/orchestrion-diagnostics-channel.js +97 -72
- package/build/cjs/prod/orchestrion-diagnostics-channel.js.map +1 -1
- package/build/cjs/prod/pages-plugin.js +20 -21
- package/build/cjs/prod/pages-plugin.js.map +1 -1
- package/build/cjs/prod/request.js +16 -10
- package/build/cjs/prod/request.js.map +1 -1
- package/build/cjs/prod/scope-utils.js +12 -12
- package/build/cjs/prod/scope-utils.js.map +1 -1
- package/build/cjs/prod/sdk.js +24 -15
- package/build/cjs/prod/sdk.js.map +1 -1
- package/build/cjs/prod/transport.js +93 -86
- package/build/cjs/prod/transport.js.map +1 -1
- package/build/cjs/prod/utils/asyncContextStrategy.js +10 -10
- package/build/cjs/prod/utils/asyncContextStrategy.js.map +1 -1
- package/build/cjs/prod/utils/bindingPropagation.js +24 -0
- package/build/cjs/prod/utils/bindingPropagation.js.map +1 -0
- package/build/cjs/prod/utils/cloudflareTrace.js +34 -0
- package/build/cjs/prod/utils/cloudflareTrace.js.map +1 -0
- package/build/cjs/prod/utils/instrumentContext.js +74 -58
- package/build/cjs/prod/utils/instrumentContext.js.map +1 -1
- package/build/cjs/prod/utils/internalSqlQuery.js +38 -21
- package/build/cjs/prod/utils/internalSqlQuery.js.map +1 -1
- package/build/cjs/prod/utils/internalStorageKey.js +41 -38
- package/build/cjs/prod/utils/internalStorageKey.js.map +1 -1
- package/build/cjs/prod/utils/invocationContext.js +42 -32
- package/build/cjs/prod/utils/invocationContext.js.map +1 -1
- package/build/cjs/prod/utils/invocationScope.js +45 -21
- package/build/cjs/prod/utils/invocationScope.js.map +1 -1
- package/build/cjs/prod/utils/isBinding.js +47 -15
- package/build/cjs/prod/utils/isBinding.js.map +1 -1
- package/build/cjs/prod/utils/isCloudflareClass.js +11 -20
- package/build/cjs/prod/utils/isCloudflareClass.js.map +1 -1
- package/build/cjs/prod/utils/queueTraceMeta.js +33 -0
- package/build/cjs/prod/utils/queueTraceMeta.js.map +1 -0
- package/build/cjs/prod/utils/rpcMeta.js +37 -27
- package/build/cjs/prod/utils/rpcMeta.js.map +1 -1
- package/build/cjs/prod/utils/traceLinks.js +52 -42
- package/build/cjs/prod/utils/traceLinks.js.map +1 -1
- package/build/cjs/prod/vendor/stacktrace.js +32 -24
- package/build/cjs/prod/vendor/stacktrace.js.map +1 -1
- package/build/cjs/prod/vite/agentClass.js +105 -98
- package/build/cjs/prod/vite/agentClass.js.map +1 -1
- package/build/cjs/prod/vite/autoInstrument.js +121 -122
- package/build/cjs/prod/vite/autoInstrument.js.map +1 -1
- package/build/cjs/prod/vite/index.js +44 -21
- package/build/cjs/prod/vite/index.js.map +1 -1
- package/build/cjs/prod/vite/instrumentFile.js +37 -20
- package/build/cjs/prod/vite/instrumentFile.js.map +1 -1
- package/build/cjs/prod/vite/mastraObservability.js +19 -12
- package/build/cjs/prod/vite/mastraObservability.js.map +1 -1
- package/build/cjs/prod/vite/moduleShape.js +220 -201
- package/build/cjs/prod/vite/moduleShape.js.map +1 -1
- package/build/cjs/prod/vite/providedModulePlugin.js +62 -45
- package/build/cjs/prod/vite/providedModulePlugin.js.map +1 -1
- package/build/cjs/prod/vite/transform.js +333 -284
- package/build/cjs/prod/vite/transform.js.map +1 -1
- package/build/cjs/prod/vite/workerEntrypoint.js +66 -57
- package/build/cjs/prod/vite/workerEntrypoint.js.map +1 -1
- package/build/cjs/prod/vite/wranglerConfig.js +92 -67
- package/build/cjs/prod/vite/wranglerConfig.js.map +1 -1
- package/build/cjs/prod/withSentry.js +32 -26
- package/build/cjs/prod/withSentry.js.map +1 -1
- package/build/cjs/prod/workflows.js +165 -149
- package/build/cjs/prod/workflows.js.map +1 -1
- package/build/cjs/prod/wrapMethodWithSentry.js +148 -169
- package/build/cjs/prod/wrapMethodWithSentry.js.map +1 -1
- package/build/cjs/prod/wrapRequestHandlerWithInit.js +78 -72
- package/build/cjs/prod/wrapRequestHandlerWithInit.js.map +1 -1
- package/build/esm/dev/baseSdk.js +98 -101
- package/build/esm/dev/baseSdk.js.map +1 -1
- package/build/esm/dev/client.js +213 -235
- package/build/esm/dev/client.js.map +1 -1
- package/build/esm/dev/clientCache.js +8 -6
- package/build/esm/dev/clientCache.js.map +1 -1
- package/build/esm/dev/debug-build.js +9 -3
- package/build/esm/dev/debug-build.js.map +1 -1
- package/build/esm/dev/defineCloudflareOptions.js +5 -6
- package/build/esm/dev/defineCloudflareOptions.js.map +1 -1
- package/build/esm/dev/durableobject.js +290 -161
- package/build/esm/dev/durableobject.js.map +1 -1
- package/build/esm/dev/flush.js +104 -75
- package/build/esm/dev/flush.js.map +1 -1
- package/build/esm/dev/index.js +19 -18
- package/build/esm/dev/instrument.js +53 -37
- package/build/esm/dev/instrument.js.map +1 -1
- package/build/esm/dev/instrumentations/agents/index.js +34 -11
- package/build/esm/dev/instrumentations/agents/index.js.map +1 -1
- package/build/esm/dev/instrumentations/agents/instrumentAgentCallableRpc.js +46 -47
- package/build/esm/dev/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -1
- package/build/esm/dev/instrumentations/agents/instrumentAgentRequestConversation.js +23 -14
- package/build/esm/dev/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -1
- package/build/esm/dev/instrumentations/agents/instrumentChatAgentConversation.js +36 -26
- package/build/esm/dev/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -1
- package/build/esm/dev/instrumentations/agents/types.js +103 -56
- package/build/esm/dev/instrumentations/agents/types.js.map +1 -1
- package/build/esm/dev/instrumentations/instrumentDurableObjectHandlers.js +87 -116
- package/build/esm/dev/instrumentations/instrumentDurableObjectHandlers.js.map +1 -1
- package/build/esm/dev/instrumentations/instrumentDurableObjectNamespace.js +46 -42
- package/build/esm/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/esm/dev/instrumentations/instrumentDurableObjectStorage.js +70 -69
- package/build/esm/dev/instrumentations/instrumentDurableObjectStorage.js.map +1 -1
- package/build/esm/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js +31 -37
- package/build/esm/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -1
- package/build/esm/dev/instrumentations/instrumentSqlStorage.js +50 -50
- package/build/esm/dev/instrumentations/instrumentSqlStorage.js.map +1 -1
- package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js +136 -121
- package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentD1.js +131 -144
- package/build/esm/dev/instrumentations/worker/instrumentD1.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentEmail.js +63 -59
- package/build/esm/dev/instrumentations/worker/instrumentEmail.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentEnv.js +83 -85
- package/build/esm/dev/instrumentations/worker/instrumentEnv.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentFetch.js +41 -46
- package/build/esm/dev/instrumentations/worker/instrumentFetch.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentFetcher.js +25 -19
- package/build/esm/dev/instrumentations/worker/instrumentFetcher.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentKV.js +54 -65
- package/build/esm/dev/instrumentations/worker/instrumentKV.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentQueue.js +100 -74
- package/build/esm/dev/instrumentations/worker/instrumentQueue.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentQueueProducer.js +91 -73
- package/build/esm/dev/instrumentations/worker/instrumentQueueProducer.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentR2.js +128 -113
- package/build/esm/dev/instrumentations/worker/instrumentR2.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentScheduled.js +90 -92
- package/build/esm/dev/instrumentations/worker/instrumentScheduled.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentTail.js +100 -53
- package/build/esm/dev/instrumentations/worker/instrumentTail.js.map +1 -1
- package/build/esm/dev/integrations/cronTriggers.js +129 -82
- package/build/esm/dev/integrations/cronTriggers.js.map +1 -1
- package/build/esm/dev/integrations/fetch.js +9 -6
- package/build/esm/dev/integrations/fetch.js.map +1 -1
- package/build/esm/dev/integrations/httpServer.js +40 -19
- package/build/esm/dev/integrations/httpServer.js.map +1 -1
- package/build/esm/dev/integrations/spotlight.js +51 -52
- package/build/esm/dev/integrations/spotlight.js.map +1 -1
- package/build/esm/dev/opentelemetry/tracer.js +10 -6
- package/build/esm/dev/opentelemetry/tracer.js.map +1 -1
- package/build/esm/dev/options.js +55 -37
- package/build/esm/dev/options.js.map +1 -1
- package/build/esm/dev/orchestrion-deferred-channels.js +45 -27
- package/build/esm/dev/orchestrion-deferred-channels.js.map +1 -1
- package/build/esm/dev/orchestrion-diagnostics-channel.js +87 -66
- package/build/esm/dev/orchestrion-diagnostics-channel.js.map +1 -1
- package/build/esm/dev/package.json +1 -1
- package/build/esm/dev/pages-plugin.js +20 -19
- package/build/esm/dev/pages-plugin.js.map +1 -1
- package/build/esm/dev/request.js +14 -7
- package/build/esm/dev/request.js.map +1 -1
- package/build/esm/dev/scope-utils.js +12 -10
- package/build/esm/dev/scope-utils.js.map +1 -1
- package/build/esm/dev/sdk.js +23 -13
- package/build/esm/dev/sdk.js.map +1 -1
- package/build/esm/dev/transport.js +93 -84
- package/build/esm/dev/transport.js.map +1 -1
- package/build/esm/dev/utils/asyncContextStrategy.js +10 -8
- package/build/esm/dev/utils/asyncContextStrategy.js.map +1 -1
- package/build/esm/dev/utils/bindingPropagation.js +23 -0
- package/build/esm/dev/utils/bindingPropagation.js.map +1 -0
- package/build/esm/dev/utils/cloudflareTrace.js +34 -0
- package/build/esm/dev/utils/cloudflareTrace.js.map +1 -0
- package/build/esm/dev/utils/instrumentContext.js +74 -56
- package/build/esm/dev/utils/instrumentContext.js.map +1 -1
- package/build/esm/dev/utils/internalSqlQuery.js +38 -19
- package/build/esm/dev/utils/internalSqlQuery.js.map +1 -1
- package/build/esm/dev/utils/internalStorageKey.js +41 -36
- package/build/esm/dev/utils/internalStorageKey.js.map +1 -1
- package/build/esm/dev/utils/invocationContext.js +42 -30
- package/build/esm/dev/utils/invocationContext.js.map +1 -1
- package/build/esm/dev/utils/invocationScope.js +45 -19
- package/build/esm/dev/utils/invocationScope.js.map +1 -1
- package/build/esm/dev/utils/isBinding.js +47 -13
- package/build/esm/dev/utils/isBinding.js.map +1 -1
- package/build/esm/dev/utils/isCloudflareClass.js +11 -18
- package/build/esm/dev/utils/isCloudflareClass.js.map +1 -1
- package/build/esm/dev/utils/queueTraceMeta.js +32 -0
- package/build/esm/dev/utils/queueTraceMeta.js.map +1 -0
- package/build/esm/dev/utils/rpcMeta.js +37 -25
- package/build/esm/dev/utils/rpcMeta.js.map +1 -1
- package/build/esm/dev/utils/traceLinks.js +52 -40
- package/build/esm/dev/utils/traceLinks.js.map +1 -1
- package/build/esm/dev/vendor/stacktrace.js +31 -21
- package/build/esm/dev/vendor/stacktrace.js.map +1 -1
- package/build/esm/dev/vite/agentClass.js +105 -96
- package/build/esm/dev/vite/agentClass.js.map +1 -1
- package/build/esm/dev/vite/autoInstrument.js +121 -120
- package/build/esm/dev/vite/autoInstrument.js.map +1 -1
- package/build/esm/dev/vite/index.js +43 -19
- package/build/esm/dev/vite/index.js.map +1 -1
- package/build/esm/dev/vite/instrumentFile.js +37 -18
- package/build/esm/dev/vite/instrumentFile.js.map +1 -1
- package/build/esm/dev/vite/mastraObservability.js +19 -10
- package/build/esm/dev/vite/mastraObservability.js.map +1 -1
- package/build/esm/dev/vite/moduleShape.js +220 -199
- package/build/esm/dev/vite/moduleShape.js.map +1 -1
- package/build/esm/dev/vite/providedModulePlugin.js +60 -43
- package/build/esm/dev/vite/providedModulePlugin.js.map +1 -1
- package/build/esm/dev/vite/transform.js +331 -282
- package/build/esm/dev/vite/transform.js.map +1 -1
- package/build/esm/dev/vite/workerEntrypoint.js +66 -55
- package/build/esm/dev/vite/workerEntrypoint.js.map +1 -1
- package/build/esm/dev/vite/wranglerConfig.js +92 -65
- package/build/esm/dev/vite/wranglerConfig.js.map +1 -1
- package/build/esm/dev/withSentry.js +32 -24
- package/build/esm/dev/withSentry.js.map +1 -1
- package/build/esm/dev/workflows.js +165 -147
- package/build/esm/dev/workflows.js.map +1 -1
- package/build/esm/dev/wrapMethodWithSentry.js +148 -167
- package/build/esm/dev/wrapMethodWithSentry.js.map +1 -1
- package/build/esm/dev/wrapRequestHandlerWithInit.js +78 -70
- package/build/esm/dev/wrapRequestHandlerWithInit.js.map +1 -1
- package/build/esm/prod/baseSdk.js +94 -91
- package/build/esm/prod/baseSdk.js.map +1 -1
- package/build/esm/prod/client.js +213 -235
- package/build/esm/prod/client.js.map +1 -1
- package/build/esm/prod/clientCache.js +8 -6
- package/build/esm/prod/clientCache.js.map +1 -1
- package/build/esm/prod/debug-build.js +9 -3
- package/build/esm/prod/debug-build.js.map +1 -1
- package/build/esm/prod/defineCloudflareOptions.js +5 -6
- package/build/esm/prod/defineCloudflareOptions.js.map +1 -1
- package/build/esm/prod/durableobject.js +290 -161
- package/build/esm/prod/durableobject.js.map +1 -1
- package/build/esm/prod/flush.js +104 -75
- package/build/esm/prod/flush.js.map +1 -1
- package/build/esm/prod/index.js +19 -18
- package/build/esm/prod/instrument.js +53 -37
- package/build/esm/prod/instrument.js.map +1 -1
- package/build/esm/prod/instrumentations/agents/index.js +34 -11
- package/build/esm/prod/instrumentations/agents/index.js.map +1 -1
- package/build/esm/prod/instrumentations/agents/instrumentAgentCallableRpc.js +46 -47
- package/build/esm/prod/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -1
- package/build/esm/prod/instrumentations/agents/instrumentAgentRequestConversation.js +23 -14
- package/build/esm/prod/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -1
- package/build/esm/prod/instrumentations/agents/instrumentChatAgentConversation.js +36 -26
- package/build/esm/prod/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -1
- package/build/esm/prod/instrumentations/agents/types.js +103 -56
- package/build/esm/prod/instrumentations/agents/types.js.map +1 -1
- package/build/esm/prod/instrumentations/instrumentDurableObjectHandlers.js +87 -116
- package/build/esm/prod/instrumentations/instrumentDurableObjectHandlers.js.map +1 -1
- package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js +46 -42
- package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/esm/prod/instrumentations/instrumentDurableObjectStorage.js +70 -69
- package/build/esm/prod/instrumentations/instrumentDurableObjectStorage.js.map +1 -1
- package/build/esm/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js +31 -37
- package/build/esm/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -1
- package/build/esm/prod/instrumentations/instrumentSqlStorage.js +50 -50
- package/build/esm/prod/instrumentations/instrumentSqlStorage.js.map +1 -1
- package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js +136 -121
- package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentD1.js +131 -144
- package/build/esm/prod/instrumentations/worker/instrumentD1.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentEmail.js +63 -59
- package/build/esm/prod/instrumentations/worker/instrumentEmail.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentEnv.js +83 -85
- package/build/esm/prod/instrumentations/worker/instrumentEnv.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentFetch.js +41 -46
- package/build/esm/prod/instrumentations/worker/instrumentFetch.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentFetcher.js +25 -19
- package/build/esm/prod/instrumentations/worker/instrumentFetcher.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentKV.js +54 -65
- package/build/esm/prod/instrumentations/worker/instrumentKV.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentQueue.js +100 -74
- package/build/esm/prod/instrumentations/worker/instrumentQueue.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentQueueProducer.js +91 -73
- package/build/esm/prod/instrumentations/worker/instrumentQueueProducer.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentR2.js +128 -113
- package/build/esm/prod/instrumentations/worker/instrumentR2.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentScheduled.js +90 -92
- package/build/esm/prod/instrumentations/worker/instrumentScheduled.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentTail.js +100 -53
- package/build/esm/prod/instrumentations/worker/instrumentTail.js.map +1 -1
- package/build/esm/prod/integrations/cronTriggers.js +129 -82
- package/build/esm/prod/integrations/cronTriggers.js.map +1 -1
- package/build/esm/prod/integrations/fetch.js +9 -6
- package/build/esm/prod/integrations/fetch.js.map +1 -1
- package/build/esm/prod/integrations/httpServer.js +40 -19
- package/build/esm/prod/integrations/httpServer.js.map +1 -1
- package/build/esm/prod/integrations/spotlight.js +51 -52
- package/build/esm/prod/integrations/spotlight.js.map +1 -1
- package/build/esm/prod/opentelemetry/tracer.js +10 -6
- package/build/esm/prod/opentelemetry/tracer.js.map +1 -1
- package/build/esm/prod/options.js +37 -22
- package/build/esm/prod/options.js.map +1 -1
- package/build/esm/prod/orchestrion-deferred-channels.js +45 -27
- package/build/esm/prod/orchestrion-deferred-channels.js.map +1 -1
- package/build/esm/prod/orchestrion-diagnostics-channel.js +87 -66
- package/build/esm/prod/orchestrion-diagnostics-channel.js.map +1 -1
- package/build/esm/prod/package.json +1 -1
- package/build/esm/prod/pages-plugin.js +20 -19
- package/build/esm/prod/pages-plugin.js.map +1 -1
- package/build/esm/prod/request.js +14 -7
- package/build/esm/prod/request.js.map +1 -1
- package/build/esm/prod/scope-utils.js +12 -10
- package/build/esm/prod/scope-utils.js.map +1 -1
- package/build/esm/prod/sdk.js +23 -13
- package/build/esm/prod/sdk.js.map +1 -1
- package/build/esm/prod/transport.js +93 -84
- package/build/esm/prod/transport.js.map +1 -1
- package/build/esm/prod/utils/asyncContextStrategy.js +10 -8
- package/build/esm/prod/utils/asyncContextStrategy.js.map +1 -1
- package/build/esm/prod/utils/bindingPropagation.js +23 -0
- package/build/esm/prod/utils/bindingPropagation.js.map +1 -0
- package/build/esm/prod/utils/cloudflareTrace.js +34 -0
- package/build/esm/prod/utils/cloudflareTrace.js.map +1 -0
- package/build/esm/prod/utils/instrumentContext.js +74 -56
- package/build/esm/prod/utils/instrumentContext.js.map +1 -1
- package/build/esm/prod/utils/internalSqlQuery.js +38 -19
- package/build/esm/prod/utils/internalSqlQuery.js.map +1 -1
- package/build/esm/prod/utils/internalStorageKey.js +41 -36
- package/build/esm/prod/utils/internalStorageKey.js.map +1 -1
- package/build/esm/prod/utils/invocationContext.js +42 -30
- package/build/esm/prod/utils/invocationContext.js.map +1 -1
- package/build/esm/prod/utils/invocationScope.js +45 -19
- package/build/esm/prod/utils/invocationScope.js.map +1 -1
- package/build/esm/prod/utils/isBinding.js +47 -13
- package/build/esm/prod/utils/isBinding.js.map +1 -1
- package/build/esm/prod/utils/isCloudflareClass.js +11 -18
- package/build/esm/prod/utils/isCloudflareClass.js.map +1 -1
- package/build/esm/prod/utils/queueTraceMeta.js +32 -0
- package/build/esm/prod/utils/queueTraceMeta.js.map +1 -0
- package/build/esm/prod/utils/rpcMeta.js +37 -25
- package/build/esm/prod/utils/rpcMeta.js.map +1 -1
- package/build/esm/prod/utils/traceLinks.js +52 -40
- package/build/esm/prod/utils/traceLinks.js.map +1 -1
- package/build/esm/prod/vendor/stacktrace.js +31 -21
- package/build/esm/prod/vendor/stacktrace.js.map +1 -1
- package/build/esm/prod/vite/agentClass.js +105 -96
- package/build/esm/prod/vite/agentClass.js.map +1 -1
- package/build/esm/prod/vite/autoInstrument.js +121 -120
- package/build/esm/prod/vite/autoInstrument.js.map +1 -1
- package/build/esm/prod/vite/index.js +43 -19
- package/build/esm/prod/vite/index.js.map +1 -1
- package/build/esm/prod/vite/instrumentFile.js +37 -18
- package/build/esm/prod/vite/instrumentFile.js.map +1 -1
- package/build/esm/prod/vite/mastraObservability.js +19 -10
- package/build/esm/prod/vite/mastraObservability.js.map +1 -1
- package/build/esm/prod/vite/moduleShape.js +220 -199
- package/build/esm/prod/vite/moduleShape.js.map +1 -1
- package/build/esm/prod/vite/providedModulePlugin.js +60 -43
- package/build/esm/prod/vite/providedModulePlugin.js.map +1 -1
- package/build/esm/prod/vite/transform.js +331 -282
- package/build/esm/prod/vite/transform.js.map +1 -1
- package/build/esm/prod/vite/workerEntrypoint.js +66 -55
- package/build/esm/prod/vite/workerEntrypoint.js.map +1 -1
- package/build/esm/prod/vite/wranglerConfig.js +92 -65
- package/build/esm/prod/vite/wranglerConfig.js.map +1 -1
- package/build/esm/prod/withSentry.js +32 -24
- package/build/esm/prod/withSentry.js.map +1 -1
- package/build/esm/prod/workflows.js +165 -147
- package/build/esm/prod/workflows.js.map +1 -1
- package/build/esm/prod/wrapMethodWithSentry.js +148 -167
- package/build/esm/prod/wrapMethodWithSentry.js.map +1 -1
- package/build/esm/prod/wrapRequestHandlerWithInit.js +78 -70
- package/build/esm/prod/wrapRequestHandlerWithInit.js.map +1 -1
- package/build/types/client.d.ts +32 -1
- package/build/types/client.d.ts.map +1 -1
- package/build/types/durableobject.d.ts.map +1 -1
- package/build/types/index.d.ts +3 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentEmail.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentEnv.d.ts +1 -1
- package/build/types/instrumentations/worker/instrumentEnv.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentFetcher.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentQueue.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentQueueProducer.d.ts +1 -1
- package/build/types/instrumentations/worker/instrumentQueueProducer.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentScheduled.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentTail.d.ts +4 -2
- package/build/types/instrumentations/worker/instrumentTail.d.ts.map +1 -1
- package/build/types/utils/{rpcPropagation.d.ts → bindingPropagation.d.ts} +6 -1
- package/build/types/utils/bindingPropagation.d.ts.map +1 -0
- package/build/types/utils/cloudflareTrace.d.ts +13 -0
- package/build/types/utils/cloudflareTrace.d.ts.map +1 -0
- package/build/types/utils/queueTraceMeta.d.ts +7 -0
- package/build/types/utils/queueTraceMeta.d.ts.map +1 -0
- package/build/types/vite/autoInstrument.d.ts.map +1 -1
- package/build/types/vite/index.d.ts.map +1 -1
- package/build/types/vite/providedModulePlugin.d.ts +15 -11
- package/build/types/vite/providedModulePlugin.d.ts.map +1 -1
- package/build/types/workflows.d.ts.map +1 -1
- package/build/types/wrapMethodWithSentry.d.ts.map +1 -1
- package/build/types/wrapRequestHandlerWithInit.d.ts.map +1 -1
- package/package.json +20 -21
- package/build/cjs/dev/index.js.map +0 -1
- package/build/cjs/dev/utils/rpcPropagation.js +0 -15
- package/build/cjs/dev/utils/rpcPropagation.js.map +0 -1
- package/build/cjs/dev/vite/flueRuntime.js +0 -15
- package/build/cjs/dev/vite/flueRuntime.js.map +0 -1
- package/build/cjs/prod/index.js.map +0 -1
- package/build/cjs/prod/utils/rpcPropagation.js +0 -15
- package/build/cjs/prod/utils/rpcPropagation.js.map +0 -1
- package/build/cjs/prod/vite/flueRuntime.js +0 -15
- package/build/cjs/prod/vite/flueRuntime.js.map +0 -1
- package/build/esm/dev/index.js.map +0 -1
- package/build/esm/dev/utils/rpcPropagation.js +0 -13
- package/build/esm/dev/utils/rpcPropagation.js.map +0 -1
- package/build/esm/dev/vite/flueRuntime.js +0 -13
- package/build/esm/dev/vite/flueRuntime.js.map +0 -1
- package/build/esm/prod/index.js.map +0 -1
- package/build/esm/prod/utils/rpcPropagation.js +0 -13
- package/build/esm/prod/utils/rpcPropagation.js.map +0 -1
- package/build/esm/prod/vite/flueRuntime.js +0 -13
- package/build/esm/prod/vite/flueRuntime.js.map +0 -1
- package/build/types/utils/rpcPropagation.d.ts.map +0 -1
- package/build/types/vite/flueRuntime.d.ts +0 -12
- package/build/types/vite/flueRuntime.d.ts.map +0 -1
package/build/cjs/prod/index.js
CHANGED
|
@@ -1,182 +1,181 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
29
|
-
exports.
|
|
30
|
-
exports.
|
|
31
|
-
exports.
|
|
32
|
-
exports.
|
|
33
|
-
exports.
|
|
34
|
-
exports.
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
55
|
-
exports.
|
|
56
|
-
exports.
|
|
57
|
-
exports.
|
|
58
|
-
exports.
|
|
59
|
-
exports.
|
|
60
|
-
exports.
|
|
61
|
-
exports.
|
|
62
|
-
exports.
|
|
63
|
-
exports.
|
|
64
|
-
exports.
|
|
65
|
-
exports.
|
|
66
|
-
exports.
|
|
67
|
-
exports.
|
|
68
|
-
exports.
|
|
69
|
-
exports.
|
|
70
|
-
exports.
|
|
71
|
-
exports.
|
|
72
|
-
exports.
|
|
73
|
-
exports.
|
|
74
|
-
exports.
|
|
75
|
-
exports.
|
|
76
|
-
exports.
|
|
77
|
-
exports.
|
|
78
|
-
exports.
|
|
79
|
-
exports.
|
|
80
|
-
exports.
|
|
81
|
-
exports.
|
|
82
|
-
exports.
|
|
83
|
-
exports.
|
|
84
|
-
exports.
|
|
85
|
-
exports.
|
|
86
|
-
exports.
|
|
87
|
-
exports.
|
|
88
|
-
exports.
|
|
89
|
-
exports.
|
|
90
|
-
exports.
|
|
91
|
-
exports.
|
|
92
|
-
exports.
|
|
93
|
-
exports.
|
|
94
|
-
exports.
|
|
95
|
-
exports.
|
|
96
|
-
exports.
|
|
97
|
-
exports.
|
|
98
|
-
exports.
|
|
99
|
-
exports.
|
|
100
|
-
exports.
|
|
101
|
-
exports.
|
|
102
|
-
exports.
|
|
103
|
-
exports.
|
|
104
|
-
exports.
|
|
105
|
-
exports.
|
|
106
|
-
exports.
|
|
107
|
-
exports.
|
|
108
|
-
exports.
|
|
109
|
-
exports.
|
|
110
|
-
exports.
|
|
111
|
-
exports.
|
|
112
|
-
exports.
|
|
113
|
-
exports.
|
|
114
|
-
exports.
|
|
115
|
-
exports.
|
|
116
|
-
exports.
|
|
117
|
-
exports.
|
|
118
|
-
exports.
|
|
119
|
-
exports.
|
|
120
|
-
exports.
|
|
121
|
-
exports.
|
|
122
|
-
exports.
|
|
123
|
-
exports.
|
|
124
|
-
exports.
|
|
125
|
-
exports.
|
|
126
|
-
exports.
|
|
127
|
-
exports.
|
|
128
|
-
exports.
|
|
129
|
-
exports.
|
|
130
|
-
exports.
|
|
131
|
-
exports.
|
|
132
|
-
exports.
|
|
133
|
-
exports.
|
|
134
|
-
exports.
|
|
135
|
-
exports.
|
|
136
|
-
exports.
|
|
137
|
-
exports.
|
|
138
|
-
exports.
|
|
139
|
-
exports.
|
|
140
|
-
exports.
|
|
141
|
-
exports.
|
|
142
|
-
exports.
|
|
143
|
-
exports.
|
|
144
|
-
exports.
|
|
145
|
-
exports.
|
|
146
|
-
exports.
|
|
147
|
-
exports.
|
|
148
|
-
exports.
|
|
149
|
-
exports.
|
|
150
|
-
exports.
|
|
151
|
-
exports.
|
|
152
|
-
exports.
|
|
153
|
-
exports.
|
|
154
|
-
exports.
|
|
155
|
-
exports.
|
|
156
|
-
exports.
|
|
157
|
-
exports.
|
|
158
|
-
exports.
|
|
159
|
-
exports.
|
|
160
|
-
exports.
|
|
161
|
-
exports.
|
|
162
|
-
exports.
|
|
163
|
-
exports.
|
|
164
|
-
exports.
|
|
165
|
-
exports.
|
|
166
|
-
exports.
|
|
167
|
-
exports.
|
|
168
|
-
exports.
|
|
169
|
-
exports.
|
|
170
|
-
exports.
|
|
171
|
-
exports.
|
|
172
|
-
exports.
|
|
173
|
-
exports.
|
|
174
|
-
exports.
|
|
175
|
-
exports.
|
|
176
|
-
exports.
|
|
177
|
-
exports.
|
|
178
|
-
exports.
|
|
179
|
-
exports.
|
|
180
|
-
exports.
|
|
181
|
-
exports.
|
|
182
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_withSentry = require("./withSentry.js");
|
|
3
|
+
const require_defineCloudflareOptions = require("./defineCloudflareOptions.js");
|
|
4
|
+
const require_durableobject = require("./durableobject.js");
|
|
5
|
+
const require_instrument = require("./instrument.js");
|
|
6
|
+
const require_pages_plugin = require("./pages-plugin.js");
|
|
7
|
+
const require_baseSdk = require("./baseSdk.js");
|
|
8
|
+
const require_client = require("./client.js");
|
|
9
|
+
const require_sdk = require("./sdk.js");
|
|
10
|
+
const require_options = require("./options.js");
|
|
11
|
+
const require_httpServer = require("./integrations/httpServer.js");
|
|
12
|
+
const require_fetch = require("./integrations/fetch.js");
|
|
13
|
+
const require_spotlight = require("./integrations/spotlight.js");
|
|
14
|
+
const require_cronTriggers = require("./integrations/cronTriggers.js");
|
|
15
|
+
const require_workflows = require("./workflows.js");
|
|
16
|
+
let _sentry_core = require("@sentry/core");
|
|
17
|
+
let _sentry_core_server = require("@sentry/core/server");
|
|
18
|
+
let _sentry_server_utils = require("@sentry/server-utils");
|
|
19
|
+
let _sentry_server_utils_no_diagnostic_channels = require("@sentry/server-utils/no-diagnostic-channels");
|
|
20
|
+
exports.CloudflareClient = require_client.CloudflareClient;
|
|
21
|
+
exports.SDK_VERSION = _sentry_core.SDK_VERSION;
|
|
22
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = _sentry_core.SEMANTIC_ATTRIBUTE_SENTRY_OP;
|
|
23
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = _sentry_core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
24
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = _sentry_core.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE;
|
|
25
|
+
exports.Scope = _sentry_core.Scope;
|
|
26
|
+
exports.SentryMastraExporter = _sentry_server_utils.SentryMastraExporter;
|
|
27
|
+
exports._INTERNAL_getFinalOptions = require_options.getFinalOptions;
|
|
28
|
+
exports._INTERNAL_init = require_sdk.init;
|
|
29
|
+
exports._INTERNAL_wrapRequestHandler = require_sdk._INTERNAL_wrapRequestHandler;
|
|
30
|
+
exports._INTERNAL_wrapUnlessInstrumented = require_instrument._INTERNAL_wrapUnlessInstrumented;
|
|
31
|
+
exports.addBreadcrumb = _sentry_core.addBreadcrumb;
|
|
32
|
+
exports.addEventProcessor = _sentry_core.addEventProcessor;
|
|
33
|
+
exports.addIntegration = _sentry_core.addIntegration;
|
|
34
|
+
exports.amqplibIntegration = _sentry_server_utils.amqplibIntegration;
|
|
35
|
+
exports.anthropicAIIntegration = _sentry_server_utils.anthropicAIIntegration;
|
|
36
|
+
exports.awsIntegration = _sentry_server_utils.awsIntegration;
|
|
37
|
+
exports.bindScopeToEmitter = _sentry_core.bindScopeToEmitter;
|
|
38
|
+
exports.captureCheckIn = _sentry_core.captureCheckIn;
|
|
39
|
+
exports.captureConsoleIntegration = _sentry_core.captureConsoleIntegration;
|
|
40
|
+
exports.captureEvent = _sentry_core.captureEvent;
|
|
41
|
+
exports.captureException = _sentry_core.captureException;
|
|
42
|
+
exports.captureFeedback = _sentry_core.captureFeedback;
|
|
43
|
+
exports.captureMessage = _sentry_core.captureMessage;
|
|
44
|
+
exports.close = _sentry_core.close;
|
|
45
|
+
exports.consoleIntegration = _sentry_core.consoleIntegration;
|
|
46
|
+
exports.consoleLoggingIntegration = _sentry_core.consoleLoggingIntegration;
|
|
47
|
+
exports.continueTrace = _sentry_core.continueTrace;
|
|
48
|
+
exports.createConsolaReporter = _sentry_core.createConsolaReporter;
|
|
49
|
+
exports.createFlueInstrumentation = _sentry_server_utils.createFlueInstrumentation;
|
|
50
|
+
exports.createLangChainCallbackHandler = _sentry_server_utils.createLangChainCallbackHandler;
|
|
51
|
+
exports.createTransport = _sentry_core.createTransport;
|
|
52
|
+
exports.cronTriggersIntegration = require_cronTriggers.cronTriggersIntegration;
|
|
53
|
+
exports.dataloaderIntegration = _sentry_server_utils.dataloaderIntegration;
|
|
54
|
+
exports.dedupeIntegration = _sentry_core.dedupeIntegration;
|
|
55
|
+
exports.defineCloudflareOptions = require_defineCloudflareOptions.defineCloudflareOptions;
|
|
56
|
+
exports.eveConversationHook = _sentry_server_utils.eveConversationHook;
|
|
57
|
+
exports.eveIntegration = _sentry_server_utils.eveIntegration;
|
|
58
|
+
exports.eventFiltersIntegration = _sentry_core.eventFiltersIntegration;
|
|
59
|
+
exports.expressIntegration = _sentry_server_utils.expressIntegration;
|
|
60
|
+
exports.extraErrorDataIntegration = _sentry_core.extraErrorDataIntegration;
|
|
61
|
+
exports.featureFlagsIntegration = _sentry_core.featureFlagsIntegration;
|
|
62
|
+
exports.fetchIntegration = require_fetch.fetchIntegration;
|
|
63
|
+
exports.firebaseIntegration = _sentry_server_utils.firebaseIntegration;
|
|
64
|
+
exports.flush = _sentry_core.flush;
|
|
65
|
+
exports.functionToStringIntegration = _sentry_core.functionToStringIntegration;
|
|
66
|
+
exports.genericPoolIntegration = _sentry_server_utils.genericPoolIntegration;
|
|
67
|
+
exports.getActiveSpan = _sentry_core.getActiveSpan;
|
|
68
|
+
exports.getClient = _sentry_core.getClient;
|
|
69
|
+
exports.getCurrentScope = _sentry_core.getCurrentScope;
|
|
70
|
+
exports.getDefaultIntegrations = require_baseSdk.getDefaultIntegrations;
|
|
71
|
+
exports.getGlobalScope = _sentry_core.getGlobalScope;
|
|
72
|
+
exports.getInstrumentedModuleNames = _sentry_server_utils.getInstrumentedModuleNames;
|
|
73
|
+
exports.getIsolationScope = _sentry_core.getIsolationScope;
|
|
74
|
+
exports.getOtlpTracesEndpoint = _sentry_server_utils.getOtlpTracesEndpoint;
|
|
75
|
+
exports.getRootSpan = _sentry_core.getRootSpan;
|
|
76
|
+
exports.getSpanDescendants = _sentry_core.getSpanDescendants;
|
|
77
|
+
exports.getSpanStatusFromHttpCode = _sentry_core.getSpanStatusFromHttpCode;
|
|
78
|
+
exports.getTraceData = _sentry_core.getTraceData;
|
|
79
|
+
exports.getTraceMetaTags = _sentry_core.getTraceMetaTags;
|
|
80
|
+
exports.getTunnelPath = _sentry_core.getTunnelPath;
|
|
81
|
+
exports.googleGenAIIntegration = _sentry_server_utils.googleGenAIIntegration;
|
|
82
|
+
exports.graphqlIntegration = _sentry_server_utils.graphqlIntegration;
|
|
83
|
+
exports.groqIntegration = _sentry_server_utils.groqIntegration;
|
|
84
|
+
exports.growthbookIntegration = _sentry_core.growthbookIntegration;
|
|
85
|
+
exports.handleTunnelRequest = _sentry_core.handleTunnelRequest;
|
|
86
|
+
exports.handleTunnelRequestIfMatched = _sentry_core_server.handleTunnelRequestIfMatched;
|
|
87
|
+
exports.hapiIntegration = _sentry_server_utils.hapiIntegration;
|
|
88
|
+
exports.honoIntegration = _sentry_server_utils.honoIntegration;
|
|
89
|
+
exports.honoMiddleware = _sentry_server_utils.honoMiddleware;
|
|
90
|
+
exports.httpServerIntegration = require_httpServer.httpServerIntegration;
|
|
91
|
+
exports.instrumentAgentWithSentry = require_durableobject.instrumentAgentWithSentry;
|
|
92
|
+
exports.instrumentAnthropicAiClient = _sentry_server_utils.instrumentAnthropicAiClient;
|
|
93
|
+
exports.instrumentCreateReactAgent = _sentry_server_utils.instrumentCreateReactAgent;
|
|
94
|
+
exports.instrumentDurableObjectWithSentry = require_durableobject.instrumentDurableObjectWithSentry;
|
|
95
|
+
exports.instrumentGoogleGenAIClient = _sentry_server_utils.instrumentGoogleGenAIClient;
|
|
96
|
+
exports.instrumentLangChainEmbeddings = _sentry_server_utils.instrumentLangChainEmbeddings;
|
|
97
|
+
exports.instrumentMistralAiClient = _sentry_server_utils.instrumentMistralAiClient;
|
|
98
|
+
exports.instrumentOpenAiClient = _sentry_server_utils.instrumentOpenAiClient;
|
|
99
|
+
exports.instrumentPostgresJsSql = _sentry_server_utils.instrumentPostgresJsSql;
|
|
100
|
+
exports.instrumentStateGraph = _sentry_server_utils.instrumentStateGraph;
|
|
101
|
+
exports.instrumentStateGraphCompile = _sentry_server_utils.instrumentStateGraphCompile;
|
|
102
|
+
exports.instrumentSupabaseClient = _sentry_core.instrumentSupabaseClient;
|
|
103
|
+
exports.instrumentTypeSafeClient = _sentry_server_utils.instrumentTypeSafeClient;
|
|
104
|
+
exports.instrumentWorkersAiClient = _sentry_server_utils.instrumentWorkersAiClient;
|
|
105
|
+
exports.instrumentWorkflowWithSentry = require_workflows.instrumentWorkflowWithSentry;
|
|
106
|
+
exports.isEnabled = _sentry_core.isEnabled;
|
|
107
|
+
exports.isInitialized = _sentry_core.isInitialized;
|
|
108
|
+
exports.isTunnelRequest = _sentry_core_server.isTunnelRequest;
|
|
109
|
+
exports.kafkaIntegration = _sentry_server_utils.kafkaIntegration;
|
|
110
|
+
exports.knexIntegration = _sentry_server_utils.knexIntegration;
|
|
111
|
+
exports.koaIntegration = _sentry_server_utils.koaIntegration;
|
|
112
|
+
exports.langChainIntegration = _sentry_server_utils.langChainIntegration;
|
|
113
|
+
exports.langGraphIntegration = _sentry_server_utils.langGraphIntegration;
|
|
114
|
+
exports.lastEventId = _sentry_core.lastEventId;
|
|
115
|
+
exports.linkedErrorsIntegration = _sentry_core.linkedErrorsIntegration;
|
|
116
|
+
exports.logger = _sentry_core.logger;
|
|
117
|
+
exports.lruMemoizerIntegration = _sentry_server_utils.lruMemoizerIntegration;
|
|
118
|
+
exports.mastraIntegration = _sentry_server_utils.mastraIntegration;
|
|
119
|
+
exports.mcpServerIntegration = _sentry_server_utils.mcpServerIntegration;
|
|
120
|
+
exports.metrics = _sentry_core.metrics;
|
|
121
|
+
exports.mistralAIIntegration = _sentry_server_utils.mistralAIIntegration;
|
|
122
|
+
exports.moduleMetadataIntegration = _sentry_core.moduleMetadataIntegration;
|
|
123
|
+
exports.mongoIntegration = _sentry_server_utils.mongoIntegration;
|
|
124
|
+
exports.mongooseIntegration = _sentry_server_utils.mongooseIntegration;
|
|
125
|
+
exports.mysql2Integration = _sentry_server_utils.mysql2Integration;
|
|
126
|
+
exports.mysqlIntegration = _sentry_server_utils.mysqlIntegration;
|
|
127
|
+
exports.neonIntegration = _sentry_server_utils.neonIntegration;
|
|
128
|
+
exports.nitroIntegration = _sentry_server_utils.nitroIntegration;
|
|
129
|
+
exports.openAIIntegration = _sentry_server_utils.openAIIntegration;
|
|
130
|
+
exports.openTelemetryIntegration = _sentry_server_utils.openTelemetryIntegration;
|
|
131
|
+
exports.parameterize = _sentry_core.parameterize;
|
|
132
|
+
exports.piAiIntegration = _sentry_server_utils.piAiIntegration;
|
|
133
|
+
exports.piDurableIntegration = _sentry_server_utils.piDurableIntegration;
|
|
134
|
+
exports.postgresIntegration = _sentry_server_utils.postgresIntegration;
|
|
135
|
+
exports.postgresJsIntegration = _sentry_server_utils.postgresJsIntegration;
|
|
136
|
+
exports.prismaIntegration = _sentry_server_utils.prismaIntegration;
|
|
137
|
+
exports.redisIntegration = _sentry_server_utils.redisIntegration;
|
|
138
|
+
exports.requestDataIntegration = _sentry_core.requestDataIntegration;
|
|
139
|
+
exports.rewriteFramesIntegration = _sentry_core.rewriteFramesIntegration;
|
|
140
|
+
exports.sentryPagesPlugin = require_pages_plugin.sentryPagesPlugin;
|
|
141
|
+
exports.serveTunnelIntegration = _sentry_core_server.serveTunnelIntegration;
|
|
142
|
+
exports.setAsyncLocalStorageAsyncContextStrategy = _sentry_server_utils_no_diagnostic_channels.setAsyncLocalStorageAsyncContextStrategy;
|
|
143
|
+
exports.setAttribute = _sentry_core.setAttribute;
|
|
144
|
+
exports.setAttributes = _sentry_core.setAttributes;
|
|
145
|
+
exports.setContext = _sentry_core.setContext;
|
|
146
|
+
exports.setConversationId = _sentry_core.setConversationId;
|
|
147
|
+
exports.setCurrentClient = _sentry_core.setCurrentClient;
|
|
148
|
+
exports.setExtra = _sentry_core.setExtra;
|
|
149
|
+
exports.setExtras = _sentry_core.setExtras;
|
|
150
|
+
exports.setHttpStatus = _sentry_core.setHttpStatus;
|
|
151
|
+
exports.setMeasurement = _sentry_core.setMeasurement;
|
|
152
|
+
exports.setTag = _sentry_core.setTag;
|
|
153
|
+
exports.setTags = _sentry_core.setTags;
|
|
154
|
+
exports.setUser = _sentry_core.setUser;
|
|
155
|
+
exports.spanStreamingIntegration = _sentry_core.spanStreamingIntegration;
|
|
156
|
+
exports.spanToBaggageHeader = _sentry_core.spanToBaggageHeader;
|
|
157
|
+
exports.spanToJSON = _sentry_core.spanToJSON;
|
|
158
|
+
exports.spanToStaticSpanJSON = _sentry_core.spanToStaticSpanJSON;
|
|
159
|
+
exports.spanToTraceHeader = _sentry_core.spanToTraceHeader;
|
|
160
|
+
exports.spotlightIntegration = require_spotlight.spotlightIntegration;
|
|
161
|
+
exports.startInactiveSpan = _sentry_core.startInactiveSpan;
|
|
162
|
+
exports.startNewTrace = _sentry_core.startNewTrace;
|
|
163
|
+
exports.startSpan = _sentry_core.startSpan;
|
|
164
|
+
exports.startSpanManual = _sentry_core.startSpanManual;
|
|
165
|
+
exports.supabaseIntegration = _sentry_core.supabaseIntegration;
|
|
166
|
+
exports.suppressTracing = _sentry_core.suppressTracing;
|
|
167
|
+
exports.tediousIntegration = _sentry_server_utils.tediousIntegration;
|
|
168
|
+
exports.togetherAIIntegration = _sentry_server_utils.togetherAIIntegration;
|
|
169
|
+
exports.trpcMiddleware = _sentry_core_server.trpcMiddleware;
|
|
170
|
+
exports.typesafeIntegration = _sentry_server_utils.typesafeIntegration;
|
|
171
|
+
exports.updateSpanName = _sentry_core.updateSpanName;
|
|
172
|
+
exports.vercelAIIntegration = _sentry_server_utils.vercelAIIntegration;
|
|
173
|
+
exports.withActiveSpan = _sentry_core.withActiveSpan;
|
|
174
|
+
exports.withIsolationScope = _sentry_core.withIsolationScope;
|
|
175
|
+
exports.withMonitor = _sentry_core.withMonitor;
|
|
176
|
+
exports.withScope = _sentry_core.withScope;
|
|
177
|
+
exports.withSentry = require_withSentry.withSentry;
|
|
178
|
+
exports.withStaticSpan = _sentry_core.withStaticSpan;
|
|
179
|
+
exports.withStreamedSpan = _sentry_core.withStreamedSpan;
|
|
180
|
+
exports.wrapMcpServerWithSentry = _sentry_core_server.wrapMcpServerWithSentry;
|
|
181
|
+
exports.zodErrorsIntegration = _sentry_core.zodErrorsIntegration;
|
|
@@ -1,56 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const core = require('@sentry/core');
|
|
4
|
-
|
|
1
|
+
let _sentry_core = require("@sentry/core");
|
|
2
|
+
// src/instrument.ts
|
|
5
3
|
const GLOBAL_KEY = "__SENTRY_INSTRUMENTED_MAP__";
|
|
6
4
|
function getInstrumentedMap() {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
return globalObj[GLOBAL_KEY];
|
|
5
|
+
const globalObj = globalThis;
|
|
6
|
+
if (!globalObj[GLOBAL_KEY]) globalObj[GLOBAL_KEY] = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
return globalObj[GLOBAL_KEY];
|
|
12
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Check if a value can be used as a WeakMap key.
|
|
11
|
+
* WeakMap keys must be objects or non-registered symbols.
|
|
12
|
+
*/
|
|
13
13
|
function isWeakMapKey(value) {
|
|
14
|
-
|
|
14
|
+
return (0, _sentry_core.isObjectLike)(value) || typeof value === "function";
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Mark an object as instrumented, storing the instrumented version.
|
|
18
|
+
* @param original The original uninstrumented object
|
|
19
|
+
* @param instrumented The instrumented version (defaults to original if not provided)
|
|
20
|
+
*/
|
|
16
21
|
function markAsInstrumented(original, instrumented) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (isWeakMapKey(instrumented) && instrumented !== original) {
|
|
22
|
-
getInstrumentedMap().set(instrumented, instrumented);
|
|
23
|
-
}
|
|
24
|
-
} catch {
|
|
25
|
-
}
|
|
22
|
+
try {
|
|
23
|
+
if (isWeakMapKey(original)) getInstrumentedMap().set(original, instrumented ?? original);
|
|
24
|
+
if (isWeakMapKey(instrumented) && instrumented !== original) getInstrumentedMap().set(instrumented, instrumented);
|
|
25
|
+
} catch {}
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Get the instrumented version of an object, if available.
|
|
29
|
+
* Returns the instrumented version if the object was previously instrumented,
|
|
30
|
+
* or undefined if not found.
|
|
31
|
+
*/
|
|
27
32
|
function getInstrumented(obj) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return void 0;
|
|
35
|
-
}
|
|
33
|
+
try {
|
|
34
|
+
if (isWeakMapKey(obj)) return getInstrumentedMap().get(obj);
|
|
35
|
+
return;
|
|
36
|
+
} catch {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
36
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Returns the already-instrumented version of `original` if one exists,
|
|
42
|
+
* otherwise calls `instrumentFn` to create it, marks the mapping, and returns it.
|
|
43
|
+
*
|
|
44
|
+
* @param noMark - If true, skips storing the original→instrumented mapping.
|
|
45
|
+
*/
|
|
37
46
|
function ensureInstrumented(original, instrumentFn, noMark) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (!noMark) {
|
|
44
|
-
markAsInstrumented(original, instrumented);
|
|
45
|
-
}
|
|
46
|
-
return instrumented;
|
|
47
|
+
const existing = getInstrumented(original);
|
|
48
|
+
if (existing) return existing;
|
|
49
|
+
const instrumented = instrumentFn(original);
|
|
50
|
+
if (!noMark) markAsInstrumented(original, instrumented);
|
|
51
|
+
return instrumented;
|
|
47
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Applies `wrap` to `Class` unless `Class` is already an instrumented wrapper.
|
|
55
|
+
*
|
|
56
|
+
* Emitted by the Vite auto-instrumentation transform for classes the worker entry only re-exports:
|
|
57
|
+
* such a class may already be hand-wrapped with `instrument*WithSentry` in the module it comes
|
|
58
|
+
* from, which the build cannot see. Wrapping again would nest two proxies and instrument the same
|
|
59
|
+
* work twice, duplicated child spans, so the hand-wrapped class is returned as-is. Not part of the
|
|
60
|
+
* public API, hand-written wrapper calls are deliberately left untouched by this guard.
|
|
61
|
+
*/
|
|
48
62
|
function _INTERNAL_wrapUnlessInstrumented(wrap, optionsCallback, Class) {
|
|
49
|
-
|
|
63
|
+
return getInstrumented(Class) === Class ? Class : wrap(optionsCallback, Class);
|
|
50
64
|
}
|
|
51
|
-
|
|
52
65
|
exports._INTERNAL_wrapUnlessInstrumented = _INTERNAL_wrapUnlessInstrumented;
|
|
53
66
|
exports.ensureInstrumented = ensureInstrumented;
|
|
54
67
|
exports.getInstrumented = getInstrumented;
|
|
55
68
|
exports.markAsInstrumented = markAsInstrumented;
|
|
56
|
-
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=instrument.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrument.js","sources":["../../../src/instrument.ts"],"sourcesContent":["// Use a global WeakMap to track instrumented objects across module instances.\n// This is important for Cloudflare Workers where the module may be bundled\n// separately for workers and Durable Objects, but they share the same global scope.\n// The WeakMap stores original -> instrumented mappings so we can retrieve the\n// instrumented version even if we only have a reference to the original.\nimport { isObjectLike } from '@sentry/core';\n\nconst GLOBAL_KEY = '__SENTRY_INSTRUMENTED_MAP__' as const;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getInstrumentedMap(): WeakMap<any, any> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const globalObj = globalThis as typeof globalThis & { [GLOBAL_KEY]?: WeakMap<any, any> };\n if (!globalObj[GLOBAL_KEY]) {\n globalObj[GLOBAL_KEY] = new WeakMap();\n }\n return globalObj[GLOBAL_KEY];\n}\n\n/**\n * Check if a value can be used as a WeakMap key.\n * WeakMap keys must be objects or non-registered symbols.\n */\nfunction isWeakMapKey(value: unknown): value is object {\n return isObjectLike(value) || typeof value === 'function';\n}\n\n/**\n * Mark an object as instrumented, storing the instrumented version.\n * @param original The original uninstrumented object\n * @param instrumented The instrumented version (defaults to original if not provided)\n */\nexport function markAsInstrumented<T>(original: T, instrumented?: T): void {\n try {\n if (isWeakMapKey(original)) {\n // Store mapping from original to instrumented version\n // If instrumented is not provided, store original (for backwards compat)\n getInstrumentedMap().set(original, instrumented ?? original);\n }\n // Also mark the instrumented version itself so we recognize it\n if (isWeakMapKey(instrumented) && instrumented !== original) {\n getInstrumentedMap().set(instrumented, instrumented);\n }\n } catch {\n // ignore errors here\n }\n}\n\n/**\n * Get the instrumented version of an object, if available.\n * Returns the instrumented version if the object was previously instrumented,\n * or undefined if not found.\n */\nexport function getInstrumented<T>(obj: T): T | undefined {\n try {\n if (isWeakMapKey(obj)) {\n return getInstrumentedMap().get(obj) as T | undefined;\n }\n\n return undefined;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Returns the already-instrumented version of `original` if one exists,\n * otherwise calls `instrumentFn` to create it, marks the mapping, and returns it.\n *\n * @param noMark - If true, skips storing the original→instrumented mapping.\n */\nexport function ensureInstrumented<T>(original: T, instrumentFn: (original: T) => T, noMark?: boolean): T {\n const existing = getInstrumented(original);\n\n if (existing) {\n return existing;\n }\n\n const instrumented = instrumentFn(original);\n\n if (!noMark) {\n markAsInstrumented(original, instrumented);\n }\n\n return instrumented;\n}\n\n/**\n * Applies `wrap` to `Class` unless `Class` is already an instrumented wrapper.\n *\n * Emitted by the Vite auto-instrumentation transform for classes the worker entry only re-exports:\n * such a class may already be hand-wrapped with `instrument*WithSentry` in the module it comes\n * from, which the build cannot see. Wrapping again would nest two proxies and instrument the same\n * work twice, duplicated child spans, so the hand-wrapped class is returned as-is. Not part of the\n * public API, hand-written wrapper calls are deliberately left untouched by this guard.\n */\nexport function _INTERNAL_wrapUnlessInstrumented<C>(\n wrap: (optionsCallback: (env: never) => unknown, Class: C) => C,\n optionsCallback: (env: never) => unknown,\n Class: C,\n): C {\n return getInstrumented(Class) === Class ? Class : wrap(optionsCallback, Class);\n}\n"],"
|
|
1
|
+
{"version":3,"file":"instrument.js","names":["isObjectLike"],"sources":["../../../src/instrument.ts"],"sourcesContent":["// Use a global WeakMap to track instrumented objects across module instances.\n// This is important for Cloudflare Workers where the module may be bundled\n// separately for workers and Durable Objects, but they share the same global scope.\n// The WeakMap stores original -> instrumented mappings so we can retrieve the\n// instrumented version even if we only have a reference to the original.\nimport { isObjectLike } from '@sentry/core';\n\nconst GLOBAL_KEY = '__SENTRY_INSTRUMENTED_MAP__' as const;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getInstrumentedMap(): WeakMap<any, any> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const globalObj = globalThis as typeof globalThis & { [GLOBAL_KEY]?: WeakMap<any, any> };\n if (!globalObj[GLOBAL_KEY]) {\n globalObj[GLOBAL_KEY] = new WeakMap();\n }\n return globalObj[GLOBAL_KEY];\n}\n\n/**\n * Check if a value can be used as a WeakMap key.\n * WeakMap keys must be objects or non-registered symbols.\n */\nfunction isWeakMapKey(value: unknown): value is object {\n return isObjectLike(value) || typeof value === 'function';\n}\n\n/**\n * Mark an object as instrumented, storing the instrumented version.\n * @param original The original uninstrumented object\n * @param instrumented The instrumented version (defaults to original if not provided)\n */\nexport function markAsInstrumented<T>(original: T, instrumented?: T): void {\n try {\n if (isWeakMapKey(original)) {\n // Store mapping from original to instrumented version\n // If instrumented is not provided, store original (for backwards compat)\n getInstrumentedMap().set(original, instrumented ?? original);\n }\n // Also mark the instrumented version itself so we recognize it\n if (isWeakMapKey(instrumented) && instrumented !== original) {\n getInstrumentedMap().set(instrumented, instrumented);\n }\n } catch {\n // ignore errors here\n }\n}\n\n/**\n * Get the instrumented version of an object, if available.\n * Returns the instrumented version if the object was previously instrumented,\n * or undefined if not found.\n */\nexport function getInstrumented<T>(obj: T): T | undefined {\n try {\n if (isWeakMapKey(obj)) {\n return getInstrumentedMap().get(obj) as T | undefined;\n }\n\n return undefined;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Returns the already-instrumented version of `original` if one exists,\n * otherwise calls `instrumentFn` to create it, marks the mapping, and returns it.\n *\n * @param noMark - If true, skips storing the original→instrumented mapping.\n */\nexport function ensureInstrumented<T>(original: T, instrumentFn: (original: T) => T, noMark?: boolean): T {\n const existing = getInstrumented(original);\n\n if (existing) {\n return existing;\n }\n\n const instrumented = instrumentFn(original);\n\n if (!noMark) {\n markAsInstrumented(original, instrumented);\n }\n\n return instrumented;\n}\n\n/**\n * Applies `wrap` to `Class` unless `Class` is already an instrumented wrapper.\n *\n * Emitted by the Vite auto-instrumentation transform for classes the worker entry only re-exports:\n * such a class may already be hand-wrapped with `instrument*WithSentry` in the module it comes\n * from, which the build cannot see. Wrapping again would nest two proxies and instrument the same\n * work twice, duplicated child spans, so the hand-wrapped class is returned as-is. Not part of the\n * public API, hand-written wrapper calls are deliberately left untouched by this guard.\n */\nexport function _INTERNAL_wrapUnlessInstrumented<C>(\n wrap: (optionsCallback: (env: never) => unknown, Class: C) => C,\n optionsCallback: (env: never) => unknown,\n Class: C,\n): C {\n return getInstrumented(Class) === Class ? Class : wrap(optionsCallback, Class);\n}\n"],"mappings":";;AAOA,MAAM,aAAa;AAGnB,SAAS,qBAAwC;CAE/C,MAAM,YAAY;CAClB,IAAI,CAAC,UAAU,aACb,UAAU,8BAAc,IAAI,QAAQ;CAEtC,OAAO,UAAU;AACnB;;;;;AAMA,SAAS,aAAa,OAAiC;CACrD,QAAA,GAAOA,aAAAA,aAAAA,CAAa,KAAK,KAAK,OAAO,UAAU;AACjD;;;;;;AAOA,SAAgB,mBAAsB,UAAa,cAAwB;CACzE,IAAI;EACF,IAAI,aAAa,QAAQ,GAGvB,mBAAmB,CAAC,CAAC,IAAI,UAAU,gBAAgB,QAAQ;EAG7D,IAAI,aAAa,YAAY,KAAK,iBAAiB,UACjD,mBAAmB,CAAC,CAAC,IAAI,cAAc,YAAY;CAEvD,QAAQ,CAER;AACF;;;;;;AAOA,SAAgB,gBAAmB,KAAuB;CACxD,IAAI;EACF,IAAI,aAAa,GAAG,GAClB,OAAO,mBAAmB,CAAC,CAAC,IAAI,GAAG;EAGrC;CACF,QAAQ;EACN;CACF;AACF;;;;;;;AAQA,SAAgB,mBAAsB,UAAa,cAAkC,QAAqB;CACxG,MAAM,WAAW,gBAAgB,QAAQ;CAEzC,IAAI,UACF,OAAO;CAGT,MAAM,eAAe,aAAa,QAAQ;CAE1C,IAAI,CAAC,QACH,mBAAmB,UAAU,YAAY;CAG3C,OAAO;AACT;;;;;;;;;;AAWA,SAAgB,iCACd,MACA,iBACA,OACG;CACH,OAAO,gBAAgB,KAAK,MAAM,QAAQ,QAAQ,KAAK,iBAAiB,KAAK;AAC/E"}
|
|
@@ -1,16 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const require_instrumentAgentCallableRpc = require("./instrumentAgentCallableRpc.js");
|
|
2
|
+
const require_instrumentAgentRequestConversation = require("./instrumentAgentRequestConversation.js");
|
|
3
|
+
const require_instrumentChatAgentConversation = require("./instrumentChatAgentConversation.js");
|
|
4
|
+
// src/instrumentations/agents/index.ts
|
|
5
|
+
/**
|
|
6
|
+
* Instruments an instance of a Cloudflare [`agents`](https://www.npmjs.com/package/agents) `Agent`
|
|
7
|
+
* with Sentry, adding telemetry that is specific to the Agent's runtime behavior:
|
|
8
|
+
*
|
|
9
|
+
* - **Callable RPC spans** — a span (op `rpc`) for each `@callable()` method invoked over WebSocket.
|
|
10
|
+
* - **Conversation correlation** — sets the conversation id on the scope for each unit of agent
|
|
11
|
+
* work — chat turn, callable RPC call, or HTTP request — so `gen_ai` spans created within it are
|
|
12
|
+
* correlated, for chat and plain agents alike. The id is minted once per agent instance and
|
|
13
|
+
* rotated when the chat is cleared (the `message:clear` observability event); it is persisted to
|
|
14
|
+
* Durable Object storage so it survives hibernation.
|
|
15
|
+
*
|
|
16
|
+
* It only hooks the `agents` package internals and uses Sentry's tracing primitives. On Cloudflare
|
|
17
|
+
* Workers, prefer `instrumentAgentWithSentry`, which additionally instruments the Durable Object
|
|
18
|
+
* handlers and initializes the SDK; that function calls this one internally.
|
|
19
|
+
*
|
|
20
|
+
* The hooks replace own-properties on the instance and defer to the original implementation, so
|
|
21
|
+
* they compose with any other instrumentation applied to the same instance.
|
|
22
|
+
*
|
|
23
|
+
* @param agent The `agents` `Agent` instance to instrument.
|
|
24
|
+
* @returns The same instance, instrumented.
|
|
25
|
+
*
|
|
26
|
+
* @internal Use `instrumentAgentWithSentry` instead — this is called internally by it.
|
|
27
|
+
*/
|
|
7
28
|
function instrumentCloudflareAgent(agent) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
29
|
+
const internals = agent;
|
|
30
|
+
require_instrumentAgentCallableRpc.instrumentAgentCallableRpc(internals);
|
|
31
|
+
require_instrumentChatAgentConversation.instrumentChatAgentConversation(internals);
|
|
32
|
+
require_instrumentAgentRequestConversation.instrumentAgentRequestConversation(internals);
|
|
33
|
+
return agent;
|
|
13
34
|
}
|
|
14
|
-
|
|
15
35
|
exports.instrumentCloudflareAgent = instrumentCloudflareAgent;
|
|
16
|
-
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/instrumentations/agents/index.ts"],"sourcesContent":["import { instrumentAgentCallableRpc } from './instrumentAgentCallableRpc';\nimport { instrumentAgentRequestConversation } from './instrumentAgentRequestConversation';\nimport { instrumentChatAgentConversation } from './instrumentChatAgentConversation';\nimport type { AgentInternals } from './types';\n\n/**\n * Instruments an instance of a Cloudflare [`agents`](https://www.npmjs.com/package/agents) `Agent`\n * with Sentry, adding telemetry that is specific to the Agent's runtime behavior:\n *\n * - **Callable RPC spans** — a span (op `rpc`) for each `@callable()` method invoked over WebSocket.\n * - **Conversation correlation** — sets the conversation id on the scope for each unit of agent\n * work — chat turn, callable RPC call, or HTTP request — so `gen_ai` spans created within it are\n * correlated, for chat and plain agents alike. The id is minted once per agent instance and\n * rotated when the chat is cleared (the `message:clear` observability event); it is persisted to\n * Durable Object storage so it survives hibernation.\n *\n * It only hooks the `agents` package internals and uses Sentry's tracing primitives. On Cloudflare\n * Workers, prefer `instrumentAgentWithSentry`, which additionally instruments the Durable Object\n * handlers and initializes the SDK; that function calls this one internally.\n *\n * The hooks replace own-properties on the instance and defer to the original implementation, so\n * they compose with any other instrumentation applied to the same instance.\n *\n * @param agent The `agents` `Agent` instance to instrument.\n * @returns The same instance, instrumented.\n *\n * @internal Use `instrumentAgentWithSentry` instead — this is called internally by it.\n */\nexport function instrumentCloudflareAgent<T extends object>(agent: T): T {\n const internals = agent as T & AgentInternals;\n\n instrumentAgentCallableRpc(internals);\n instrumentChatAgentConversation(internals);\n instrumentAgentRequestConversation(internals);\n\n return agent;\n}\n"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":["instrumentAgentCallableRpc","instrumentChatAgentConversation","instrumentAgentRequestConversation"],"sources":["../../../../../src/instrumentations/agents/index.ts"],"sourcesContent":["import { instrumentAgentCallableRpc } from './instrumentAgentCallableRpc';\nimport { instrumentAgentRequestConversation } from './instrumentAgentRequestConversation';\nimport { instrumentChatAgentConversation } from './instrumentChatAgentConversation';\nimport type { AgentInternals } from './types';\n\n/**\n * Instruments an instance of a Cloudflare [`agents`](https://www.npmjs.com/package/agents) `Agent`\n * with Sentry, adding telemetry that is specific to the Agent's runtime behavior:\n *\n * - **Callable RPC spans** — a span (op `rpc`) for each `@callable()` method invoked over WebSocket.\n * - **Conversation correlation** — sets the conversation id on the scope for each unit of agent\n * work — chat turn, callable RPC call, or HTTP request — so `gen_ai` spans created within it are\n * correlated, for chat and plain agents alike. The id is minted once per agent instance and\n * rotated when the chat is cleared (the `message:clear` observability event); it is persisted to\n * Durable Object storage so it survives hibernation.\n *\n * It only hooks the `agents` package internals and uses Sentry's tracing primitives. On Cloudflare\n * Workers, prefer `instrumentAgentWithSentry`, which additionally instruments the Durable Object\n * handlers and initializes the SDK; that function calls this one internally.\n *\n * The hooks replace own-properties on the instance and defer to the original implementation, so\n * they compose with any other instrumentation applied to the same instance.\n *\n * @param agent The `agents` `Agent` instance to instrument.\n * @returns The same instance, instrumented.\n *\n * @internal Use `instrumentAgentWithSentry` instead — this is called internally by it.\n */\nexport function instrumentCloudflareAgent<T extends object>(agent: T): T {\n const internals = agent as T & AgentInternals;\n\n instrumentAgentCallableRpc(internals);\n instrumentChatAgentConversation(internals);\n instrumentAgentRequestConversation(internals);\n\n return agent;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,SAAgB,0BAA4C,OAAa;CACvE,MAAM,YAAY;CAElBA,mCAAAA,2BAA2B,SAAS;CACpCC,wCAAAA,gCAAgC,SAAS;CACzCC,2CAAAA,mCAAmC,SAAS;CAE5C,OAAO;AACT"}
|