@sentry/cloudflare 11.0.0-beta.1 → 11.0.0-rc.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 (171) hide show
  1. package/build/cjs/dev/durableobject.js +6 -2
  2. package/build/cjs/dev/durableobject.js.map +1 -1
  3. package/build/cjs/dev/index.js +19 -13
  4. package/build/cjs/dev/index.js.map +1 -1
  5. package/build/cjs/dev/instrument.js +4 -0
  6. package/build/cjs/dev/instrument.js.map +1 -1
  7. package/build/cjs/dev/instrumentations/instrumentSqlStorage.js +3 -3
  8. package/build/cjs/dev/instrumentations/instrumentSqlStorage.js.map +1 -1
  9. package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js +4 -1
  10. package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  11. package/build/cjs/dev/instrumentations/worker/instrumentD1.js +20 -18
  12. package/build/cjs/dev/instrumentations/worker/instrumentD1.js.map +1 -1
  13. package/build/cjs/dev/instrumentations/worker/instrumentEmail.js +4 -3
  14. package/build/cjs/dev/instrumentations/worker/instrumentEmail.js.map +1 -1
  15. package/build/cjs/dev/instrumentations/worker/instrumentScheduled.js +10 -5
  16. package/build/cjs/dev/instrumentations/worker/instrumentScheduled.js.map +1 -1
  17. package/build/cjs/dev/orchestrion-deferred-channels.js +39 -0
  18. package/build/cjs/dev/orchestrion-deferred-channels.js.map +1 -0
  19. package/build/cjs/dev/orchestrion-diagnostics-channel.js +83 -0
  20. package/build/cjs/dev/orchestrion-diagnostics-channel.js.map +1 -0
  21. package/build/cjs/dev/vite/agentClass.js +3 -2
  22. package/build/cjs/dev/vite/agentClass.js.map +1 -1
  23. package/build/cjs/dev/vite/autoInstrument.js +1 -1
  24. package/build/cjs/dev/vite/autoInstrument.js.map +1 -1
  25. package/build/cjs/dev/vite/index.js +6 -1
  26. package/build/cjs/dev/vite/index.js.map +1 -1
  27. package/build/cjs/dev/vite/mastraObservability.js +39 -0
  28. package/build/cjs/dev/vite/mastraObservability.js.map +1 -0
  29. package/build/cjs/dev/vite/transform.js +79 -16
  30. package/build/cjs/dev/vite/transform.js.map +1 -1
  31. package/build/cjs/dev/workflows.js +4 -1
  32. package/build/cjs/dev/workflows.js.map +1 -1
  33. package/build/cjs/dev/wrapMethodWithSentry.js +8 -4
  34. package/build/cjs/dev/wrapMethodWithSentry.js.map +1 -1
  35. package/build/cjs/dev/wrapRequestHandlerWithInit.js +2 -0
  36. package/build/cjs/dev/wrapRequestHandlerWithInit.js.map +1 -1
  37. package/build/cjs/prod/durableobject.js +6 -2
  38. package/build/cjs/prod/durableobject.js.map +1 -1
  39. package/build/cjs/prod/index.js +19 -13
  40. package/build/cjs/prod/index.js.map +1 -1
  41. package/build/cjs/prod/instrument.js +4 -0
  42. package/build/cjs/prod/instrument.js.map +1 -1
  43. package/build/cjs/prod/instrumentations/instrumentSqlStorage.js +3 -3
  44. package/build/cjs/prod/instrumentations/instrumentSqlStorage.js.map +1 -1
  45. package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js +4 -1
  46. package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  47. package/build/cjs/prod/instrumentations/worker/instrumentD1.js +20 -18
  48. package/build/cjs/prod/instrumentations/worker/instrumentD1.js.map +1 -1
  49. package/build/cjs/prod/instrumentations/worker/instrumentEmail.js +4 -3
  50. package/build/cjs/prod/instrumentations/worker/instrumentEmail.js.map +1 -1
  51. package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js +10 -5
  52. package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js.map +1 -1
  53. package/build/cjs/prod/orchestrion-deferred-channels.js +39 -0
  54. package/build/cjs/prod/orchestrion-deferred-channels.js.map +1 -0
  55. package/build/cjs/prod/orchestrion-diagnostics-channel.js +83 -0
  56. package/build/cjs/prod/orchestrion-diagnostics-channel.js.map +1 -0
  57. package/build/cjs/prod/vite/agentClass.js +3 -2
  58. package/build/cjs/prod/vite/agentClass.js.map +1 -1
  59. package/build/cjs/prod/vite/autoInstrument.js +1 -1
  60. package/build/cjs/prod/vite/autoInstrument.js.map +1 -1
  61. package/build/cjs/prod/vite/index.js +6 -1
  62. package/build/cjs/prod/vite/index.js.map +1 -1
  63. package/build/cjs/prod/vite/mastraObservability.js +39 -0
  64. package/build/cjs/prod/vite/mastraObservability.js.map +1 -0
  65. package/build/cjs/prod/vite/transform.js +79 -16
  66. package/build/cjs/prod/vite/transform.js.map +1 -1
  67. package/build/cjs/prod/workflows.js +4 -1
  68. package/build/cjs/prod/workflows.js.map +1 -1
  69. package/build/cjs/prod/wrapMethodWithSentry.js +8 -4
  70. package/build/cjs/prod/wrapMethodWithSentry.js.map +1 -1
  71. package/build/cjs/prod/wrapRequestHandlerWithInit.js +2 -0
  72. package/build/cjs/prod/wrapRequestHandlerWithInit.js.map +1 -1
  73. package/build/esm/dev/durableobject.js +6 -2
  74. package/build/esm/dev/durableobject.js.map +1 -1
  75. package/build/esm/dev/index.js +3 -2
  76. package/build/esm/dev/index.js.map +1 -1
  77. package/build/esm/dev/instrument.js +4 -1
  78. package/build/esm/dev/instrument.js.map +1 -1
  79. package/build/esm/dev/instrumentations/instrumentSqlStorage.js +3 -3
  80. package/build/esm/dev/instrumentations/instrumentSqlStorage.js.map +1 -1
  81. package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js +4 -1
  82. package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  83. package/build/esm/dev/instrumentations/worker/instrumentD1.js +20 -18
  84. package/build/esm/dev/instrumentations/worker/instrumentD1.js.map +1 -1
  85. package/build/esm/dev/instrumentations/worker/instrumentEmail.js +6 -5
  86. package/build/esm/dev/instrumentations/worker/instrumentEmail.js.map +1 -1
  87. package/build/esm/dev/instrumentations/worker/instrumentScheduled.js +12 -7
  88. package/build/esm/dev/instrumentations/worker/instrumentScheduled.js.map +1 -1
  89. package/build/esm/dev/orchestrion-deferred-channels.js +35 -0
  90. package/build/esm/dev/orchestrion-deferred-channels.js.map +1 -0
  91. package/build/esm/dev/orchestrion-diagnostics-channel.js +77 -0
  92. package/build/esm/dev/orchestrion-diagnostics-channel.js.map +1 -0
  93. package/build/esm/dev/package.json +1 -1
  94. package/build/esm/dev/vite/agentClass.js +3 -2
  95. package/build/esm/dev/vite/agentClass.js.map +1 -1
  96. package/build/esm/dev/vite/autoInstrument.js +1 -1
  97. package/build/esm/dev/vite/autoInstrument.js.map +1 -1
  98. package/build/esm/dev/vite/index.js +6 -1
  99. package/build/esm/dev/vite/index.js.map +1 -1
  100. package/build/esm/dev/vite/mastraObservability.js +36 -0
  101. package/build/esm/dev/vite/mastraObservability.js.map +1 -0
  102. package/build/esm/dev/vite/transform.js +79 -16
  103. package/build/esm/dev/vite/transform.js.map +1 -1
  104. package/build/esm/dev/workflows.js +4 -1
  105. package/build/esm/dev/workflows.js.map +1 -1
  106. package/build/esm/dev/wrapMethodWithSentry.js +7 -3
  107. package/build/esm/dev/wrapMethodWithSentry.js.map +1 -1
  108. package/build/esm/dev/wrapRequestHandlerWithInit.js +2 -0
  109. package/build/esm/dev/wrapRequestHandlerWithInit.js.map +1 -1
  110. package/build/esm/prod/durableobject.js +6 -2
  111. package/build/esm/prod/durableobject.js.map +1 -1
  112. package/build/esm/prod/index.js +3 -2
  113. package/build/esm/prod/index.js.map +1 -1
  114. package/build/esm/prod/instrument.js +4 -1
  115. package/build/esm/prod/instrument.js.map +1 -1
  116. package/build/esm/prod/instrumentations/instrumentSqlStorage.js +3 -3
  117. package/build/esm/prod/instrumentations/instrumentSqlStorage.js.map +1 -1
  118. package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js +4 -1
  119. package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  120. package/build/esm/prod/instrumentations/worker/instrumentD1.js +20 -18
  121. package/build/esm/prod/instrumentations/worker/instrumentD1.js.map +1 -1
  122. package/build/esm/prod/instrumentations/worker/instrumentEmail.js +6 -5
  123. package/build/esm/prod/instrumentations/worker/instrumentEmail.js.map +1 -1
  124. package/build/esm/prod/instrumentations/worker/instrumentScheduled.js +12 -7
  125. package/build/esm/prod/instrumentations/worker/instrumentScheduled.js.map +1 -1
  126. package/build/esm/prod/orchestrion-deferred-channels.js +35 -0
  127. package/build/esm/prod/orchestrion-deferred-channels.js.map +1 -0
  128. package/build/esm/prod/orchestrion-diagnostics-channel.js +77 -0
  129. package/build/esm/prod/orchestrion-diagnostics-channel.js.map +1 -0
  130. package/build/esm/prod/package.json +1 -1
  131. package/build/esm/prod/vite/agentClass.js +3 -2
  132. package/build/esm/prod/vite/agentClass.js.map +1 -1
  133. package/build/esm/prod/vite/autoInstrument.js +1 -1
  134. package/build/esm/prod/vite/autoInstrument.js.map +1 -1
  135. package/build/esm/prod/vite/index.js +6 -1
  136. package/build/esm/prod/vite/index.js.map +1 -1
  137. package/build/esm/prod/vite/mastraObservability.js +36 -0
  138. package/build/esm/prod/vite/mastraObservability.js.map +1 -0
  139. package/build/esm/prod/vite/transform.js +79 -16
  140. package/build/esm/prod/vite/transform.js.map +1 -1
  141. package/build/esm/prod/workflows.js +4 -1
  142. package/build/esm/prod/workflows.js.map +1 -1
  143. package/build/esm/prod/wrapMethodWithSentry.js +7 -3
  144. package/build/esm/prod/wrapMethodWithSentry.js.map +1 -1
  145. package/build/esm/prod/wrapRequestHandlerWithInit.js +2 -0
  146. package/build/esm/prod/wrapRequestHandlerWithInit.js.map +1 -1
  147. package/build/types/durableobject.d.ts.map +1 -1
  148. package/build/types/index.d.ts +4 -2
  149. package/build/types/index.d.ts.map +1 -1
  150. package/build/types/instrument.d.ts +10 -0
  151. package/build/types/instrument.d.ts.map +1 -1
  152. package/build/types/instrumentations/instrumentWorkerEntrypoint.d.ts.map +1 -1
  153. package/build/types/instrumentations/worker/instrumentD1.d.ts.map +1 -1
  154. package/build/types/instrumentations/worker/instrumentEmail.d.ts.map +1 -1
  155. package/build/types/instrumentations/worker/instrumentScheduled.d.ts.map +1 -1
  156. package/build/types/orchestrion-deferred-channels.d.ts +26 -0
  157. package/build/types/orchestrion-deferred-channels.d.ts.map +1 -0
  158. package/build/types/orchestrion-diagnostics-channel.d.ts +44 -0
  159. package/build/types/orchestrion-diagnostics-channel.d.ts.map +1 -0
  160. package/build/types/vite/agentClass.d.ts +4 -3
  161. package/build/types/vite/agentClass.d.ts.map +1 -1
  162. package/build/types/vite/autoInstrument.d.ts.map +1 -1
  163. package/build/types/vite/index.d.ts.map +1 -1
  164. package/build/types/vite/mastraObservability.d.ts +27 -0
  165. package/build/types/vite/mastraObservability.d.ts.map +1 -0
  166. package/build/types/vite/transform.d.ts +5 -4
  167. package/build/types/vite/transform.d.ts.map +1 -1
  168. package/build/types/workflows.d.ts.map +1 -1
  169. package/build/types/wrapMethodWithSentry.d.ts.map +1 -1
  170. package/build/types/wrapRequestHandlerWithInit.d.ts.map +1 -1
  171. package/package.json +10 -5
