@sentry/cloudflare 11.0.0-alpha.0 → 11.0.0-alpha.2
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 +116 -24
- 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 +24 -8
- 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 +4 -3
- package/build/cjs/dev/index.js.map +1 -1
- package/build/cjs/dev/instrumentations/instrumentDurableObjectNamespace.js +4 -4
- package/build/cjs/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js +8 -16
- package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentD1.js +5 -1
- 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 -5
- 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/instrumentR2.js +21 -18
- package/build/cjs/dev/instrumentations/worker/instrumentR2.js.map +1 -1
- package/build/cjs/dev/instrumentations/worker/instrumentRateLimit.js +6 -1
- package/build/cjs/dev/instrumentations/worker/instrumentRateLimit.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 +12 -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/rpcPropagation.js +15 -0
- package/build/cjs/dev/utils/rpcPropagation.js.map +1 -0
- 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 +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 +133 -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 +116 -24
- 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 +24 -8
- 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 +4 -3
- package/build/cjs/prod/index.js.map +1 -1
- package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js +4 -4
- package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js +8 -16
- package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentD1.js +5 -1
- 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 -5
- 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/instrumentR2.js +21 -18
- package/build/cjs/prod/instrumentations/worker/instrumentR2.js.map +1 -1
- package/build/cjs/prod/instrumentations/worker/instrumentRateLimit.js +6 -1
- package/build/cjs/prod/instrumentations/worker/instrumentRateLimit.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 +12 -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/rpcPropagation.js +15 -0
- package/build/cjs/prod/utils/rpcPropagation.js.map +1 -0
- 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 +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 +133 -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 +117 -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 +23 -7
- 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 +3 -4
- package/build/esm/dev/index.js.map +1 -1
- package/build/esm/dev/instrumentations/instrumentDurableObjectNamespace.js +4 -4
- package/build/esm/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js +8 -16
- package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentD1.js +6 -2
- 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 +5 -5
- 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/instrumentR2.js +22 -19
- package/build/esm/dev/instrumentations/worker/instrumentR2.js.map +1 -1
- package/build/esm/dev/instrumentations/worker/instrumentRateLimit.js +6 -1
- package/build/esm/dev/instrumentations/worker/instrumentRateLimit.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 +12 -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/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/vite/autoInstrument.js +2 -1
- package/build/esm/dev/vite/autoInstrument.js.map +1 -1
- package/build/esm/dev/vite/index.js +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 +131 -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 +117 -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 +23 -7
- 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 +3 -4
- package/build/esm/prod/index.js.map +1 -1
- package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js +4 -4
- package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
- package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js +8 -16
- package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentD1.js +6 -2
- 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 +5 -5
- 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/instrumentR2.js +22 -19
- package/build/esm/prod/instrumentations/worker/instrumentR2.js.map +1 -1
- package/build/esm/prod/instrumentations/worker/instrumentRateLimit.js +6 -1
- package/build/esm/prod/instrumentations/worker/instrumentRateLimit.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 +12 -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/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/vite/autoInstrument.js +2 -1
- package/build/esm/prod/vite/autoInstrument.js.map +1 -1
- package/build/esm/prod/vite/index.js +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 +131 -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 +94 -21
- 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 +3 -4
- package/build/types/index.d.ts.map +1 -1
- package/build/types/instrumentations/instrumentDurableObjectNamespace.d.ts +2 -1
- package/build/types/instrumentations/instrumentDurableObjectNamespace.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.map +1 -1
- package/build/types/instrumentations/worker/instrumentQueue.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentR2.d.ts.map +1 -1
- package/build/types/instrumentations/worker/instrumentRateLimit.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/rpcPropagation.d.ts +10 -0
- package/build/types/utils/rpcPropagation.d.ts.map +1 -0
- package/build/types/vite/autoInstrument.d.ts.map +1 -1
- package/build/types/vite/index.d.ts +24 -20
- 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/integrations/tracing/vercelai.js +0 -18
- package/build/cjs/dev/integrations/tracing/vercelai.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/integrations/tracing/vercelai.js +0 -16
- package/build/esm/dev/integrations/tracing/vercelai.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/integrations/tracing/vercelai.d.ts +0 -40
- package/build/types/integrations/tracing/vercelai.d.ts.map +0 -1
|
@@ -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"}
|
|
@@ -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":"autoInstrument.d.ts","sourceRoot":"","sources":["../../../src/vite/autoInstrument.ts"],"names":[],"mappings":"AACA,OAAO,EAA8C,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAgB/F,wBAAgB,oCAAoC,CAAC,OAAO,GAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAO;IAQ9F,IAAI;IAEJ,cAAc,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE;YAAE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAA;KAAE,GAAG,IAAI;IAiC9E,SAAS,OACP,cAAc,GAAG;QAAE,IAAI,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,QAC9E,MAAM,MACR,MAAM,GACT,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"autoInstrument.d.ts","sourceRoot":"","sources":["../../../src/vite/autoInstrument.ts"],"names":[],"mappings":"AACA,OAAO,EAA8C,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAgB/F,wBAAgB,oCAAoC,CAAC,OAAO,GAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAO;IAQ9F,IAAI;IAEJ,cAAc,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE;YAAE,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAA;KAAE,GAAG,IAAI;IAiC9E,SAAS,OACP,cAAc,GAAG;QAAE,IAAI,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,QAC9E,MAAM,MACR,MAAM,GACT,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;EAkFzD"}
|
|
@@ -28,33 +28,37 @@ export interface SentryCloudflareVitePluginOptions {
|
|
|
28
28
|
*/
|
|
29
29
|
buildTimeInstrumentation?: boolean;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Automatically wraps your Worker at build time so you don't have to edit
|
|
32
|
+
* your entry: the plugin reads your wrangler config, wraps the default
|
|
33
|
+
* export with `Sentry.withSentry()` (sourcing options from a co-located
|
|
34
|
+
* `instrument.*` file, falling back to env), and wraps any configured
|
|
35
|
+
* Durable Object class with `instrumentDurableObjectWithSentry`. Both
|
|
36
|
+
* `vite build` and `vite dev` are instrumented. Already-wrapped entries are
|
|
37
|
+
* left alone, so this is safe alongside manual instrumentation. Set to
|
|
38
|
+
* `false` to opt out.
|
|
39
|
+
*
|
|
40
|
+
* The plugin also adds the bindings that resolve to the wrapped classes (this worker's own
|
|
41
|
+
* Durable Objects and self service bindings) to `rpcTracePropagationBindings`. Bindings to
|
|
42
|
+
* other workers stay opt-in, their receivers may not run Sentry.
|
|
43
|
+
*
|
|
44
|
+
* @default true
|
|
32
45
|
*/
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Automatically wraps your Worker at build time so you don't have to edit
|
|
36
|
-
* your entry: the plugin reads your wrangler config, wraps the default
|
|
37
|
-
* export with `Sentry.withSentry()` (sourcing options from a co-located
|
|
38
|
-
* `instrument.*` file, falling back to env), and wraps any configured
|
|
39
|
-
* Durable Object class with `instrumentDurableObjectWithSentry`. Both
|
|
40
|
-
* `vite build` and `vite dev` are instrumented.
|
|
41
|
-
*
|
|
42
|
-
* @default false
|
|
43
|
-
* @experimental May change or be removed in any release.
|
|
44
|
-
*/
|
|
45
|
-
autoInstrumentation?: boolean;
|
|
46
|
-
};
|
|
46
|
+
autoInstrumentation?: boolean;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Sentry Vite plugin for Cloudflare Workers.
|
|
50
50
|
*
|
|
51
51
|
* Add this plugin to your Vite configuration to enable additional Sentry
|
|
52
|
-
* instrumentation for Cloudflare Workers built with Vite.
|
|
53
|
-
* SDK in your Worker as usual with `Sentry.withSentry()`.
|
|
52
|
+
* instrumentation for Cloudflare Workers built with Vite.
|
|
54
53
|
*
|
|
55
|
-
* By default, the plugin
|
|
56
|
-
*
|
|
57
|
-
*
|
|
54
|
+
* By default, the plugin
|
|
55
|
+
* - build-time instruments supported dependencies (such as database clients) so
|
|
56
|
+
* they are traced without changing your application code — opt out with
|
|
57
|
+
* `buildTimeInstrumentation: false`, and
|
|
58
|
+
* - wraps your Worker entry (and any Durable Object, Workflow or
|
|
59
|
+
* WorkerEntrypoint class in your wrangler config) with the matching Sentry
|
|
60
|
+
* helper — opt out with `autoInstrumentation: false` and call
|
|
61
|
+
* `Sentry.withSentry()` yourself.
|
|
58
62
|
*
|
|
59
63
|
* @example
|
|
60
64
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;;;;;;OAYG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;;;;;;OAYG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;;;;;;;;;;;;;OAeG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,GAAE,iCAAsC,GAAG,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CASnH"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import MagicString from 'magic-string';
|
|
2
|
+
import { type SameWorkerBinding } from './wranglerConfig';
|
|
2
3
|
export interface BaseNode {
|
|
3
4
|
type: string;
|
|
4
5
|
start: number;
|
|
@@ -34,6 +35,8 @@ export interface TransformContext {
|
|
|
34
35
|
optionsFn: string;
|
|
35
36
|
/** Import statement prepended when `optionsFn` references a separate module. */
|
|
36
37
|
optionsImport?: string;
|
|
38
|
+
/** @see {@link import('./wranglerConfig').WranglerConfig.sameWorkerBindings} */
|
|
39
|
+
sameWorkerBindings?: readonly SameWorkerBinding[];
|
|
37
40
|
}
|
|
38
41
|
export interface TransformResult {
|
|
39
42
|
code: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/vite/transform.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/vite/transform.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,EAAmC,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAS3F,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,EAAE,CAAC;CAClB;AAuDD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,kBAAkB,CAAC;AAc3F,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7C;;;OAGG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gFAAgF;IAChF,kBAAkB,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACnD;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;IAC5C;;;;OAIG;IACH,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,gBAAgB,GACpB,eAAe,GAAG,SAAS,CAsD7B"}
|
|
@@ -20,6 +20,19 @@ export interface WranglerConfig {
|
|
|
20
20
|
* an export on a *different* worker, which this build can't wrap.
|
|
21
21
|
*/
|
|
22
22
|
workerEntrypoints: string[];
|
|
23
|
+
/**
|
|
24
|
+
* Bindings whose RPC receiver lives in this worker, so this build instruments it. Not deduped by
|
|
25
|
+
* class, two bindings may point at the same class and both names have to be listed.
|
|
26
|
+
*/
|
|
27
|
+
sameWorkerBindings: SameWorkerBinding[];
|
|
28
|
+
}
|
|
29
|
+
/** Stands in for a class name where a binding targets the module's default export. */
|
|
30
|
+
export declare const DEFAULT_EXPORT: unique symbol;
|
|
31
|
+
/** The name a binding or an export is known by, either an exported class name or the default export. */
|
|
32
|
+
export type ExportName = string | typeof DEFAULT_EXPORT;
|
|
33
|
+
export interface SameWorkerBinding {
|
|
34
|
+
bindingName: string;
|
|
35
|
+
className: ExportName;
|
|
23
36
|
}
|
|
24
37
|
/**
|
|
25
38
|
* Locate and resolve the wrangler configuration via wrangler's own
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wranglerConfig.d.ts","sourceRoot":"","sources":["../../../src/vite/wranglerConfig.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,SAAS,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtD;;;;;OAKG;IACH,iBAAiB,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"wranglerConfig.d.ts","sourceRoot":"","sources":["../../../src/vite/wranglerConfig.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D,SAAS,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtD;;;;;OAKG;IACH,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B;;;OAGG;IACH,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAED,sFAAsF;AACtF,eAAO,MAAM,cAAc,eAA0B,CAAC;AAEtD,wGAAwG;AACxG,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,cAAc,CAAC;AAExD,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,UAAU,CAAC;CACvB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,YAAY,CAAC,EAAE,MAAM,GACpB;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CA4B3D"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { AnyExportedHandler, DefaultEnv, ResolveEnv } from './types';
|
|
1
|
+
import type { AnyExportedHandler, DefaultEnv, ResolveEnv, StrictCloudflareOptions } from './types';
|
|
3
2
|
import { type WorkerEntrypointConstructor } from './instrumentations/instrumentWorkerEntrypoint';
|
|
4
3
|
/**
|
|
5
4
|
* Wrapper for Cloudflare handlers.
|
|
@@ -12,5 +11,5 @@ import { type WorkerEntrypointConstructor } from './instrumentations/instrumentW
|
|
|
12
11
|
* @param handler {ExportedHandler} The handler to wrap.
|
|
13
12
|
* @returns The wrapped handler.
|
|
14
13
|
*/
|
|
15
|
-
export declare function withSentry<Env = DefaultEnv, QueueHandlerMessage = unknown, CfHostMetadata = unknown, T extends AnyExportedHandler | WorkerEntrypointConstructor<any, any> = ExportedHandler<Env, QueueHandlerMessage, CfHostMetadata> | WorkerEntrypointConstructor<Env
|
|
14
|
+
export declare function withSentry<Env = DefaultEnv, QueueHandlerMessage = unknown, CfHostMetadata = unknown, T extends AnyExportedHandler | WorkerEntrypointConstructor<any, any> = ExportedHandler<Env, QueueHandlerMessage, CfHostMetadata> | WorkerEntrypointConstructor<Env>, O = unknown>(optionsCallback: (env: ResolveEnv<T, Env>) => StrictCloudflareOptions<O> | undefined, handler: T): T;
|
|
16
15
|
//# sourceMappingURL=withSentry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSentry.d.ts","sourceRoot":"","sources":["../../src/withSentry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"withSentry.d.ts","sourceRoot":"","sources":["../../src/withSentry.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AACnG,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,+CAA+C,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CACxB,GAAG,GAAG,UAAU,EAChB,mBAAmB,GAAG,OAAO,EAC7B,cAAc,GAAG,OAAO,EAExB,CAAC,SAAS,kBAAkB,GAAG,2BAA2B,CAAC,GAAG,EAAE,GAAG,CAAC,GAChE,eAAe,CAAC,GAAG,EAAE,mBAAmB,EAAE,cAAc,CAAC,GACzD,2BAA2B,CAAC,GAAG,CAAC,EACpC,CAAC,GAAG,OAAO,EACX,eAAe,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,uBAAuB,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAyBrG"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { WorkflowEntrypoint } from 'cloudflare:workers';
|
|
2
|
-
import type {
|
|
3
|
-
import type { DefaultEnv, ResolveEnv } from './types';
|
|
2
|
+
import type { DefaultEnv, ResolveEnv, StrictCloudflareOptions } from './types';
|
|
4
3
|
/**
|
|
5
4
|
* Hashes a string to a UUID using SHA-1.
|
|
6
5
|
*/
|
|
@@ -25,5 +24,6 @@ export declare function deterministicTraceIdFromInstanceId(instanceId: string):
|
|
|
25
24
|
export declare function instrumentWorkflowWithSentry<E = DefaultEnv, // Environment type
|
|
26
25
|
P = unknown, // Payload type
|
|
27
26
|
T extends WorkflowEntrypoint<any, any> = WorkflowEntrypoint<E, P>, // WorkflowEntrypoint type
|
|
28
|
-
C extends new (ctx: ExecutionContext, env: any) => WorkflowEntrypoint<any, any> = new (ctx: ExecutionContext, env: any) => T
|
|
27
|
+
C extends new (ctx: ExecutionContext, env: any) => WorkflowEntrypoint<any, any> = new (ctx: ExecutionContext, env: any) => T, // Constructor type of the WorkflowEntrypoint class
|
|
28
|
+
O = unknown>(optionsCallback: (env: ResolveEnv<C, E>) => StrictCloudflareOptions<O>, WorkFlowClass: C): C;
|
|
29
29
|
//# sourceMappingURL=workflows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/workflows.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/workflows.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAEV,kBAAkB,EASnB,MAAM,oBAAoB,CAAC;AAQ5B,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAK/E;;GAEG;AACH,wBAAsB,kCAAkC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAS5F;AAuJD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,4BAA4B,CAC1C,CAAC,GAAG,UAAU,EAAE,mBAAmB;AACnC,CAAC,GAAG,OAAO,EAAE,eAAe;AAE5B,CAAC,SAAS,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,0BAA0B;AAM7F,CAAC,SAAS,KAAK,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,GAAG,KAAK,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,KAChF,GAAG,EAAE,gBAAgB,EAErB,GAAG,EAAE,GAAG,KACL,CAAC,EAAE,mDAAmD;AAC3D,CAAC,GAAG,OAAO,EACX,eAAe,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,uBAAuB,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,GAAG,CAAC,CA6C7F"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import type { DurableObjectStorage } from '@cloudflare/workers-types';
|
|
2
|
+
import type { SerializedTraceData } from '@sentry/core';
|
|
2
3
|
import type { CloudflareOptions } from './client';
|
|
3
4
|
/** Extended DurableObjectState with originalStorage exposed by instrumentContext */
|
|
4
5
|
export interface InstrumentedDurableObjectState extends DurableObjectState {
|
|
5
6
|
originalStorage?: DurableObjectStorage;
|
|
6
7
|
}
|
|
7
8
|
type MethodWrapperOptions = {
|
|
8
|
-
|
|
9
|
+
/**
|
|
10
|
+
* The span name, or a resolver called with the RPC metadata of the current call.
|
|
11
|
+
* Returning `undefined` skips the span and only captures errors.
|
|
12
|
+
*/
|
|
13
|
+
spanName?: string | ((rpcMeta: SerializedTraceData | undefined) => string | undefined);
|
|
9
14
|
spanOp?: string;
|
|
10
15
|
options: CloudflareOptions;
|
|
11
16
|
context: ExecutionContext | InstrumentedDurableObjectState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapMethodWithSentry.d.ts","sourceRoot":"","sources":["../../src/wrapMethodWithSentry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"wrapMethodWithSentry.d.ts","sourceRoot":"","sources":["../../src/wrapMethodWithSentry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAYxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAUlD,oFAAoF;AACpF,MAAM,WAAW,8BAA+B,SAAQ,kBAAkB;IACxE,eAAe,CAAC,EAAE,oBAAoB,CAAC;CACxC;AAyBD,KAAK,oBAAoB,GAAG;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC;IACvF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,gBAAgB,GAAG,8BAA8B,CAAC;IAC3D;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAGF,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACtD,KAAK,cAAc,GAAG,eAAe,CAAC;AAEtC;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,cAAc,EAC3D,cAAc,EAAE,oBAAoB,EACpC,OAAO,EAAE,CAAC,EACV,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,EAC3C,MAAM,CAAC,EAAE,IAAI,GACZ,CAAC,CAsMH"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { CfProperties, IncomingRequestCfProperties } from '@cloudflare/workers-types';
|
|
2
|
+
import type { CloudflareClient, CloudflareOptions } from './client';
|
|
3
|
+
import type { ExecutionContextCompat } from './executionContext';
|
|
4
|
+
export 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;
|
|
21
|
+
/**
|
|
22
|
+
* Same as {@link wrapRequestHandler}, but with the SDK initialization injected.
|
|
23
|
+
*
|
|
24
|
+
* Wrappers that are only reachable from the main entry point — where `nodejs_compat` is a
|
|
25
|
+
* requirement anyway — pass `init` from `sdk.ts` to get the full default integrations.
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare function wrapRequestHandlerWithInit(wrapperOptions: RequestHandlerWrapperOptions, handler: (...args: unknown[]) => Response | Promise<Response>, initSdk: InitSdk): Promise<Response>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=wrapRequestHandlerWithInit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapRequestHandlerWithInit.d.ts","sourceRoot":"","sources":["../../src/wrapRequestHandlerWithInit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAoB3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAYjE,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,2BAA2B,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;IACxF,OAAO,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAC5C;;;;;;;;;OASG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,KAAK,OAAO,GAAG,CAAC,OAAO,EAAE,iBAAiB,KAAK,gBAAgB,GAAG,SAAS,CAAC;AAE5E;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,4BAA4B,EAC5C,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,EAC7D,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,CAAC,CAuKnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/cloudflare",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.2",
|
|
4
4
|
"description": "Official Sentry SDK for Cloudflare Workers and Pages",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/cloudflare",
|
|
@@ -48,9 +48,10 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@opentelemetry/api": "^1.9.1",
|
|
51
|
-
"@sentry/conventions": "^0.
|
|
52
|
-
"@sentry/core": "11.0.0-alpha.
|
|
53
|
-
"@sentry/
|
|
51
|
+
"@sentry/conventions": "^0.20.0",
|
|
52
|
+
"@sentry/core": "11.0.0-alpha.2",
|
|
53
|
+
"@sentry/opentelemetry": "11.0.0-alpha.2",
|
|
54
|
+
"@sentry/server-utils": "11.0.0-alpha.2",
|
|
54
55
|
"magic-string": "~0.30.21"
|
|
55
56
|
},
|
|
56
57
|
"peerDependencies": {
|
|
@@ -83,6 +84,7 @@
|
|
|
83
84
|
"clean": "rimraf build coverage sentry-cloudflare-*.tgz",
|
|
84
85
|
"lint:fix": "oxlint . --fix --type-aware",
|
|
85
86
|
"lint": "oxlint . --type-aware",
|
|
87
|
+
"lint:types": "oxlint src --type-aware --type-check",
|
|
86
88
|
"lint:es-compatibility": "es-check es2022 ./build/cjs/prod/*.js && es-check es2022 ./build/esm/prod/*.js --module",
|
|
87
89
|
"test": "yarn test:unit",
|
|
88
90
|
"test:unit": "vitest run",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
3
|
-
const core = require('@sentry/core');
|
|
4
|
-
const serverUtils = require('@sentry/server-utils');
|
|
5
|
-
|
|
6
|
-
const _vercelAIIntegration = ((options = {}) => {
|
|
7
|
-
const inner = serverUtils.vercelAiIntegration(options);
|
|
8
|
-
return core.extendIntegration(inner, {
|
|
9
|
-
options,
|
|
10
|
-
setup(client) {
|
|
11
|
-
serverUtils.addVercelAiProcessors(client);
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
const vercelAIIntegration = core.defineIntegration(_vercelAIIntegration);
|
|
16
|
-
|
|
17
|
-
exports.vercelAIIntegration = vercelAIIntegration;
|
|
18
|
-
//# sourceMappingURL=vercelai.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vercelai.js","sources":["../../../../../src/integrations/tracing/vercelai.ts"],"sourcesContent":["/**\n * This is a copy of the Vercel AI integration from the node SDK.\n *\n * The only difference is that it does not use `@opentelemetry/instrumentation`\n * because Cloudflare Workers do not support it.\n *\n * Therefore, we cannot automatically patch setting `experimental_telemetry: { isEnabled: true }`\n * and users have to manually set this to get spans.\n */\n\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration, extendIntegration } from '@sentry/core';\nimport { addVercelAiProcessors, vercelAiIntegration, type VercelAiOptions } from '@sentry/server-utils';\n\nconst _vercelAIIntegration = ((options: VercelAiOptions = {}) => {\n const inner = vercelAiIntegration(options);\n\n return extendIntegration(inner, {\n options,\n setup(client) {\n addVercelAiProcessors(client);\n },\n });\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.\n * This integration is not enabled by default, you need to manually add it.\n *\n * For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).\n *\n * You need to enable collecting spans for a specific call by setting\n * `experimental_telemetry.isEnabled` to `true` in the first argument of the function call.\n *\n * ```javascript\n * const result = await generateText({\n * model: openai('gpt-4-turbo'),\n * experimental_telemetry: { isEnabled: true },\n * });\n * ```\n *\n * If you want to collect inputs and outputs for a specific call, you must specifically opt-in to each\n * function call by setting `experimental_telemetry.recordInputs` and `experimental_telemetry.recordOutputs`\n * to `true`.\n *\n * ```javascript\n * const result = await generateText({\n * model: openai('gpt-4-turbo'),\n * experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },\n * });\n */\nexport const vercelAIIntegration = defineIntegration(_vercelAIIntegration);\n"],"names":["vercelAiIntegration","extendIntegration","addVercelAiProcessors","defineIntegration"],"mappings":";;;;;AAcA,MAAM,oBAAA,IAAwB,CAAC,OAAA,GAA2B,EAAC,KAAM;AAC/D,EAAA,MAAM,KAAA,GAAQA,gCAAoB,OAAO,CAAA;AAEzC,EAAA,OAAOC,uBAAkB,KAAA,EAAO;AAAA,IAC9B,OAAA;AAAA,IACA,MAAM,MAAA,EAAQ;AACZ,MAAAC,iCAAA,CAAsB,MAAM,CAAA;AAAA,IAC9B;AAAA,GACD,CAAA;AACH,CAAA,CAAA;AA4BO,MAAM,mBAAA,GAAsBC,uBAAkB,oBAAoB;;;;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
3
|
-
const core = require('@sentry/core');
|
|
4
|
-
const serverUtils = require('@sentry/server-utils');
|
|
5
|
-
|
|
6
|
-
const _vercelAIIntegration = ((options = {}) => {
|
|
7
|
-
const inner = serverUtils.vercelAiIntegration(options);
|
|
8
|
-
return core.extendIntegration(inner, {
|
|
9
|
-
options,
|
|
10
|
-
setup(client) {
|
|
11
|
-
serverUtils.addVercelAiProcessors(client);
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
const vercelAIIntegration = core.defineIntegration(_vercelAIIntegration);
|
|
16
|
-
|
|
17
|
-
exports.vercelAIIntegration = vercelAIIntegration;
|
|
18
|
-
//# sourceMappingURL=vercelai.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vercelai.js","sources":["../../../../../src/integrations/tracing/vercelai.ts"],"sourcesContent":["/**\n * This is a copy of the Vercel AI integration from the node SDK.\n *\n * The only difference is that it does not use `@opentelemetry/instrumentation`\n * because Cloudflare Workers do not support it.\n *\n * Therefore, we cannot automatically patch setting `experimental_telemetry: { isEnabled: true }`\n * and users have to manually set this to get spans.\n */\n\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration, extendIntegration } from '@sentry/core';\nimport { addVercelAiProcessors, vercelAiIntegration, type VercelAiOptions } from '@sentry/server-utils';\n\nconst _vercelAIIntegration = ((options: VercelAiOptions = {}) => {\n const inner = vercelAiIntegration(options);\n\n return extendIntegration(inner, {\n options,\n setup(client) {\n addVercelAiProcessors(client);\n },\n });\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.\n * This integration is not enabled by default, you need to manually add it.\n *\n * For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).\n *\n * You need to enable collecting spans for a specific call by setting\n * `experimental_telemetry.isEnabled` to `true` in the first argument of the function call.\n *\n * ```javascript\n * const result = await generateText({\n * model: openai('gpt-4-turbo'),\n * experimental_telemetry: { isEnabled: true },\n * });\n * ```\n *\n * If you want to collect inputs and outputs for a specific call, you must specifically opt-in to each\n * function call by setting `experimental_telemetry.recordInputs` and `experimental_telemetry.recordOutputs`\n * to `true`.\n *\n * ```javascript\n * const result = await generateText({\n * model: openai('gpt-4-turbo'),\n * experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },\n * });\n */\nexport const vercelAIIntegration = defineIntegration(_vercelAIIntegration);\n"],"names":["vercelAiIntegration","extendIntegration","addVercelAiProcessors","defineIntegration"],"mappings":";;;;;AAcA,MAAM,oBAAA,IAAwB,CAAC,OAAA,GAA2B,EAAC,KAAM;AAC/D,EAAA,MAAM,KAAA,GAAQA,gCAAoB,OAAO,CAAA;AAEzC,EAAA,OAAOC,uBAAkB,KAAA,EAAO;AAAA,IAC9B,OAAA;AAAA,IACA,MAAM,MAAA,EAAQ;AACZ,MAAAC,iCAAA,CAAsB,MAAM,CAAA;AAAA,IAC9B;AAAA,GACD,CAAA;AACH,CAAA,CAAA;AA4BO,MAAM,mBAAA,GAAsBC,uBAAkB,oBAAoB;;;;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { defineIntegration, extendIntegration } from '@sentry/core';
|
|
2
|
-
import { vercelAiIntegration, addVercelAiProcessors } from '@sentry/server-utils';
|
|
3
|
-
|
|
4
|
-
const _vercelAIIntegration = ((options = {}) => {
|
|
5
|
-
const inner = vercelAiIntegration(options);
|
|
6
|
-
return extendIntegration(inner, {
|
|
7
|
-
options,
|
|
8
|
-
setup(client) {
|
|
9
|
-
addVercelAiProcessors(client);
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
const vercelAIIntegration = defineIntegration(_vercelAIIntegration);
|
|
14
|
-
|
|
15
|
-
export { vercelAIIntegration };
|
|
16
|
-
//# sourceMappingURL=vercelai.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vercelai.js","sources":["../../../../../src/integrations/tracing/vercelai.ts"],"sourcesContent":["/**\n * This is a copy of the Vercel AI integration from the node SDK.\n *\n * The only difference is that it does not use `@opentelemetry/instrumentation`\n * because Cloudflare Workers do not support it.\n *\n * Therefore, we cannot automatically patch setting `experimental_telemetry: { isEnabled: true }`\n * and users have to manually set this to get spans.\n */\n\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration, extendIntegration } from '@sentry/core';\nimport { addVercelAiProcessors, vercelAiIntegration, type VercelAiOptions } from '@sentry/server-utils';\n\nconst _vercelAIIntegration = ((options: VercelAiOptions = {}) => {\n const inner = vercelAiIntegration(options);\n\n return extendIntegration(inner, {\n options,\n setup(client) {\n addVercelAiProcessors(client);\n },\n });\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.\n * This integration is not enabled by default, you need to manually add it.\n *\n * For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).\n *\n * You need to enable collecting spans for a specific call by setting\n * `experimental_telemetry.isEnabled` to `true` in the first argument of the function call.\n *\n * ```javascript\n * const result = await generateText({\n * model: openai('gpt-4-turbo'),\n * experimental_telemetry: { isEnabled: true },\n * });\n * ```\n *\n * If you want to collect inputs and outputs for a specific call, you must specifically opt-in to each\n * function call by setting `experimental_telemetry.recordInputs` and `experimental_telemetry.recordOutputs`\n * to `true`.\n *\n * ```javascript\n * const result = await generateText({\n * model: openai('gpt-4-turbo'),\n * experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },\n * });\n */\nexport const vercelAIIntegration = defineIntegration(_vercelAIIntegration);\n"],"names":[],"mappings":";;;AAcA,MAAM,oBAAA,IAAwB,CAAC,OAAA,GAA2B,EAAC,KAAM;AAC/D,EAAA,MAAM,KAAA,GAAQ,oBAAoB,OAAO,CAAA;AAEzC,EAAA,OAAO,kBAAkB,KAAA,EAAO;AAAA,IAC9B,OAAA;AAAA,IACA,MAAM,MAAA,EAAQ;AACZ,MAAA,qBAAA,CAAsB,MAAM,CAAA;AAAA,IAC9B;AAAA,GACD,CAAA;AACH,CAAA,CAAA;AA4BO,MAAM,mBAAA,GAAsB,kBAAkB,oBAAoB;;;;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { defineIntegration, extendIntegration } from '@sentry/core';
|
|
2
|
-
import { vercelAiIntegration, addVercelAiProcessors } from '@sentry/server-utils';
|
|
3
|
-
|
|
4
|
-
const _vercelAIIntegration = ((options = {}) => {
|
|
5
|
-
const inner = vercelAiIntegration(options);
|
|
6
|
-
return extendIntegration(inner, {
|
|
7
|
-
options,
|
|
8
|
-
setup(client) {
|
|
9
|
-
addVercelAiProcessors(client);
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
const vercelAIIntegration = defineIntegration(_vercelAIIntegration);
|
|
14
|
-
|
|
15
|
-
export { vercelAIIntegration };
|
|
16
|
-
//# sourceMappingURL=vercelai.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vercelai.js","sources":["../../../../../src/integrations/tracing/vercelai.ts"],"sourcesContent":["/**\n * This is a copy of the Vercel AI integration from the node SDK.\n *\n * The only difference is that it does not use `@opentelemetry/instrumentation`\n * because Cloudflare Workers do not support it.\n *\n * Therefore, we cannot automatically patch setting `experimental_telemetry: { isEnabled: true }`\n * and users have to manually set this to get spans.\n */\n\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration, extendIntegration } from '@sentry/core';\nimport { addVercelAiProcessors, vercelAiIntegration, type VercelAiOptions } from '@sentry/server-utils';\n\nconst _vercelAIIntegration = ((options: VercelAiOptions = {}) => {\n const inner = vercelAiIntegration(options);\n\n return extendIntegration(inner, {\n options,\n setup(client) {\n addVercelAiProcessors(client);\n },\n });\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.\n * This integration is not enabled by default, you need to manually add it.\n *\n * For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).\n *\n * You need to enable collecting spans for a specific call by setting\n * `experimental_telemetry.isEnabled` to `true` in the first argument of the function call.\n *\n * ```javascript\n * const result = await generateText({\n * model: openai('gpt-4-turbo'),\n * experimental_telemetry: { isEnabled: true },\n * });\n * ```\n *\n * If you want to collect inputs and outputs for a specific call, you must specifically opt-in to each\n * function call by setting `experimental_telemetry.recordInputs` and `experimental_telemetry.recordOutputs`\n * to `true`.\n *\n * ```javascript\n * const result = await generateText({\n * model: openai('gpt-4-turbo'),\n * experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },\n * });\n */\nexport const vercelAIIntegration = defineIntegration(_vercelAIIntegration);\n"],"names":[],"mappings":";;;AAcA,MAAM,oBAAA,IAAwB,CAAC,OAAA,GAA2B,EAAC,KAAM;AAC/D,EAAA,MAAM,KAAA,GAAQ,oBAAoB,OAAO,CAAA;AAEzC,EAAA,OAAO,kBAAkB,KAAA,EAAO;AAAA,IAC9B,OAAA;AAAA,IACA,MAAM,MAAA,EAAQ;AACZ,MAAA,qBAAA,CAAsB,MAAM,CAAA;AAAA,IAC9B;AAAA,GACD,CAAA;AACH,CAAA,CAAA;AA4BO,MAAM,mBAAA,GAAsB,kBAAkB,oBAAoB;;;;"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is a copy of the Vercel AI integration from the node SDK.
|
|
3
|
-
*
|
|
4
|
-
* The only difference is that it does not use `@opentelemetry/instrumentation`
|
|
5
|
-
* because Cloudflare Workers do not support it.
|
|
6
|
-
*
|
|
7
|
-
* Therefore, we cannot automatically patch setting `experimental_telemetry: { isEnabled: true }`
|
|
8
|
-
* and users have to manually set this to get spans.
|
|
9
|
-
*/
|
|
10
|
-
import { type VercelAiOptions } from '@sentry/server-utils';
|
|
11
|
-
/**
|
|
12
|
-
* Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.
|
|
13
|
-
* This integration is not enabled by default, you need to manually add it.
|
|
14
|
-
*
|
|
15
|
-
* For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).
|
|
16
|
-
*
|
|
17
|
-
* You need to enable collecting spans for a specific call by setting
|
|
18
|
-
* `experimental_telemetry.isEnabled` to `true` in the first argument of the function call.
|
|
19
|
-
*
|
|
20
|
-
* ```javascript
|
|
21
|
-
* const result = await generateText({
|
|
22
|
-
* model: openai('gpt-4-turbo'),
|
|
23
|
-
* experimental_telemetry: { isEnabled: true },
|
|
24
|
-
* });
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* If you want to collect inputs and outputs for a specific call, you must specifically opt-in to each
|
|
28
|
-
* function call by setting `experimental_telemetry.recordInputs` and `experimental_telemetry.recordOutputs`
|
|
29
|
-
* to `true`.
|
|
30
|
-
*
|
|
31
|
-
* ```javascript
|
|
32
|
-
* const result = await generateText({
|
|
33
|
-
* model: openai('gpt-4-turbo'),
|
|
34
|
-
* experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },
|
|
35
|
-
* });
|
|
36
|
-
*/
|
|
37
|
-
export declare const vercelAIIntegration: (options?: VercelAiOptions | undefined) => import("@sentry/core").Integration & {
|
|
38
|
-
name: "VercelAI";
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=vercelai.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vercelai.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/vercelai.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAA8C,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAaxG;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,mBAAmB;;CAA0C,CAAC"}
|