@sentry/cloudflare 9.32.0 → 9.33.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.
Files changed (63) hide show
  1. package/build/cjs/client.js +18 -1
  2. package/build/cjs/client.js.map +1 -1
  3. package/build/cjs/durableobject.js +5 -3
  4. package/build/cjs/durableobject.js.map +1 -1
  5. package/build/cjs/flush.js +36 -0
  6. package/build/cjs/flush.js.map +1 -0
  7. package/build/cjs/handler.js +13 -8
  8. package/build/cjs/handler.js.map +1 -1
  9. package/build/cjs/index.js +2 -0
  10. package/build/cjs/index.js.map +1 -1
  11. package/build/cjs/integrations/tracing/vercelai.js +45 -0
  12. package/build/cjs/integrations/tracing/vercelai.js.map +1 -0
  13. package/build/cjs/opentelemetry/tracer.js +78 -0
  14. package/build/cjs/opentelemetry/tracer.js.map +1 -0
  15. package/build/cjs/request.js +5 -3
  16. package/build/cjs/request.js.map +1 -1
  17. package/build/cjs/sdk.js +17 -0
  18. package/build/cjs/sdk.js.map +1 -1
  19. package/build/esm/client.js +18 -1
  20. package/build/esm/client.js.map +1 -1
  21. package/build/esm/durableobject.js +5 -3
  22. package/build/esm/durableobject.js.map +1 -1
  23. package/build/esm/flush.js +34 -0
  24. package/build/esm/flush.js.map +1 -0
  25. package/build/esm/handler.js +13 -8
  26. package/build/esm/handler.js.map +1 -1
  27. package/build/esm/index.js +1 -0
  28. package/build/esm/index.js.map +1 -1
  29. package/build/esm/integrations/tracing/vercelai.js +43 -0
  30. package/build/esm/integrations/tracing/vercelai.js.map +1 -0
  31. package/build/esm/opentelemetry/tracer.js +76 -0
  32. package/build/esm/opentelemetry/tracer.js.map +1 -0
  33. package/build/esm/package.json +1 -1
  34. package/build/esm/request.js +5 -3
  35. package/build/esm/request.js.map +1 -1
  36. package/build/esm/sdk.js +17 -0
  37. package/build/esm/sdk.js.map +1 -1
  38. package/build/types/client.d.ts +26 -1
  39. package/build/types/client.d.ts.map +1 -1
  40. package/build/types/durableobject.d.ts.map +1 -1
  41. package/build/types/flush.d.ts +16 -0
  42. package/build/types/flush.d.ts.map +1 -0
  43. package/build/types/handler.d.ts.map +1 -1
  44. package/build/types/index.d.ts +1 -0
  45. package/build/types/index.d.ts.map +1 -1
  46. package/build/types/integrations/tracing/vercelai.d.ts +37 -0
  47. package/build/types/integrations/tracing/vercelai.d.ts.map +1 -0
  48. package/build/types/opentelemetry/tracer.d.ts +6 -0
  49. package/build/types/opentelemetry/tracer.d.ts.map +1 -0
  50. package/build/types/request.d.ts.map +1 -1
  51. package/build/types/sdk.d.ts.map +1 -1
  52. package/build/types/utils/addOriginToSpan.d.ts +5 -0
  53. package/build/types/utils/addOriginToSpan.d.ts.map +1 -0
  54. package/build/types/utils/commonjs.d.ts +3 -0
  55. package/build/types/utils/commonjs.d.ts.map +1 -0
  56. package/build/types-ts3.8/client.d.ts +26 -1
  57. package/build/types-ts3.8/flush.d.ts +16 -0
  58. package/build/types-ts3.8/index.d.ts +1 -0
  59. package/build/types-ts3.8/integrations/tracing/vercelai.d.ts +37 -0
  60. package/build/types-ts3.8/opentelemetry/tracer.d.ts +6 -0
  61. package/build/types-ts3.8/utils/addOriginToSpan.d.ts +5 -0
  62. package/build/types-ts3.8/utils/commonjs.d.ts +3 -0
  63. package/package.json +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { Integration } from '@sentry/core';\nimport {\n consoleIntegration,\n dedupeIntegration,\n functionToStringIntegration,\n getIntegrationsToSetup,\n inboundFiltersIntegration,\n initAndBind,\n linkedErrorsIntegration,\n requestDataIntegration,\n stackParserFromStackParserOptions,\n} from '@sentry/core';\nimport type { CloudflareClientOptions, CloudflareOptions } from './client';\nimport { CloudflareClient } from './client';\nimport { fetchIntegration } from './integrations/fetch';\nimport { makeCloudflareTransport } from './transport';\nimport { defaultStackParser } from './vendor/stacktrace';\n\n/** Get the default integrations for the Cloudflare SDK. */\nexport function getDefaultIntegrations(options: CloudflareOptions): Integration[] {\n const sendDefaultPii = options.sendDefaultPii ?? false;\n return [\n // The Dedupe integration should not be used in workflows because we want to\n // capture all step failures, even if they are the same error.\n ...(options.enableDedupe === false ? [] : [dedupeIntegration()]),\n // TODO(v10): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`\n // eslint-disable-next-line deprecation/deprecation\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n linkedErrorsIntegration(),\n fetchIntegration(),\n // TODO(v10): the `include` object should be defined directly in the integration based on `sendDefaultPii`\n requestDataIntegration(sendDefaultPii ? undefined : { include: { cookies: false } }),\n consoleIntegration(),\n ];\n}\n\n/**\n * Initializes the cloudflare SDK.\n */\nexport function init(options: CloudflareOptions): CloudflareClient | undefined {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = getDefaultIntegrations(options);\n }\n\n const clientOptions: CloudflareClientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || makeCloudflareTransport,\n };\n\n return initAndBind(CloudflareClient, clientOptions) as CloudflareClient;\n}\n"],"names":[],"mappings":";;;;;;AAkBA;AACO,SAAS,sBAAsB,CAAC,OAAO,EAAoC;AAClF,EAAE,MAAM,cAAe,GAAE,OAAO,CAAC,cAAA,IAAkB,KAAK;AACxD,EAAE,OAAO;AACT;AACA;AACA,IAAI,IAAI,OAAO,CAAC,YAAA,KAAiB,KAAM,GAAE,EAAC,GAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACpE;AACA;AACA,IAAI,yBAAyB,EAAE;AAC/B,IAAI,2BAA2B,EAAE;AACjC,IAAI,uBAAuB,EAAE;AAC7B,IAAI,gBAAgB,EAAE;AACtB;AACA,IAAI,sBAAsB,CAAC,cAAe,GAAE,YAAY,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,KAAM,EAAA,EAAG,CAAC;AACxF,IAAI,kBAAkB,EAAE;AACxB,GAAG;AACH;;AAEA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAmD;AAC/E,EAAE,IAAI,OAAO,CAAC,mBAAoB,KAAI,SAAS,EAAE;AACjD,IAAI,OAAO,CAAC,mBAAA,GAAsB,sBAAsB,CAAC,OAAO,CAAC;AACjE;;AAEA,EAAE,MAAM,aAAa,GAA4B;AACjD,IAAI,GAAG,OAAO;AACd,IAAI,WAAW,EAAE,iCAAiC,CAAC,OAAO,CAAC,WAAA,IAAe,kBAAkB,CAAC;AAC7F,IAAI,YAAY,EAAE,sBAAsB,CAAC,OAAO,CAAC;AACjD,IAAI,SAAS,EAAE,OAAO,CAAC,SAAA,IAAa,uBAAuB;AAC3D,GAAG;;AAEH,EAAE,OAAO,WAAW,CAAC,gBAAgB,EAAE,aAAa,CAAE;AACtD;;;;"}
1
+ {"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { Integration } from '@sentry/core';\nimport {\n consoleIntegration,\n dedupeIntegration,\n functionToStringIntegration,\n getIntegrationsToSetup,\n inboundFiltersIntegration,\n initAndBind,\n linkedErrorsIntegration,\n requestDataIntegration,\n stackParserFromStackParserOptions,\n} from '@sentry/core';\nimport type { CloudflareClientOptions, CloudflareOptions } from './client';\nimport { CloudflareClient } from './client';\nimport { makeFlushLock } from './flush';\nimport { fetchIntegration } from './integrations/fetch';\nimport { setupOpenTelemetryTracer } from './opentelemetry/tracer';\nimport { makeCloudflareTransport } from './transport';\nimport { defaultStackParser } from './vendor/stacktrace';\n\n/** Get the default integrations for the Cloudflare SDK. */\nexport function getDefaultIntegrations(options: CloudflareOptions): Integration[] {\n const sendDefaultPii = options.sendDefaultPii ?? false;\n return [\n // The Dedupe integration should not be used in workflows because we want to\n // capture all step failures, even if they are the same error.\n ...(options.enableDedupe === false ? [] : [dedupeIntegration()]),\n // TODO(v10): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`\n // eslint-disable-next-line deprecation/deprecation\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n linkedErrorsIntegration(),\n fetchIntegration(),\n // TODO(v10): the `include` object should be defined directly in the integration based on `sendDefaultPii`\n requestDataIntegration(sendDefaultPii ? undefined : { include: { cookies: false } }),\n consoleIntegration(),\n ];\n}\n\n/**\n * Initializes the cloudflare SDK.\n */\nexport function init(options: CloudflareOptions): CloudflareClient | undefined {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = getDefaultIntegrations(options);\n }\n\n const flushLock = options.ctx ? makeFlushLock(options.ctx) : undefined;\n delete options.ctx;\n\n const clientOptions: CloudflareClientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || makeCloudflareTransport,\n flushLock,\n };\n\n /**\n * The Cloudflare SDK is not OpenTelemetry native, however, we set up some OpenTelemetry compatibility\n * via a custom trace provider.\n * This ensures that any spans emitted via `@opentelemetry/api` will be captured by Sentry.\n * HOWEVER, big caveat: This does not handle custom context handling, it will always work off the current scope.\n * This should be good enough for many, but not all integrations.\n */\n if (!options.skipOpenTelemetrySetup) {\n setupOpenTelemetryTracer();\n }\n\n return initAndBind(CloudflareClient, clientOptions) as CloudflareClient;\n}\n"],"names":[],"mappings":";;;;;;;;AAoBA;AACO,SAAS,sBAAsB,CAAC,OAAO,EAAoC;AAClF,EAAE,MAAM,cAAe,GAAE,OAAO,CAAC,cAAA,IAAkB,KAAK;AACxD,EAAE,OAAO;AACT;AACA;AACA,IAAI,IAAI,OAAO,CAAC,YAAA,KAAiB,KAAM,GAAE,EAAC,GAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACpE;AACA;AACA,IAAI,yBAAyB,EAAE;AAC/B,IAAI,2BAA2B,EAAE;AACjC,IAAI,uBAAuB,EAAE;AAC7B,IAAI,gBAAgB,EAAE;AACtB;AACA,IAAI,sBAAsB,CAAC,cAAe,GAAE,YAAY,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,KAAM,EAAA,EAAG,CAAC;AACxF,IAAI,kBAAkB,EAAE;AACxB,GAAG;AACH;;AAEA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAmD;AAC/E,EAAE,IAAI,OAAO,CAAC,mBAAoB,KAAI,SAAS,EAAE;AACjD,IAAI,OAAO,CAAC,mBAAA,GAAsB,sBAAsB,CAAC,OAAO,CAAC;AACjE;;AAEA,EAAE,MAAM,SAAA,GAAY,OAAO,CAAC,GAAI,GAAE,aAAa,CAAC,OAAO,CAAC,GAAG,CAAA,GAAI,SAAS;AACxE,EAAE,OAAO,OAAO,CAAC,GAAG;;AAEpB,EAAE,MAAM,aAAa,GAA4B;AACjD,IAAI,GAAG,OAAO;AACd,IAAI,WAAW,EAAE,iCAAiC,CAAC,OAAO,CAAC,WAAA,IAAe,kBAAkB,CAAC;AAC7F,IAAI,YAAY,EAAE,sBAAsB,CAAC,OAAO,CAAC;AACjD,IAAI,SAAS,EAAE,OAAO,CAAC,SAAA,IAAa,uBAAuB;AAC3D,IAAI,SAAS;AACb,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE;AACvC,IAAI,wBAAwB,EAAE;AAC9B;;AAEA,EAAE,OAAO,WAAW,CAAC,gBAAgB,EAAE,aAAa,CAAE;AACtD;;;;"}
@@ -1,5 +1,7 @@
1
+ /// <reference types="@cloudflare/workers-types" />
1
2
  import type { ClientOptions, Options } from '@sentry/core';
2
3
  import { ServerRuntimeClient } from '@sentry/core';
4
+ import type { makeFlushLock } from './flush';
3
5
  import type { CloudflareTransportOptions } from './transport';
4
6
  /**
5
7
  * The Sentry Cloudflare SDK Client.
@@ -7,12 +9,21 @@ import type { CloudflareTransportOptions } from './transport';
7
9
  * @see CloudflareClientOptions for documentation on configuration options.
8
10
  * @see ServerRuntimeClient for usage documentation.
9
11
  */
10
- export declare class CloudflareClient extends ServerRuntimeClient<CloudflareClientOptions> {
12
+ export declare class CloudflareClient extends ServerRuntimeClient {
13
+ private readonly _flushLock;
11
14
  /**
12
15
  * Creates a new Cloudflare SDK instance.
13
16
  * @param options Configuration options for this SDK.
14
17
  */
15
18
  constructor(options: CloudflareClientOptions);
19
+ /**
20
+ * Flushes pending operations and ensures all data is processed.
21
+ * If a timeout is provided, the operation will be completed within the specified time limit.
22
+ *
23
+ * @param {number} [timeout] - Optional timeout in milliseconds to force the completion of the flush operation.
24
+ * @return {Promise<boolean>} A promise that resolves to a boolean indicating whether the flush operation was successful.
25
+ */
26
+ flush(timeout?: number): Promise<boolean>;
16
27
  }
17
28
  interface BaseCloudflareOptions {
18
29
  /**
@@ -21,6 +32,18 @@ interface BaseCloudflareOptions {
21
32
  * @default true
22
33
  */
23
34
  enableDedupe?: boolean;
35
+ /**
36
+ * The Cloudflare SDK is not OpenTelemetry native, however, we set up some OpenTelemetry compatibility
37
+ * via a custom trace provider.
38
+ * This ensures that any spans emitted via `@opentelemetry/api` will be captured by Sentry.
39
+ * HOWEVER, big caveat: This does not handle custom context handling, it will always work off the current scope.
40
+ * This should be good enough for many, but not all integrations.
41
+ *
42
+ * If you want to opt-out of setting up the OpenTelemetry compatibility tracer, set this to `true`.
43
+ *
44
+ * @default false
45
+ */
46
+ skipOpenTelemetrySetup?: boolean;
24
47
  }
25
48
  /**
26
49
  * Configuration options for the Sentry Cloudflare SDK
@@ -28,6 +51,7 @@ interface BaseCloudflareOptions {
28
51
  * @see @sentry/core Options for more information.
29
52
  */
30
53
  export interface CloudflareOptions extends Options<CloudflareTransportOptions>, BaseCloudflareOptions {
54
+ ctx?: ExecutionContext;
31
55
  }
32
56
  /**
33
57
  * Configuration options for the Sentry Cloudflare SDK Client class
@@ -35,6 +59,7 @@ export interface CloudflareOptions extends Options<CloudflareTransportOptions>,
35
59
  * @see CloudflareClient for more information.
36
60
  */
37
61
  export interface CloudflareClientOptions extends ClientOptions<CloudflareTransportOptions>, BaseCloudflareOptions {
62
+ flushLock?: ReturnType<typeof makeFlushLock>;
38
63
  }
39
64
  export {};
40
65
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAA8B,MAAM,cAAc,CAAC;AACvF,OAAO,EAAoB,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE9D;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,mBAAmB,CAAC,uBAAuB,CAAC;IAChF;;;OAGG;gBACgB,OAAO,EAAE,uBAAuB;CAcpD;AAED,UAAU,qBAAqB;IAC7B;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,OAAO,CAAC,0BAA0B,CAAC,EAAE,qBAAqB;CAAG;AAExG;;;;GAIG;AACH,MAAM,WAAW,uBAAwB,SAAQ,aAAa,CAAC,0BAA0B,CAAC,EAAE,qBAAqB;CAAG"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAA8B,MAAM,cAAc,CAAC;AACvF,OAAO,EAAoB,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE9D;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,mBAAmB;IACvD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA0C;IAErE;;;OAGG;gBACgB,OAAO,EAAE,uBAAuB;IAiBnD;;;;;;OAMG;IACU,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAMvD;AAED,UAAU,qBAAqB;IAC7B;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;;;;;;;OAUG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,OAAO,CAAC,0BAA0B,CAAC,EAAE,qBAAqB;IACnG,GAAG,CAAC,EAAE,gBAAgB,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAwB,SAAQ,aAAa,CAAC,0BAA0B,CAAC,EAAE,qBAAqB;IAC/G,SAAS,CAAC,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;CAC9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"durableobject.d.ts","sourceRoot":"","sources":["../../src/durableobject.ts"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAyFlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,iCAAiC,CAC/C,CAAC,EACD,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAC1B,CAAC,SAAS,KAAK,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,EACtD,eAAe,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,iBAAiB,EAAE,kBAAkB,EAAE,CAAC,GAAG,CAAC,CAsF1E"}
1
+ {"version":3,"file":"durableobject.d.ts","sourceRoot":"","sources":["../../src/durableobject.ts"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AA2FlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,iCAAiC,CAC/C,CAAC,EACD,CAAC,SAAS,aAAa,CAAC,CAAC,CAAC,EAC1B,CAAC,SAAS,KAAK,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,EACtD,eAAe,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,iBAAiB,EAAE,kBAAkB,EAAE,CAAC,GAAG,CAAC,CAsF1E"}
@@ -0,0 +1,16 @@
1
+ import type { ExecutionContext } from '@cloudflare/workers-types';
2
+ type FlushLock = {
3
+ readonly ready: Promise<void>;
4
+ readonly finalize: () => Promise<void>;
5
+ };
6
+ /**
7
+ * Enhances the given execution context by wrapping its `waitUntil` method with a proxy
8
+ * to monitor pending tasks, and provides a flusher function to ensure all tasks
9
+ * have been completed before executing any subsequent logic.
10
+ *
11
+ * @param {ExecutionContext} context - The execution context to be enhanced. If no context is provided, the function returns undefined.
12
+ * @return {FlushLock} Returns a flusher function if a valid context is provided, otherwise undefined.
13
+ */
14
+ export declare function makeFlushLock(context: ExecutionContext): FlushLock;
15
+ export {};
16
+ //# sourceMappingURL=flush.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flush.d.ts","sourceRoot":"","sources":["../../src/flush.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,CAsBlE"}
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/handler.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAOlD;;;;;;;;;;GAUG;AAEH,wBAAgB,UAAU,CAAC,GAAG,GAAG,OAAO,EAAE,mBAAmB,GAAG,OAAO,EAAE,cAAc,GAAG,OAAO,EAC/F,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,iBAAiB,EAChD,OAAO,EAAE,eAAe,CAAC,GAAG,EAAE,mBAAmB,EAAE,cAAc,CAAC,GACjE,eAAe,CAAC,GAAG,EAAE,mBAAmB,EAAE,cAAc,CAAC,CAwM3D"}
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../src/handler.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAOlD;;;;;;;;;;GAUG;AAEH,wBAAgB,UAAU,CAAC,GAAG,GAAG,OAAO,EAAE,mBAAmB,GAAG,OAAO,EAAE,cAAc,GAAG,OAAO,EAC/F,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,iBAAiB,EAChD,OAAO,EAAE,eAAe,CAAC,GAAG,EAAE,mBAAmB,EAAE,cAAc,CAAC,GACjE,eAAe,CAAC,GAAG,EAAE,mBAAmB,EAAE,cAAc,CAAC,CA6M3D"}
@@ -9,6 +9,7 @@ export { wrapRequestHandler } from './request';
9
9
  export { CloudflareClient } from './client';
10
10
  export { getDefaultIntegrations } from './sdk';
11
11
  export { fetchIntegration } from './integrations/fetch';
12
+ export { vercelAIIntegration } from './integrations/tracing/vercelai';
12
13
  export { instrumentD1WithSentry } from './d1';
13
14
  export { instrumentWorkflowWithSentry } from './workflows';
14
15
  export { setAsyncLocalStorageAsyncContextStrategy } from './async';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,uBAAuB,EACvB,OAAO,EACP,aAAa,EACb,IAAI,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,GACL,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,KAAK,EACL,eAAe,EACf,WAAW,EACX,KAAK,EACL,SAAS,EACT,aAAa,EACb,SAAS,EACT,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,yBAAyB,EACzB,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,cAAc,EACd,aAAa,EACb,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,2BAA2B,EAE3B,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,4BAA4B,EAC5B,gCAAgC,EAChC,gCAAgC,EAChC,qCAAqC,EACrC,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,uBAAuB,EACvB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,iCAAiC,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,sBAAsB,EAAE,MAAM,MAAM,CAAC;AAE9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,wCAAwC,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,uBAAuB,EACvB,OAAO,EACP,aAAa,EACb,IAAI,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,GACL,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,KAAK,EACL,eAAe,EACf,WAAW,EACX,KAAK,EACL,SAAS,EACT,aAAa,EACb,SAAS,EACT,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,yBAAyB,EACzB,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,cAAc,EACd,aAAa,EACb,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,2BAA2B,EAE3B,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,4BAA4B,EAC5B,gCAAgC,EAChC,gCAAgC,EAChC,qCAAqC,EACrC,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,uBAAuB,EACvB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,iCAAiC,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,MAAM,CAAC;AAE9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,wCAAwC,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,37 @@
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
+ /**
11
+ * Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.
12
+ * This integration is not enabled by default, you need to manually add it.
13
+ *
14
+ * For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).
15
+ *
16
+ * You need to enable collecting spans for a specific call by setting
17
+ * `experimental_telemetry.isEnabled` to `true` in the first argument of the function call.
18
+ *
19
+ * ```javascript
20
+ * const result = await generateText({
21
+ * model: openai('gpt-4-turbo'),
22
+ * experimental_telemetry: { isEnabled: true },
23
+ * });
24
+ * ```
25
+ *
26
+ * If you want to collect inputs and outputs for a specific call, you must specifically opt-in to each
27
+ * function call by setting `experimental_telemetry.recordInputs` and `experimental_telemetry.recordOutputs`
28
+ * to `true`.
29
+ *
30
+ * ```javascript
31
+ * const result = await generateText({
32
+ * model: openai('gpt-4-turbo'),
33
+ * experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },
34
+ * });
35
+ */
36
+ export declare const vercelAIIntegration: () => import("@sentry/core").Integration;
37
+ //# sourceMappingURL=vercelai.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vercelai.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/vercelai.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgBH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,mBAAmB,0CAA0C,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Set up a mock OTEL tracer to allow inter-op with OpenTelemetry emitted spans.
3
+ * This is not perfect but handles easy/common use cases.
4
+ */
5
+ export declare function setupOpenTelemetryTracer(): void;
6
+ //# sourceMappingURL=tracer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracer.d.ts","sourceRoot":"","sources":["../../../src/opentelemetry/tracer.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAY/F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIlD,UAAU,4BAA4B;IACpC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,2BAA2B,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,4BAA4B,EAC5C,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAC5D,OAAO,CAAC,QAAQ,CAAC,CAsEnB"}
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAY/F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIlD,UAAU,4BAA4B;IACpC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,2BAA2B,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,4BAA4B,EAC5C,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAC5D,OAAO,CAAC,QAAQ,CAAC,CAwEnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAYhD,OAAO,KAAK,EAA2B,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAK5C,2DAA2D;AAC3D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,WAAW,EAAE,CAgBhF;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,SAAS,CAa7E"}
1
+ {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAYhD,OAAO,KAAK,EAA2B,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAO5C,2DAA2D;AAC3D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,WAAW,EAAE,CAgBhF;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,SAAS,CA4B7E"}
@@ -0,0 +1,5 @@
1
+ import type { Span } from '@opentelemetry/api';
2
+ import type { SpanOrigin } from '@sentry/core';
3
+ /** Adds an origin to an OTEL Span. */
4
+ export declare function addOriginToSpan(span: Span, origin: SpanOrigin): void;
5
+ //# sourceMappingURL=addOriginToSpan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addOriginToSpan.d.ts","sourceRoot":"","sources":["../../../src/utils/addOriginToSpan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,sCAAsC;AACtC,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAEpE"}
@@ -0,0 +1,3 @@
1
+ /** Detect CommonJS. */
2
+ export declare function isCjs(): boolean;
3
+ //# sourceMappingURL=commonjs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commonjs.d.ts","sourceRoot":"","sources":["../../../src/utils/commonjs.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,wBAAgB,KAAK,IAAI,OAAO,CAM/B"}
@@ -1,5 +1,7 @@
1
+ /// <reference types="@cloudflare/workers-types" />
1
2
  import { ClientOptions, Options } from '@sentry/core';
2
3
  import { ServerRuntimeClient } from '@sentry/core';
4
+ import { makeFlushLock } from './flush';
3
5
  import { CloudflareTransportOptions } from './transport';
4
6
  /**
5
7
  * The Sentry Cloudflare SDK Client.
@@ -7,12 +9,21 @@ import { CloudflareTransportOptions } from './transport';
7
9
  * @see CloudflareClientOptions for documentation on configuration options.
8
10
  * @see ServerRuntimeClient for usage documentation.
9
11
  */
10
- export declare class CloudflareClient extends ServerRuntimeClient<CloudflareClientOptions> {
12
+ export declare class CloudflareClient extends ServerRuntimeClient {
13
+ private readonly _flushLock;
11
14
  /**
12
15
  * Creates a new Cloudflare SDK instance.
13
16
  * @param options Configuration options for this SDK.
14
17
  */
15
18
  constructor(options: CloudflareClientOptions);
19
+ /**
20
+ * Flushes pending operations and ensures all data is processed.
21
+ * If a timeout is provided, the operation will be completed within the specified time limit.
22
+ *
23
+ * @param {number} [timeout] - Optional timeout in milliseconds to force the completion of the flush operation.
24
+ * @return {Promise<boolean>} A promise that resolves to a boolean indicating whether the flush operation was successful.
25
+ */
26
+ flush(timeout?: number): Promise<boolean>;
16
27
  }
17
28
  interface BaseCloudflareOptions {
18
29
  /**
@@ -21,6 +32,18 @@ interface BaseCloudflareOptions {
21
32
  * @default true
22
33
  */
23
34
  enableDedupe?: boolean;
35
+ /**
36
+ * The Cloudflare SDK is not OpenTelemetry native, however, we set up some OpenTelemetry compatibility
37
+ * via a custom trace provider.
38
+ * This ensures that any spans emitted via `@opentelemetry/api` will be captured by Sentry.
39
+ * HOWEVER, big caveat: This does not handle custom context handling, it will always work off the current scope.
40
+ * This should be good enough for many, but not all integrations.
41
+ *
42
+ * If you want to opt-out of setting up the OpenTelemetry compatibility tracer, set this to `true`.
43
+ *
44
+ * @default false
45
+ */
46
+ skipOpenTelemetrySetup?: boolean;
24
47
  }
25
48
  /**
26
49
  * Configuration options for the Sentry Cloudflare SDK
@@ -28,6 +51,7 @@ interface BaseCloudflareOptions {
28
51
  * @see @sentry/core Options for more information.
29
52
  */
30
53
  export interface CloudflareOptions extends Options<CloudflareTransportOptions>, BaseCloudflareOptions {
54
+ ctx?: ExecutionContext;
31
55
  }
32
56
  /**
33
57
  * Configuration options for the Sentry Cloudflare SDK Client class
@@ -35,6 +59,7 @@ export interface CloudflareOptions extends Options<CloudflareTransportOptions>,
35
59
  * @see CloudflareClient for more information.
36
60
  */
37
61
  export interface CloudflareClientOptions extends ClientOptions<CloudflareTransportOptions>, BaseCloudflareOptions {
62
+ flushLock?: ReturnType<typeof makeFlushLock>;
38
63
  }
39
64
  export {};
40
65
  //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { ExecutionContext } from '@cloudflare/workers-types';
2
+ type FlushLock = {
3
+ readonly ready: Promise<void>;
4
+ readonly finalize: () => Promise<void>;
5
+ };
6
+ /**
7
+ * Enhances the given execution context by wrapping its `waitUntil` method with a proxy
8
+ * to monitor pending tasks, and provides a flusher function to ensure all tasks
9
+ * have been completed before executing any subsequent logic.
10
+ *
11
+ * @param {ExecutionContext} context - The execution context to be enhanced. If no context is provided, the function returns undefined.
12
+ * @return {FlushLock} Returns a flusher function if a valid context is provided, otherwise undefined.
13
+ */
14
+ export declare function makeFlushLock(context: ExecutionContext): FlushLock;
15
+ export {};
16
+ //# sourceMappingURL=flush.d.ts.map
@@ -10,6 +10,7 @@ export { wrapRequestHandler } from './request';
10
10
  export { CloudflareClient } from './client';
11
11
  export { getDefaultIntegrations } from './sdk';
12
12
  export { fetchIntegration } from './integrations/fetch';
13
+ export { vercelAIIntegration } from './integrations/tracing/vercelai';
13
14
  export { instrumentD1WithSentry } from './d1';
14
15
  export { instrumentWorkflowWithSentry } from './workflows';
15
16
  export { setAsyncLocalStorageAsyncContextStrategy } from './async';
@@ -0,0 +1,37 @@
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
+ /**
11
+ * Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.
12
+ * This integration is not enabled by default, you need to manually add it.
13
+ *
14
+ * For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).
15
+ *
16
+ * You need to enable collecting spans for a specific call by setting
17
+ * `experimental_telemetry.isEnabled` to `true` in the first argument of the function call.
18
+ *
19
+ * ```javascript
20
+ * const result = await generateText({
21
+ * model: openai('gpt-4-turbo'),
22
+ * experimental_telemetry: { isEnabled: true },
23
+ * });
24
+ * ```
25
+ *
26
+ * If you want to collect inputs and outputs for a specific call, you must specifically opt-in to each
27
+ * function call by setting `experimental_telemetry.recordInputs` and `experimental_telemetry.recordOutputs`
28
+ * to `true`.
29
+ *
30
+ * ```javascript
31
+ * const result = await generateText({
32
+ * model: openai('gpt-4-turbo'),
33
+ * experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },
34
+ * });
35
+ */
36
+ export declare const vercelAIIntegration: () => import("@sentry/core").Integration;
37
+ //# sourceMappingURL=vercelai.d.ts.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Set up a mock OTEL tracer to allow inter-op with OpenTelemetry emitted spans.
3
+ * This is not perfect but handles easy/common use cases.
4
+ */
5
+ export declare function setupOpenTelemetryTracer(): void;
6
+ //# sourceMappingURL=tracer.d.ts.map
@@ -0,0 +1,5 @@
1
+ import { Span } from '@opentelemetry/api';
2
+ import { SpanOrigin } from '@sentry/core';
3
+ /** Adds an origin to an OTEL Span. */
4
+ export declare function addOriginToSpan(span: Span, origin: SpanOrigin): void;
5
+ //# sourceMappingURL=addOriginToSpan.d.ts.map
@@ -0,0 +1,3 @@
1
+ /** Detect CommonJS. */
2
+ export declare function isCjs(): boolean;
3
+ //# sourceMappingURL=commonjs.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/cloudflare",
3
- "version": "9.32.0",
3
+ "version": "9.33.0",
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",
@@ -49,7 +49,8 @@
49
49
  "access": "public"
50
50
  },
51
51
  "dependencies": {
52
- "@sentry/core": "9.32.0"
52
+ "@opentelemetry/api": "^1.9.0",
53
+ "@sentry/core": "9.33.0"
53
54
  },
54
55
  "peerDependencies": {
55
56
  "@cloudflare/workers-types": "^4.x"