@@ -0,0 +1,44 @@
1
+ /**
2
+ * A workerd-safe `diagnostics_channel` façade for the orchestrion EMIT side, and the
3
+ * `dcModule` target for the Cloudflare orchestrion build (see `vite/index.ts`): orchestrion's
4
+ * transformed code imports `tracingChannel` from here (its default export) instead of
5
+ * `node:diagnostics_channel`.
6
+ *
7
+ * On workerd, `channel.publish()` and `channel.runStores()` throw at module/global scope
8
+ * ("Disallowed operation called within global scope …"); only inside a request handler do they
9
+ * work. `subscribe` and channel creation are fine anywhere. Orchestrion's transformed code emits
10
+ * `start.runStores(...)` / `end.publish(...)` at each wrapped call site, so a library
11
+ * instantiated at module scope (`const app = new Hono()`) throws the moment it is wrapped — or,
12
+ * if no subscriber exists yet, is skipped by the wrapper's `if (!hasSubscribers) return
13
+ * __apm$traced()` short-circuit and never instrumented.
14
+ *
15
+ * This façade delegates to the real `node:diagnostics_channel` singletons — so subscribers, which
16
+ * keep subscribing through `node:diagnostics_channel`, are reached unchanged — and changes two
17
+ * things:
18
+ *
19
+ * 1. `hasSubscribers` always reports `true`, so the wrapper never short-circuits. On Cloudflare a
20
+ * channel is only injected for an integration that is actually bundled, so the short-circuit
21
+ * buys nothing — and disabling it is what lets the wrapper run (and reach us) at module scope,
22
+ * before the per-request cached `init()` has subscribed.
23
+ * 2. When a delegated `publish`/`runStores` throws the global-scope error, the event is queued via
24
+ * {@link deferChannelEvent} instead. {@link flushDeferredChannelEvents}, called at the top of
25
+ * the request handler after `init()`, emits it via the real channel — now inside a request,
26
+ * where publish works.
27
+ *
28
+ * In a request handler nothing throws, so every call is a transparent pass-through to the real
29
+ * channel: lifecycle channels (spans, context binding) behave exactly as on Node.
30
+ */
31
+ import * as realDc from 'node:diagnostics_channel';
32
+ type Ctx = Record<string, unknown>;
33
+ export declare function tracingChannel<T = Ctx>(name: string): realDc.TracingChannel<T>;
34
+ export declare const channel: typeof realDc.channel;
35
+ export declare const subscribe: typeof realDc.subscribe;
36
+ export declare const unsubscribe: typeof realDc.unsubscribe;
37
+ declare const _default: {
38
+ tracingChannel: typeof tracingChannel;
39
+ channel: typeof realDc.channel;
40
+ subscribe: typeof realDc.subscribe;
41
+ unsubscribe: typeof realDc.unsubscribe;
42
+ };
43
+ export default _default;
44
+ //# sourceMappingURL=orchestrion-diagnostics-channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrion-diagnostics-channel.d.ts","sourceRoot":"","sources":["../../src/orchestrion-diagnostics-channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AAGnD,KAAK,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAiEnC,wBAAgB,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAwB9E;AAED,eAAO,MAAM,OAAO,uBAAiB,CAAC;AACtC,eAAO,MAAM,SAAS,yBAAmB,CAAC;AAC1C,eAAO,MAAM,WAAW,2BAAqB,CAAC"}
@@ -32,10 +32,11 @@ export interface ModuleResolver {
32
32
  */
33
33
  export declare function detectAgentClasses(ast: ProgramBody, entryId: string, candidates: Iterable<string>, resolver: ModuleResolver): Promise<Set<string>>;
34
34
  /**
35
- * The local class names in the entry that a configured class name could refer to — either declared
36
- * under that name directly, or aliased to it by an `export { Local as Configured }` specifier.
35
+ * The entry-module binding names a configured class name could refer to — a class declared under
36
+ * that name, an import of it from another module, a `export { X } from './x'` re-export, or the
37
+ * local binding an `export { Local as Configured }` specifier aliases.
37
38
  *
38
- * Keeps detection (which reads and scans other modules) off classes that no binding points at.
39
+ * Keeps detection (which reads and scans other modules) off names no binding points at.
39
40
  */
40
41
  export declare function collectAgentCandidates(ast: ProgramBody, configuredNames: Iterable<string>): Set<string>;
41
42
  //# sourceMappingURL=agentClass.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agentClass.d.ts","sourceRoot":"","sources":["../../../src/vite/agentClass.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAuB/C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IACjC,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACvF,QAAQ,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC3C;AAOD;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC5B,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CActB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAevG"}
1
+ {"version":3,"file":"agentClass.d.ts","sourceRoot":"","sources":["../../../src/vite/agentClass.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAuB/C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IACjC,OAAO,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACvF,QAAQ,CAAC,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC3C;AAOD;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC5B,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CActB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAkBvG"}
@@ -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;EAkFzD"}
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;EAmFzD"}
@@ -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;;;;;;;;;;;;;;;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
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AASA;;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,CAanH"}
@@ -0,0 +1,27 @@
1
+ import MagicString from 'magic-string';
2
+ /** Whether `id` is the Sentry Mastra integration module the provider injects into. */
3
+ export declare function isMastraIntegrationModuleId(id: string): boolean;
4
+ /**
5
+ * Splices a static `import * as … from '@mastra/observability'` into Sentry's own
6
+ * Mastra integration module and stashes the namespace on the global orchestrion
7
+ * marker.
8
+ *
9
+ * On Cloudflare the integration cannot `createRequire('@mastra/observability')` to
10
+ * bootstrap Mastra's observability pipeline — there is no on-disk `node_modules` in
11
+ * workerd — so without this the user has to construct and wire up an `Observability`
12
+ * themselves. The import is static (statically analyzable, no lazy `import()`), lands
13
+ * in Sentry's module rather than the user's code, and is only emitted when the package
14
+ * actually resolves; if it is absent, the integration keeps its Node `createRequire`
15
+ * fallback and the marker stays empty.
16
+ */
17
+ export declare function sentryMastraObservabilityProviderPlugin(): {
18
+ name: string;
19
+ configResolved(config: {
20
+ root: string;
21
+ }): void;
22
+ transform(code: string, id: string): {
23
+ code: string;
24
+ map: ReturnType<MagicString['generateMap']>;
25
+ } | undefined;
26
+ };
27
+ //# sourceMappingURL=mastraObservability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mastraObservability.d.ts","sourceRoot":"","sources":["../../../src/vite/mastraObservability.ts"],"names":[],"mappings":"AAEA,OAAO,WAAW,MAAM,cAAc,CAAC;AAYvC,sFAAsF;AACtF,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAG/D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uCAAuC,IAAI;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC/C,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAA;KAAE,GAAG,SAAS,CAAC;CAChH,CA4BA"}
@@ -54,10 +54,11 @@ export interface TransformResult {
54
54
  * {@link TransformContext.classWrappers}, e.g. Durable Object classes with
55
55
  * `instrumentDurableObjectWithSentry`).
56
56
  *
57
- * Handles both `export class MyDO {}` and the specifier form
58
- * (`class MyDO {}` … `export { MyDO }` / `export { Foo as MyDO }`).
59
- * Re-exports from other modules (`export { MyDO } from './do'`) cannot be
60
- * wrapped here and are left alone — the plugin warns about them via
57
+ * Handles `export class MyDO {}`, the specifier form (`class MyDO {}` …
58
+ * `export { MyDO }` / `export { Foo as MyDO }`), and classes that live in
59
+ * another module (`import { MyDO } from './do'; export { MyDO }` or
60
+ * `export { MyDO } from './do'`). Only star re-exports (`export * from './do'`)
61
+ * are left alone — the plugin warns about those via
61
62
  * {@link TransformResult.wrappedClasses}.
62
63
  *
63
64
  * Exported (rather than inlined into the plugin) so it can be unit-tested with a
@@ -1 +1 @@
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,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gB,GACpB,eAAe,GAAG,SAAS,CAuD7B"}
@@ -1 +1 @@
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
+ {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/workflows.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAEV,kBAAkB,EASnB,MAAM,oBAAoB,CAAC;AAS5B,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAK/E;;GAEG;AACH,wBAAsB,kCAAkC,CAA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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"}
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;AAsB3F,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,CA4KnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/cloudflare",
3
- "version": "11.0.0-beta.1",
3
+ "version": "11.0.0-rc.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",
@@ -41,6 +41,11 @@
41
41
  "types": "./build/types/vite/index.d.ts",
42
42
  "import": "./build/esm/prod/vite/index.js",
43
43
  "require": "./build/cjs/prod/vite/index.js"
44
+ },
45
+ "./orchestrion-diagnostics-channel": {
46
+ "types": "./build/types/orchestrion-diagnostics-channel.d.ts",
47
+ "import": "./build/esm/prod/orchestrion-diagnostics-channel.js",
48
+ "require": "./build/cjs/prod/orchestrion-diagnostics-channel.js"
44
49
  }
45
50
  },
46
51
  "publishConfig": {
@@ -48,10 +53,10 @@
48
53
  },
49
54
  "dependencies": {
50
55
  "@opentelemetry/api": "^1.9.1",
51
- "@sentry/conventions": "^0.20.0",
52
- "@sentry/core": "11.0.0-beta.1",
53
- "@sentry/opentelemetry": "11.0.0-beta.1",
54
- "@sentry/server-utils": "11.0.0-beta.1",
56
+ "@sentry/conventions": "^0.23.0",
57
+ "@sentry/core": "11.0.0-rc.0",
58
+ "@sentry/opentelemetry": "11.0.0-rc.0",
59
+ "@sentry/server-utils": "11.0.0-rc.0",
55
60
  "magic-string": "~0.30.21"
56
61
  },
57
62
  "peerDependencies": {