@sentry/cloudflare 11.12.0 → 11.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (610) hide show
  1. package/build/cjs/dev/_virtual/_rolldown/runtime.js +22 -0
  2. package/build/cjs/dev/baseSdk.js +98 -103
  3. package/build/cjs/dev/baseSdk.js.map +1 -1
  4. package/build/cjs/dev/client.js +213 -237
  5. package/build/cjs/dev/client.js.map +1 -1
  6. package/build/cjs/dev/clientCache.js +8 -8
  7. package/build/cjs/dev/clientCache.js.map +1 -1
  8. package/build/cjs/dev/debug-build.js +9 -5
  9. package/build/cjs/dev/debug-build.js.map +1 -1
  10. package/build/cjs/dev/defineCloudflareOptions.js +5 -8
  11. package/build/cjs/dev/defineCloudflareOptions.js.map +1 -1
  12. package/build/cjs/dev/durableobject.js +287 -176
  13. package/build/cjs/dev/durableobject.js.map +1 -1
  14. package/build/cjs/dev/flush.js +104 -77
  15. package/build/cjs/dev/flush.js.map +1 -1
  16. package/build/cjs/dev/index.js +181 -182
  17. package/build/cjs/dev/instrument.js +53 -39
  18. package/build/cjs/dev/instrument.js.map +1 -1
  19. package/build/cjs/dev/instrumentations/agents/index.js +34 -13
  20. package/build/cjs/dev/instrumentations/agents/index.js.map +1 -1
  21. package/build/cjs/dev/instrumentations/agents/instrumentAgentCallableRpc.js +46 -49
  22. package/build/cjs/dev/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -1
  23. package/build/cjs/dev/instrumentations/agents/instrumentAgentRequestConversation.js +23 -16
  24. package/build/cjs/dev/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -1
  25. package/build/cjs/dev/instrumentations/agents/instrumentChatAgentConversation.js +36 -28
  26. package/build/cjs/dev/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -1
  27. package/build/cjs/dev/instrumentations/agents/types.js +103 -58
  28. package/build/cjs/dev/instrumentations/agents/types.js.map +1 -1
  29. package/build/cjs/dev/instrumentations/instrumentDurableObjectHandlers.js +87 -118
  30. package/build/cjs/dev/instrumentations/instrumentDurableObjectHandlers.js.map +1 -1
  31. package/build/cjs/dev/instrumentations/instrumentDurableObjectNamespace.js +46 -44
  32. package/build/cjs/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
  33. package/build/cjs/dev/instrumentations/instrumentDurableObjectStorage.js +70 -71
  34. package/build/cjs/dev/instrumentations/instrumentDurableObjectStorage.js.map +1 -1
  35. package/build/cjs/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js +31 -39
  36. package/build/cjs/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -1
  37. package/build/cjs/dev/instrumentations/instrumentSqlStorage.js +50 -52
  38. package/build/cjs/dev/instrumentations/instrumentSqlStorage.js.map +1 -1
  39. package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js +136 -123
  40. package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  41. package/build/cjs/dev/instrumentations/worker/instrumentD1.js +131 -146
  42. package/build/cjs/dev/instrumentations/worker/instrumentD1.js.map +1 -1
  43. package/build/cjs/dev/instrumentations/worker/instrumentEmail.js +63 -61
  44. package/build/cjs/dev/instrumentations/worker/instrumentEmail.js.map +1 -1
  45. package/build/cjs/dev/instrumentations/worker/instrumentEnv.js +83 -88
  46. package/build/cjs/dev/instrumentations/worker/instrumentEnv.js.map +1 -1
  47. package/build/cjs/dev/instrumentations/worker/instrumentFetch.js +41 -48
  48. package/build/cjs/dev/instrumentations/worker/instrumentFetch.js.map +1 -1
  49. package/build/cjs/dev/instrumentations/worker/instrumentFetcher.js +25 -21
  50. package/build/cjs/dev/instrumentations/worker/instrumentFetcher.js.map +1 -1
  51. package/build/cjs/dev/instrumentations/worker/instrumentKV.js +54 -67
  52. package/build/cjs/dev/instrumentations/worker/instrumentKV.js.map +1 -1
  53. package/build/cjs/dev/instrumentations/worker/instrumentQueue.js +98 -105
  54. package/build/cjs/dev/instrumentations/worker/instrumentQueue.js.map +1 -1
  55. package/build/cjs/dev/instrumentations/worker/instrumentQueueProducer.js +88 -94
  56. package/build/cjs/dev/instrumentations/worker/instrumentQueueProducer.js.map +1 -1
  57. package/build/cjs/dev/instrumentations/worker/instrumentR2.js +128 -115
  58. package/build/cjs/dev/instrumentations/worker/instrumentR2.js.map +1 -1
  59. package/build/cjs/dev/instrumentations/worker/instrumentScheduled.js +90 -94
  60. package/build/cjs/dev/instrumentations/worker/instrumentScheduled.js.map +1 -1
  61. package/build/cjs/dev/instrumentations/worker/instrumentTail.js +100 -55
  62. package/build/cjs/dev/instrumentations/worker/instrumentTail.js.map +1 -1
  63. package/build/cjs/dev/integrations/cronTriggers.js +130 -85
  64. package/build/cjs/dev/integrations/cronTriggers.js.map +1 -1
  65. package/build/cjs/dev/integrations/fetch.js +9 -9
  66. package/build/cjs/dev/integrations/fetch.js.map +1 -1
  67. package/build/cjs/dev/integrations/httpServer.js +41 -22
  68. package/build/cjs/dev/integrations/httpServer.js.map +1 -1
  69. package/build/cjs/dev/integrations/spotlight.js +52 -55
  70. package/build/cjs/dev/integrations/spotlight.js.map +1 -1
  71. package/build/cjs/dev/opentelemetry/tracer.js +10 -8
  72. package/build/cjs/dev/opentelemetry/tracer.js.map +1 -1
  73. package/build/cjs/dev/options.js +55 -39
  74. package/build/cjs/dev/options.js.map +1 -1
  75. package/build/cjs/dev/orchestrion-deferred-channels.js +45 -29
  76. package/build/cjs/dev/orchestrion-deferred-channels.js.map +1 -1
  77. package/build/cjs/dev/orchestrion-diagnostics-channel.js +97 -72
  78. package/build/cjs/dev/orchestrion-diagnostics-channel.js.map +1 -1
  79. package/build/cjs/dev/pages-plugin.js +20 -21
  80. package/build/cjs/dev/pages-plugin.js.map +1 -1
  81. package/build/cjs/dev/request.js +16 -10
  82. package/build/cjs/dev/request.js.map +1 -1
  83. package/build/cjs/dev/scope-utils.js +12 -12
  84. package/build/cjs/dev/scope-utils.js.map +1 -1
  85. package/build/cjs/dev/sdk.js +24 -15
  86. package/build/cjs/dev/sdk.js.map +1 -1
  87. package/build/cjs/dev/transport.js +93 -86
  88. package/build/cjs/dev/transport.js.map +1 -1
  89. package/build/cjs/dev/utils/asyncContextStrategy.js +10 -10
  90. package/build/cjs/dev/utils/asyncContextStrategy.js.map +1 -1
  91. package/build/cjs/dev/utils/bindingPropagation.js +17 -11
  92. package/build/cjs/dev/utils/bindingPropagation.js.map +1 -1
  93. package/build/cjs/dev/utils/cloudflareTrace.js +34 -0
  94. package/build/cjs/dev/utils/cloudflareTrace.js.map +1 -0
  95. package/build/cjs/dev/utils/instrumentContext.js +74 -58
  96. package/build/cjs/dev/utils/instrumentContext.js.map +1 -1
  97. package/build/cjs/dev/utils/internalSqlQuery.js +38 -21
  98. package/build/cjs/dev/utils/internalSqlQuery.js.map +1 -1
  99. package/build/cjs/dev/utils/internalStorageKey.js +41 -38
  100. package/build/cjs/dev/utils/internalStorageKey.js.map +1 -1
  101. package/build/cjs/dev/utils/invocationContext.js +42 -32
  102. package/build/cjs/dev/utils/invocationContext.js.map +1 -1
  103. package/build/cjs/dev/utils/invocationScope.js +45 -21
  104. package/build/cjs/dev/utils/invocationScope.js.map +1 -1
  105. package/build/cjs/dev/utils/isBinding.js +47 -15
  106. package/build/cjs/dev/utils/isBinding.js.map +1 -1
  107. package/build/cjs/dev/utils/isCloudflareClass.js +11 -20
  108. package/build/cjs/dev/utils/isCloudflareClass.js.map +1 -1
  109. package/build/cjs/dev/utils/queueTraceMeta.js +24 -35
  110. package/build/cjs/dev/utils/queueTraceMeta.js.map +1 -1
  111. package/build/cjs/dev/utils/rpcMeta.js +37 -27
  112. package/build/cjs/dev/utils/rpcMeta.js.map +1 -1
  113. package/build/cjs/dev/utils/traceLinks.js +52 -42
  114. package/build/cjs/dev/utils/traceLinks.js.map +1 -1
  115. package/build/cjs/dev/vendor/stacktrace.js +32 -24
  116. package/build/cjs/dev/vendor/stacktrace.js.map +1 -1
  117. package/build/cjs/dev/vite/agentClass.js +105 -98
  118. package/build/cjs/dev/vite/agentClass.js.map +1 -1
  119. package/build/cjs/dev/vite/autoInstrument.js +121 -122
  120. package/build/cjs/dev/vite/autoInstrument.js.map +1 -1
  121. package/build/cjs/dev/vite/index.js +44 -21
  122. package/build/cjs/dev/vite/index.js.map +1 -1
  123. package/build/cjs/dev/vite/instrumentFile.js +37 -20
  124. package/build/cjs/dev/vite/instrumentFile.js.map +1 -1
  125. package/build/cjs/dev/vite/mastraObservability.js +19 -12
  126. package/build/cjs/dev/vite/mastraObservability.js.map +1 -1
  127. package/build/cjs/dev/vite/moduleShape.js +220 -201
  128. package/build/cjs/dev/vite/moduleShape.js.map +1 -1
  129. package/build/cjs/dev/vite/providedModulePlugin.js +62 -45
  130. package/build/cjs/dev/vite/providedModulePlugin.js.map +1 -1
  131. package/build/cjs/dev/vite/transform.js +333 -284
  132. package/build/cjs/dev/vite/transform.js.map +1 -1
  133. package/build/cjs/dev/vite/workerEntrypoint.js +66 -57
  134. package/build/cjs/dev/vite/workerEntrypoint.js.map +1 -1
  135. package/build/cjs/dev/vite/wranglerConfig.js +92 -67
  136. package/build/cjs/dev/vite/wranglerConfig.js.map +1 -1
  137. package/build/cjs/dev/withSentry.js +32 -26
  138. package/build/cjs/dev/withSentry.js.map +1 -1
  139. package/build/cjs/dev/workflows.js +164 -151
  140. package/build/cjs/dev/workflows.js.map +1 -1
  141. package/build/cjs/dev/wrapMethodWithSentry.js +148 -169
  142. package/build/cjs/dev/wrapMethodWithSentry.js.map +1 -1
  143. package/build/cjs/dev/wrapRequestHandlerWithInit.js +76 -78
  144. package/build/cjs/dev/wrapRequestHandlerWithInit.js.map +1 -1
  145. package/build/cjs/prod/_virtual/_rolldown/runtime.js +22 -0
  146. package/build/cjs/prod/baseSdk.js +94 -93
  147. package/build/cjs/prod/baseSdk.js.map +1 -1
  148. package/build/cjs/prod/client.js +213 -237
  149. package/build/cjs/prod/client.js.map +1 -1
  150. package/build/cjs/prod/clientCache.js +8 -8
  151. package/build/cjs/prod/clientCache.js.map +1 -1
  152. package/build/cjs/prod/debug-build.js +9 -5
  153. package/build/cjs/prod/debug-build.js.map +1 -1
  154. package/build/cjs/prod/defineCloudflareOptions.js +5 -8
  155. package/build/cjs/prod/defineCloudflareOptions.js.map +1 -1
  156. package/build/cjs/prod/durableobject.js +287 -176
  157. package/build/cjs/prod/durableobject.js.map +1 -1
  158. package/build/cjs/prod/flush.js +104 -77
  159. package/build/cjs/prod/flush.js.map +1 -1
  160. package/build/cjs/prod/index.js +181 -182
  161. package/build/cjs/prod/instrument.js +53 -39
  162. package/build/cjs/prod/instrument.js.map +1 -1
  163. package/build/cjs/prod/instrumentations/agents/index.js +34 -13
  164. package/build/cjs/prod/instrumentations/agents/index.js.map +1 -1
  165. package/build/cjs/prod/instrumentations/agents/instrumentAgentCallableRpc.js +46 -49
  166. package/build/cjs/prod/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -1
  167. package/build/cjs/prod/instrumentations/agents/instrumentAgentRequestConversation.js +23 -16
  168. package/build/cjs/prod/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -1
  169. package/build/cjs/prod/instrumentations/agents/instrumentChatAgentConversation.js +36 -28
  170. package/build/cjs/prod/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -1
  171. package/build/cjs/prod/instrumentations/agents/types.js +103 -58
  172. package/build/cjs/prod/instrumentations/agents/types.js.map +1 -1
  173. package/build/cjs/prod/instrumentations/instrumentDurableObjectHandlers.js +87 -118
  174. package/build/cjs/prod/instrumentations/instrumentDurableObjectHandlers.js.map +1 -1
  175. package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js +46 -44
  176. package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
  177. package/build/cjs/prod/instrumentations/instrumentDurableObjectStorage.js +70 -71
  178. package/build/cjs/prod/instrumentations/instrumentDurableObjectStorage.js.map +1 -1
  179. package/build/cjs/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js +31 -39
  180. package/build/cjs/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -1
  181. package/build/cjs/prod/instrumentations/instrumentSqlStorage.js +50 -52
  182. package/build/cjs/prod/instrumentations/instrumentSqlStorage.js.map +1 -1
  183. package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js +136 -123
  184. package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  185. package/build/cjs/prod/instrumentations/worker/instrumentD1.js +131 -146
  186. package/build/cjs/prod/instrumentations/worker/instrumentD1.js.map +1 -1
  187. package/build/cjs/prod/instrumentations/worker/instrumentEmail.js +63 -61
  188. package/build/cjs/prod/instrumentations/worker/instrumentEmail.js.map +1 -1
  189. package/build/cjs/prod/instrumentations/worker/instrumentEnv.js +83 -88
  190. package/build/cjs/prod/instrumentations/worker/instrumentEnv.js.map +1 -1
  191. package/build/cjs/prod/instrumentations/worker/instrumentFetch.js +41 -48
  192. package/build/cjs/prod/instrumentations/worker/instrumentFetch.js.map +1 -1
  193. package/build/cjs/prod/instrumentations/worker/instrumentFetcher.js +25 -21
  194. package/build/cjs/prod/instrumentations/worker/instrumentFetcher.js.map +1 -1
  195. package/build/cjs/prod/instrumentations/worker/instrumentKV.js +54 -67
  196. package/build/cjs/prod/instrumentations/worker/instrumentKV.js.map +1 -1
  197. package/build/cjs/prod/instrumentations/worker/instrumentQueue.js +98 -105
  198. package/build/cjs/prod/instrumentations/worker/instrumentQueue.js.map +1 -1
  199. package/build/cjs/prod/instrumentations/worker/instrumentQueueProducer.js +88 -94
  200. package/build/cjs/prod/instrumentations/worker/instrumentQueueProducer.js.map +1 -1
  201. package/build/cjs/prod/instrumentations/worker/instrumentR2.js +128 -115
  202. package/build/cjs/prod/instrumentations/worker/instrumentR2.js.map +1 -1
  203. package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js +90 -94
  204. package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js.map +1 -1
  205. package/build/cjs/prod/instrumentations/worker/instrumentTail.js +100 -55
  206. package/build/cjs/prod/instrumentations/worker/instrumentTail.js.map +1 -1
  207. package/build/cjs/prod/integrations/cronTriggers.js +130 -85
  208. package/build/cjs/prod/integrations/cronTriggers.js.map +1 -1
  209. package/build/cjs/prod/integrations/fetch.js +9 -9
  210. package/build/cjs/prod/integrations/fetch.js.map +1 -1
  211. package/build/cjs/prod/integrations/httpServer.js +41 -22
  212. package/build/cjs/prod/integrations/httpServer.js.map +1 -1
  213. package/build/cjs/prod/integrations/spotlight.js +52 -55
  214. package/build/cjs/prod/integrations/spotlight.js.map +1 -1
  215. package/build/cjs/prod/opentelemetry/tracer.js +10 -8
  216. package/build/cjs/prod/opentelemetry/tracer.js.map +1 -1
  217. package/build/cjs/prod/options.js +37 -24
  218. package/build/cjs/prod/options.js.map +1 -1
  219. package/build/cjs/prod/orchestrion-deferred-channels.js +45 -29
  220. package/build/cjs/prod/orchestrion-deferred-channels.js.map +1 -1
  221. package/build/cjs/prod/orchestrion-diagnostics-channel.js +97 -72
  222. package/build/cjs/prod/orchestrion-diagnostics-channel.js.map +1 -1
  223. package/build/cjs/prod/pages-plugin.js +20 -21
  224. package/build/cjs/prod/pages-plugin.js.map +1 -1
  225. package/build/cjs/prod/request.js +16 -10
  226. package/build/cjs/prod/request.js.map +1 -1
  227. package/build/cjs/prod/scope-utils.js +12 -12
  228. package/build/cjs/prod/scope-utils.js.map +1 -1
  229. package/build/cjs/prod/sdk.js +24 -15
  230. package/build/cjs/prod/sdk.js.map +1 -1
  231. package/build/cjs/prod/transport.js +93 -86
  232. package/build/cjs/prod/transport.js.map +1 -1
  233. package/build/cjs/prod/utils/asyncContextStrategy.js +10 -10
  234. package/build/cjs/prod/utils/asyncContextStrategy.js.map +1 -1
  235. package/build/cjs/prod/utils/bindingPropagation.js +17 -11
  236. package/build/cjs/prod/utils/bindingPropagation.js.map +1 -1
  237. package/build/cjs/prod/utils/cloudflareTrace.js +34 -0
  238. package/build/cjs/prod/utils/cloudflareTrace.js.map +1 -0
  239. package/build/cjs/prod/utils/instrumentContext.js +74 -58
  240. package/build/cjs/prod/utils/instrumentContext.js.map +1 -1
  241. package/build/cjs/prod/utils/internalSqlQuery.js +38 -21
  242. package/build/cjs/prod/utils/internalSqlQuery.js.map +1 -1
  243. package/build/cjs/prod/utils/internalStorageKey.js +41 -38
  244. package/build/cjs/prod/utils/internalStorageKey.js.map +1 -1
  245. package/build/cjs/prod/utils/invocationContext.js +42 -32
  246. package/build/cjs/prod/utils/invocationContext.js.map +1 -1
  247. package/build/cjs/prod/utils/invocationScope.js +45 -21
  248. package/build/cjs/prod/utils/invocationScope.js.map +1 -1
  249. package/build/cjs/prod/utils/isBinding.js +47 -15
  250. package/build/cjs/prod/utils/isBinding.js.map +1 -1
  251. package/build/cjs/prod/utils/isCloudflareClass.js +11 -20
  252. package/build/cjs/prod/utils/isCloudflareClass.js.map +1 -1
  253. package/build/cjs/prod/utils/queueTraceMeta.js +24 -35
  254. package/build/cjs/prod/utils/queueTraceMeta.js.map +1 -1
  255. package/build/cjs/prod/utils/rpcMeta.js +37 -27
  256. package/build/cjs/prod/utils/rpcMeta.js.map +1 -1
  257. package/build/cjs/prod/utils/traceLinks.js +52 -42
  258. package/build/cjs/prod/utils/traceLinks.js.map +1 -1
  259. package/build/cjs/prod/vendor/stacktrace.js +32 -24
  260. package/build/cjs/prod/vendor/stacktrace.js.map +1 -1
  261. package/build/cjs/prod/vite/agentClass.js +105 -98
  262. package/build/cjs/prod/vite/agentClass.js.map +1 -1
  263. package/build/cjs/prod/vite/autoInstrument.js +121 -122
  264. package/build/cjs/prod/vite/autoInstrument.js.map +1 -1
  265. package/build/cjs/prod/vite/index.js +44 -21
  266. package/build/cjs/prod/vite/index.js.map +1 -1
  267. package/build/cjs/prod/vite/instrumentFile.js +37 -20
  268. package/build/cjs/prod/vite/instrumentFile.js.map +1 -1
  269. package/build/cjs/prod/vite/mastraObservability.js +19 -12
  270. package/build/cjs/prod/vite/mastraObservability.js.map +1 -1
  271. package/build/cjs/prod/vite/moduleShape.js +220 -201
  272. package/build/cjs/prod/vite/moduleShape.js.map +1 -1
  273. package/build/cjs/prod/vite/providedModulePlugin.js +62 -45
  274. package/build/cjs/prod/vite/providedModulePlugin.js.map +1 -1
  275. package/build/cjs/prod/vite/transform.js +333 -284
  276. package/build/cjs/prod/vite/transform.js.map +1 -1
  277. package/build/cjs/prod/vite/workerEntrypoint.js +66 -57
  278. package/build/cjs/prod/vite/workerEntrypoint.js.map +1 -1
  279. package/build/cjs/prod/vite/wranglerConfig.js +92 -67
  280. package/build/cjs/prod/vite/wranglerConfig.js.map +1 -1
  281. package/build/cjs/prod/withSentry.js +32 -26
  282. package/build/cjs/prod/withSentry.js.map +1 -1
  283. package/build/cjs/prod/workflows.js +164 -151
  284. package/build/cjs/prod/workflows.js.map +1 -1
  285. package/build/cjs/prod/wrapMethodWithSentry.js +148 -169
  286. package/build/cjs/prod/wrapMethodWithSentry.js.map +1 -1
  287. package/build/cjs/prod/wrapRequestHandlerWithInit.js +76 -78
  288. package/build/cjs/prod/wrapRequestHandlerWithInit.js.map +1 -1
  289. package/build/esm/dev/baseSdk.js +98 -101
  290. package/build/esm/dev/baseSdk.js.map +1 -1
  291. package/build/esm/dev/client.js +213 -235
  292. package/build/esm/dev/client.js.map +1 -1
  293. package/build/esm/dev/clientCache.js +8 -6
  294. package/build/esm/dev/clientCache.js.map +1 -1
  295. package/build/esm/dev/debug-build.js +9 -3
  296. package/build/esm/dev/debug-build.js.map +1 -1
  297. package/build/esm/dev/defineCloudflareOptions.js +5 -6
  298. package/build/esm/dev/defineCloudflareOptions.js.map +1 -1
  299. package/build/esm/dev/durableobject.js +287 -174
  300. package/build/esm/dev/durableobject.js.map +1 -1
  301. package/build/esm/dev/flush.js +104 -75
  302. package/build/esm/dev/flush.js.map +1 -1
  303. package/build/esm/dev/index.js +19 -18
  304. package/build/esm/dev/instrument.js +53 -37
  305. package/build/esm/dev/instrument.js.map +1 -1
  306. package/build/esm/dev/instrumentations/agents/index.js +34 -11
  307. package/build/esm/dev/instrumentations/agents/index.js.map +1 -1
  308. package/build/esm/dev/instrumentations/agents/instrumentAgentCallableRpc.js +46 -47
  309. package/build/esm/dev/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -1
  310. package/build/esm/dev/instrumentations/agents/instrumentAgentRequestConversation.js +23 -14
  311. package/build/esm/dev/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -1
  312. package/build/esm/dev/instrumentations/agents/instrumentChatAgentConversation.js +36 -26
  313. package/build/esm/dev/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -1
  314. package/build/esm/dev/instrumentations/agents/types.js +103 -56
  315. package/build/esm/dev/instrumentations/agents/types.js.map +1 -1
  316. package/build/esm/dev/instrumentations/instrumentDurableObjectHandlers.js +87 -116
  317. package/build/esm/dev/instrumentations/instrumentDurableObjectHandlers.js.map +1 -1
  318. package/build/esm/dev/instrumentations/instrumentDurableObjectNamespace.js +46 -42
  319. package/build/esm/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
  320. package/build/esm/dev/instrumentations/instrumentDurableObjectStorage.js +70 -69
  321. package/build/esm/dev/instrumentations/instrumentDurableObjectStorage.js.map +1 -1
  322. package/build/esm/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js +31 -37
  323. package/build/esm/dev/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -1
  324. package/build/esm/dev/instrumentations/instrumentSqlStorage.js +50 -50
  325. package/build/esm/dev/instrumentations/instrumentSqlStorage.js.map +1 -1
  326. package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js +136 -121
  327. package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  328. package/build/esm/dev/instrumentations/worker/instrumentD1.js +131 -144
  329. package/build/esm/dev/instrumentations/worker/instrumentD1.js.map +1 -1
  330. package/build/esm/dev/instrumentations/worker/instrumentEmail.js +63 -59
  331. package/build/esm/dev/instrumentations/worker/instrumentEmail.js.map +1 -1
  332. package/build/esm/dev/instrumentations/worker/instrumentEnv.js +83 -86
  333. package/build/esm/dev/instrumentations/worker/instrumentEnv.js.map +1 -1
  334. package/build/esm/dev/instrumentations/worker/instrumentFetch.js +41 -46
  335. package/build/esm/dev/instrumentations/worker/instrumentFetch.js.map +1 -1
  336. package/build/esm/dev/instrumentations/worker/instrumentFetcher.js +25 -19
  337. package/build/esm/dev/instrumentations/worker/instrumentFetcher.js.map +1 -1
  338. package/build/esm/dev/instrumentations/worker/instrumentKV.js +54 -65
  339. package/build/esm/dev/instrumentations/worker/instrumentKV.js.map +1 -1
  340. package/build/esm/dev/instrumentations/worker/instrumentQueue.js +98 -103
  341. package/build/esm/dev/instrumentations/worker/instrumentQueue.js.map +1 -1
  342. package/build/esm/dev/instrumentations/worker/instrumentQueueProducer.js +88 -92
  343. package/build/esm/dev/instrumentations/worker/instrumentQueueProducer.js.map +1 -1
  344. package/build/esm/dev/instrumentations/worker/instrumentR2.js +128 -113
  345. package/build/esm/dev/instrumentations/worker/instrumentR2.js.map +1 -1
  346. package/build/esm/dev/instrumentations/worker/instrumentScheduled.js +90 -92
  347. package/build/esm/dev/instrumentations/worker/instrumentScheduled.js.map +1 -1
  348. package/build/esm/dev/instrumentations/worker/instrumentTail.js +100 -53
  349. package/build/esm/dev/instrumentations/worker/instrumentTail.js.map +1 -1
  350. package/build/esm/dev/integrations/cronTriggers.js +129 -82
  351. package/build/esm/dev/integrations/cronTriggers.js.map +1 -1
  352. package/build/esm/dev/integrations/fetch.js +9 -6
  353. package/build/esm/dev/integrations/fetch.js.map +1 -1
  354. package/build/esm/dev/integrations/httpServer.js +40 -19
  355. package/build/esm/dev/integrations/httpServer.js.map +1 -1
  356. package/build/esm/dev/integrations/spotlight.js +51 -52
  357. package/build/esm/dev/integrations/spotlight.js.map +1 -1
  358. package/build/esm/dev/opentelemetry/tracer.js +10 -6
  359. package/build/esm/dev/opentelemetry/tracer.js.map +1 -1
  360. package/build/esm/dev/options.js +55 -37
  361. package/build/esm/dev/options.js.map +1 -1
  362. package/build/esm/dev/orchestrion-deferred-channels.js +45 -27
  363. package/build/esm/dev/orchestrion-deferred-channels.js.map +1 -1
  364. package/build/esm/dev/orchestrion-diagnostics-channel.js +87 -66
  365. package/build/esm/dev/orchestrion-diagnostics-channel.js.map +1 -1
  366. package/build/esm/dev/package.json +1 -1
  367. package/build/esm/dev/pages-plugin.js +20 -19
  368. package/build/esm/dev/pages-plugin.js.map +1 -1
  369. package/build/esm/dev/request.js +14 -7
  370. package/build/esm/dev/request.js.map +1 -1
  371. package/build/esm/dev/scope-utils.js +12 -10
  372. package/build/esm/dev/scope-utils.js.map +1 -1
  373. package/build/esm/dev/sdk.js +23 -13
  374. package/build/esm/dev/sdk.js.map +1 -1
  375. package/build/esm/dev/transport.js +93 -84
  376. package/build/esm/dev/transport.js.map +1 -1
  377. package/build/esm/dev/utils/asyncContextStrategy.js +10 -8
  378. package/build/esm/dev/utils/asyncContextStrategy.js.map +1 -1
  379. package/build/esm/dev/utils/bindingPropagation.js +17 -9
  380. package/build/esm/dev/utils/bindingPropagation.js.map +1 -1
  381. package/build/esm/dev/utils/cloudflareTrace.js +34 -0
  382. package/build/esm/dev/utils/cloudflareTrace.js.map +1 -0
  383. package/build/esm/dev/utils/instrumentContext.js +74 -56
  384. package/build/esm/dev/utils/instrumentContext.js.map +1 -1
  385. package/build/esm/dev/utils/internalSqlQuery.js +38 -19
  386. package/build/esm/dev/utils/internalSqlQuery.js.map +1 -1
  387. package/build/esm/dev/utils/internalStorageKey.js +41 -36
  388. package/build/esm/dev/utils/internalStorageKey.js.map +1 -1
  389. package/build/esm/dev/utils/invocationContext.js +42 -30
  390. package/build/esm/dev/utils/invocationContext.js.map +1 -1
  391. package/build/esm/dev/utils/invocationScope.js +45 -19
  392. package/build/esm/dev/utils/invocationScope.js.map +1 -1
  393. package/build/esm/dev/utils/isBinding.js +47 -13
  394. package/build/esm/dev/utils/isBinding.js.map +1 -1
  395. package/build/esm/dev/utils/isCloudflareClass.js +11 -18
  396. package/build/esm/dev/utils/isCloudflareClass.js.map +1 -1
  397. package/build/esm/dev/utils/queueTraceMeta.js +24 -33
  398. package/build/esm/dev/utils/queueTraceMeta.js.map +1 -1
  399. package/build/esm/dev/utils/rpcMeta.js +37 -25
  400. package/build/esm/dev/utils/rpcMeta.js.map +1 -1
  401. package/build/esm/dev/utils/traceLinks.js +52 -40
  402. package/build/esm/dev/utils/traceLinks.js.map +1 -1
  403. package/build/esm/dev/vendor/stacktrace.js +31 -21
  404. package/build/esm/dev/vendor/stacktrace.js.map +1 -1
  405. package/build/esm/dev/vite/agentClass.js +105 -96
  406. package/build/esm/dev/vite/agentClass.js.map +1 -1
  407. package/build/esm/dev/vite/autoInstrument.js +121 -120
  408. package/build/esm/dev/vite/autoInstrument.js.map +1 -1
  409. package/build/esm/dev/vite/index.js +43 -19
  410. package/build/esm/dev/vite/index.js.map +1 -1
  411. package/build/esm/dev/vite/instrumentFile.js +37 -18
  412. package/build/esm/dev/vite/instrumentFile.js.map +1 -1
  413. package/build/esm/dev/vite/mastraObservability.js +19 -10
  414. package/build/esm/dev/vite/mastraObservability.js.map +1 -1
  415. package/build/esm/dev/vite/moduleShape.js +220 -199
  416. package/build/esm/dev/vite/moduleShape.js.map +1 -1
  417. package/build/esm/dev/vite/providedModulePlugin.js +60 -43
  418. package/build/esm/dev/vite/providedModulePlugin.js.map +1 -1
  419. package/build/esm/dev/vite/transform.js +331 -282
  420. package/build/esm/dev/vite/transform.js.map +1 -1
  421. package/build/esm/dev/vite/workerEntrypoint.js +66 -55
  422. package/build/esm/dev/vite/workerEntrypoint.js.map +1 -1
  423. package/build/esm/dev/vite/wranglerConfig.js +92 -65
  424. package/build/esm/dev/vite/wranglerConfig.js.map +1 -1
  425. package/build/esm/dev/withSentry.js +32 -24
  426. package/build/esm/dev/withSentry.js.map +1 -1
  427. package/build/esm/dev/workflows.js +164 -149
  428. package/build/esm/dev/workflows.js.map +1 -1
  429. package/build/esm/dev/wrapMethodWithSentry.js +148 -167
  430. package/build/esm/dev/wrapMethodWithSentry.js.map +1 -1
  431. package/build/esm/dev/wrapRequestHandlerWithInit.js +76 -76
  432. package/build/esm/dev/wrapRequestHandlerWithInit.js.map +1 -1
  433. package/build/esm/prod/baseSdk.js +94 -91
  434. package/build/esm/prod/baseSdk.js.map +1 -1
  435. package/build/esm/prod/client.js +213 -235
  436. package/build/esm/prod/client.js.map +1 -1
  437. package/build/esm/prod/clientCache.js +8 -6
  438. package/build/esm/prod/clientCache.js.map +1 -1
  439. package/build/esm/prod/debug-build.js +9 -3
  440. package/build/esm/prod/debug-build.js.map +1 -1
  441. package/build/esm/prod/defineCloudflareOptions.js +5 -6
  442. package/build/esm/prod/defineCloudflareOptions.js.map +1 -1
  443. package/build/esm/prod/durableobject.js +287 -174
  444. package/build/esm/prod/durableobject.js.map +1 -1
  445. package/build/esm/prod/flush.js +104 -75
  446. package/build/esm/prod/flush.js.map +1 -1
  447. package/build/esm/prod/index.js +19 -18
  448. package/build/esm/prod/instrument.js +53 -37
  449. package/build/esm/prod/instrument.js.map +1 -1
  450. package/build/esm/prod/instrumentations/agents/index.js +34 -11
  451. package/build/esm/prod/instrumentations/agents/index.js.map +1 -1
  452. package/build/esm/prod/instrumentations/agents/instrumentAgentCallableRpc.js +46 -47
  453. package/build/esm/prod/instrumentations/agents/instrumentAgentCallableRpc.js.map +1 -1
  454. package/build/esm/prod/instrumentations/agents/instrumentAgentRequestConversation.js +23 -14
  455. package/build/esm/prod/instrumentations/agents/instrumentAgentRequestConversation.js.map +1 -1
  456. package/build/esm/prod/instrumentations/agents/instrumentChatAgentConversation.js +36 -26
  457. package/build/esm/prod/instrumentations/agents/instrumentChatAgentConversation.js.map +1 -1
  458. package/build/esm/prod/instrumentations/agents/types.js +103 -56
  459. package/build/esm/prod/instrumentations/agents/types.js.map +1 -1
  460. package/build/esm/prod/instrumentations/instrumentDurableObjectHandlers.js +87 -116
  461. package/build/esm/prod/instrumentations/instrumentDurableObjectHandlers.js.map +1 -1
  462. package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js +46 -42
  463. package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
  464. package/build/esm/prod/instrumentations/instrumentDurableObjectStorage.js +70 -69
  465. package/build/esm/prod/instrumentations/instrumentDurableObjectStorage.js.map +1 -1
  466. package/build/esm/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js +31 -37
  467. package/build/esm/prod/instrumentations/instrumentDurableObjectSyncKvStorage.js.map +1 -1
  468. package/build/esm/prod/instrumentations/instrumentSqlStorage.js +50 -50
  469. package/build/esm/prod/instrumentations/instrumentSqlStorage.js.map +1 -1
  470. package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js +136 -121
  471. package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  472. package/build/esm/prod/instrumentations/worker/instrumentD1.js +131 -144
  473. package/build/esm/prod/instrumentations/worker/instrumentD1.js.map +1 -1
  474. package/build/esm/prod/instrumentations/worker/instrumentEmail.js +63 -59
  475. package/build/esm/prod/instrumentations/worker/instrumentEmail.js.map +1 -1
  476. package/build/esm/prod/instrumentations/worker/instrumentEnv.js +83 -86
  477. package/build/esm/prod/instrumentations/worker/instrumentEnv.js.map +1 -1
  478. package/build/esm/prod/instrumentations/worker/instrumentFetch.js +41 -46
  479. package/build/esm/prod/instrumentations/worker/instrumentFetch.js.map +1 -1
  480. package/build/esm/prod/instrumentations/worker/instrumentFetcher.js +25 -19
  481. package/build/esm/prod/instrumentations/worker/instrumentFetcher.js.map +1 -1
  482. package/build/esm/prod/instrumentations/worker/instrumentKV.js +54 -65
  483. package/build/esm/prod/instrumentations/worker/instrumentKV.js.map +1 -1
  484. package/build/esm/prod/instrumentations/worker/instrumentQueue.js +98 -103
  485. package/build/esm/prod/instrumentations/worker/instrumentQueue.js.map +1 -1
  486. package/build/esm/prod/instrumentations/worker/instrumentQueueProducer.js +88 -92
  487. package/build/esm/prod/instrumentations/worker/instrumentQueueProducer.js.map +1 -1
  488. package/build/esm/prod/instrumentations/worker/instrumentR2.js +128 -113
  489. package/build/esm/prod/instrumentations/worker/instrumentR2.js.map +1 -1
  490. package/build/esm/prod/instrumentations/worker/instrumentScheduled.js +90 -92
  491. package/build/esm/prod/instrumentations/worker/instrumentScheduled.js.map +1 -1
  492. package/build/esm/prod/instrumentations/worker/instrumentTail.js +100 -53
  493. package/build/esm/prod/instrumentations/worker/instrumentTail.js.map +1 -1
  494. package/build/esm/prod/integrations/cronTriggers.js +129 -82
  495. package/build/esm/prod/integrations/cronTriggers.js.map +1 -1
  496. package/build/esm/prod/integrations/fetch.js +9 -6
  497. package/build/esm/prod/integrations/fetch.js.map +1 -1
  498. package/build/esm/prod/integrations/httpServer.js +40 -19
  499. package/build/esm/prod/integrations/httpServer.js.map +1 -1
  500. package/build/esm/prod/integrations/spotlight.js +51 -52
  501. package/build/esm/prod/integrations/spotlight.js.map +1 -1
  502. package/build/esm/prod/opentelemetry/tracer.js +10 -6
  503. package/build/esm/prod/opentelemetry/tracer.js.map +1 -1
  504. package/build/esm/prod/options.js +37 -22
  505. package/build/esm/prod/options.js.map +1 -1
  506. package/build/esm/prod/orchestrion-deferred-channels.js +45 -27
  507. package/build/esm/prod/orchestrion-deferred-channels.js.map +1 -1
  508. package/build/esm/prod/orchestrion-diagnostics-channel.js +87 -66
  509. package/build/esm/prod/orchestrion-diagnostics-channel.js.map +1 -1
  510. package/build/esm/prod/package.json +1 -1
  511. package/build/esm/prod/pages-plugin.js +20 -19
  512. package/build/esm/prod/pages-plugin.js.map +1 -1
  513. package/build/esm/prod/request.js +14 -7
  514. package/build/esm/prod/request.js.map +1 -1
  515. package/build/esm/prod/scope-utils.js +12 -10
  516. package/build/esm/prod/scope-utils.js.map +1 -1
  517. package/build/esm/prod/sdk.js +23 -13
  518. package/build/esm/prod/sdk.js.map +1 -1
  519. package/build/esm/prod/transport.js +93 -84
  520. package/build/esm/prod/transport.js.map +1 -1
  521. package/build/esm/prod/utils/asyncContextStrategy.js +10 -8
  522. package/build/esm/prod/utils/asyncContextStrategy.js.map +1 -1
  523. package/build/esm/prod/utils/bindingPropagation.js +17 -9
  524. package/build/esm/prod/utils/bindingPropagation.js.map +1 -1
  525. package/build/esm/prod/utils/cloudflareTrace.js +34 -0
  526. package/build/esm/prod/utils/cloudflareTrace.js.map +1 -0
  527. package/build/esm/prod/utils/instrumentContext.js +74 -56
  528. package/build/esm/prod/utils/instrumentContext.js.map +1 -1
  529. package/build/esm/prod/utils/internalSqlQuery.js +38 -19
  530. package/build/esm/prod/utils/internalSqlQuery.js.map +1 -1
  531. package/build/esm/prod/utils/internalStorageKey.js +41 -36
  532. package/build/esm/prod/utils/internalStorageKey.js.map +1 -1
  533. package/build/esm/prod/utils/invocationContext.js +42 -30
  534. package/build/esm/prod/utils/invocationContext.js.map +1 -1
  535. package/build/esm/prod/utils/invocationScope.js +45 -19
  536. package/build/esm/prod/utils/invocationScope.js.map +1 -1
  537. package/build/esm/prod/utils/isBinding.js +47 -13
  538. package/build/esm/prod/utils/isBinding.js.map +1 -1
  539. package/build/esm/prod/utils/isCloudflareClass.js +11 -18
  540. package/build/esm/prod/utils/isCloudflareClass.js.map +1 -1
  541. package/build/esm/prod/utils/queueTraceMeta.js +24 -33
  542. package/build/esm/prod/utils/queueTraceMeta.js.map +1 -1
  543. package/build/esm/prod/utils/rpcMeta.js +37 -25
  544. package/build/esm/prod/utils/rpcMeta.js.map +1 -1
  545. package/build/esm/prod/utils/traceLinks.js +52 -40
  546. package/build/esm/prod/utils/traceLinks.js.map +1 -1
  547. package/build/esm/prod/vendor/stacktrace.js +31 -21
  548. package/build/esm/prod/vendor/stacktrace.js.map +1 -1
  549. package/build/esm/prod/vite/agentClass.js +105 -96
  550. package/build/esm/prod/vite/agentClass.js.map +1 -1
  551. package/build/esm/prod/vite/autoInstrument.js +121 -120
  552. package/build/esm/prod/vite/autoInstrument.js.map +1 -1
  553. package/build/esm/prod/vite/index.js +43 -19
  554. package/build/esm/prod/vite/index.js.map +1 -1
  555. package/build/esm/prod/vite/instrumentFile.js +37 -18
  556. package/build/esm/prod/vite/instrumentFile.js.map +1 -1
  557. package/build/esm/prod/vite/mastraObservability.js +19 -10
  558. package/build/esm/prod/vite/mastraObservability.js.map +1 -1
  559. package/build/esm/prod/vite/moduleShape.js +220 -199
  560. package/build/esm/prod/vite/moduleShape.js.map +1 -1
  561. package/build/esm/prod/vite/providedModulePlugin.js +60 -43
  562. package/build/esm/prod/vite/providedModulePlugin.js.map +1 -1
  563. package/build/esm/prod/vite/transform.js +331 -282
  564. package/build/esm/prod/vite/transform.js.map +1 -1
  565. package/build/esm/prod/vite/workerEntrypoint.js +66 -55
  566. package/build/esm/prod/vite/workerEntrypoint.js.map +1 -1
  567. package/build/esm/prod/vite/wranglerConfig.js +92 -65
  568. package/build/esm/prod/vite/wranglerConfig.js.map +1 -1
  569. package/build/esm/prod/withSentry.js +32 -24
  570. package/build/esm/prod/withSentry.js.map +1 -1
  571. package/build/esm/prod/workflows.js +164 -149
  572. package/build/esm/prod/workflows.js.map +1 -1
  573. package/build/esm/prod/wrapMethodWithSentry.js +148 -167
  574. package/build/esm/prod/wrapMethodWithSentry.js.map +1 -1
  575. package/build/esm/prod/wrapRequestHandlerWithInit.js +76 -76
  576. package/build/esm/prod/wrapRequestHandlerWithInit.js.map +1 -1
  577. package/build/types/client.d.ts +2 -1
  578. package/build/types/client.d.ts.map +1 -1
  579. package/build/types/index.d.ts +3 -2
  580. package/build/types/index.d.ts.map +1 -1
  581. package/build/types/instrumentations/worker/instrumentEmail.d.ts.map +1 -1
  582. package/build/types/instrumentations/worker/instrumentFetcher.d.ts.map +1 -1
  583. package/build/types/instrumentations/worker/instrumentQueue.d.ts.map +1 -1
  584. package/build/types/instrumentations/worker/instrumentScheduled.d.ts.map +1 -1
  585. package/build/types/instrumentations/worker/instrumentTail.d.ts +4 -2
  586. package/build/types/instrumentations/worker/instrumentTail.d.ts.map +1 -1
  587. package/build/types/utils/cloudflareTrace.d.ts +13 -0
  588. package/build/types/utils/cloudflareTrace.d.ts.map +1 -0
  589. package/build/types/vite/autoInstrument.d.ts.map +1 -1
  590. package/build/types/vite/index.d.ts.map +1 -1
  591. package/build/types/vite/providedModulePlugin.d.ts +15 -11
  592. package/build/types/vite/providedModulePlugin.d.ts.map +1 -1
  593. package/build/types/workflows.d.ts.map +1 -1
  594. package/build/types/wrapMethodWithSentry.d.ts.map +1 -1
  595. package/build/types/wrapRequestHandlerWithInit.d.ts.map +1 -1
  596. package/package.json +10 -14
  597. package/build/cjs/dev/index.js.map +0 -1
  598. package/build/cjs/dev/vite/flueRuntime.js +0 -15
  599. package/build/cjs/dev/vite/flueRuntime.js.map +0 -1
  600. package/build/cjs/prod/index.js.map +0 -1
  601. package/build/cjs/prod/vite/flueRuntime.js +0 -15
  602. package/build/cjs/prod/vite/flueRuntime.js.map +0 -1
  603. package/build/esm/dev/index.js.map +0 -1
  604. package/build/esm/dev/vite/flueRuntime.js +0 -13
  605. package/build/esm/dev/vite/flueRuntime.js.map +0 -1
  606. package/build/esm/prod/index.js.map +0 -1
  607. package/build/esm/prod/vite/flueRuntime.js +0 -13
  608. package/build/esm/prod/vite/flueRuntime.js.map +0 -1
  609. package/build/types/vite/flueRuntime.d.ts +0 -12
  610. package/build/types/vite/flueRuntime.d.ts.map +0 -1
@@ -1,182 +1,181 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const core = require('@sentry/core');
4
- const server = require('@sentry/core/server');
5
- const serverUtils = require('@sentry/server-utils');
6
- const withSentry = require('./withSentry.js');
7
- const defineCloudflareOptions = require('./defineCloudflareOptions.js');
8
- const durableobject = require('./durableobject.js');
9
- const instrument = require('./instrument.js');
10
- const pagesPlugin = require('./pages-plugin.js');
11
- const client = require('./client.js');
12
- const sdk = require('./sdk.js');
13
- const httpServer = require('./integrations/httpServer.js');
14
- const fetch = require('./integrations/fetch.js');
15
- const spotlight = require('./integrations/spotlight.js');
16
- const cronTriggers = require('./integrations/cronTriggers.js');
17
- const workflows = require('./workflows.js');
18
- const noDiagnosticChannels = require('@sentry/server-utils/no-diagnostic-channels');
19
- const baseSdk = require('./baseSdk.js');
20
-
21
-
22
-
23
- exports.SDK_VERSION = core.SDK_VERSION;
24
- exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = core.SEMANTIC_ATTRIBUTE_SENTRY_OP;
25
- exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
26
- exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = core.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE;
27
- exports.Scope = core.Scope;
28
- exports.addBreadcrumb = core.addBreadcrumb;
29
- exports.addEventProcessor = core.addEventProcessor;
30
- exports.addIntegration = core.addIntegration;
31
- exports.bindScopeToEmitter = core.bindScopeToEmitter;
32
- exports.captureCheckIn = core.captureCheckIn;
33
- exports.captureConsoleIntegration = core.captureConsoleIntegration;
34
- exports.captureEvent = core.captureEvent;
35
- exports.captureException = core.captureException;
36
- exports.captureFeedback = core.captureFeedback;
37
- exports.captureMessage = core.captureMessage;
38
- exports.close = core.close;
39
- exports.consoleIntegration = core.consoleIntegration;
40
- exports.consoleLoggingIntegration = core.consoleLoggingIntegration;
41
- exports.continueTrace = core.continueTrace;
42
- exports.createConsolaReporter = core.createConsolaReporter;
43
- exports.createTransport = core.createTransport;
44
- exports.dedupeIntegration = core.dedupeIntegration;
45
- exports.eventFiltersIntegration = core.eventFiltersIntegration;
46
- exports.extraErrorDataIntegration = core.extraErrorDataIntegration;
47
- exports.featureFlagsIntegration = core.featureFlagsIntegration;
48
- exports.flush = core.flush;
49
- exports.functionToStringIntegration = core.functionToStringIntegration;
50
- exports.getActiveSpan = core.getActiveSpan;
51
- exports.getClient = core.getClient;
52
- exports.getCurrentScope = core.getCurrentScope;
53
- exports.getGlobalScope = core.getGlobalScope;
54
- exports.getIsolationScope = core.getIsolationScope;
55
- exports.getRootSpan = core.getRootSpan;
56
- exports.getSpanDescendants = core.getSpanDescendants;
57
- exports.getSpanStatusFromHttpCode = core.getSpanStatusFromHttpCode;
58
- exports.getTraceData = core.getTraceData;
59
- exports.getTraceMetaTags = core.getTraceMetaTags;
60
- exports.getTunnelPath = core.getTunnelPath;
61
- exports.growthbookIntegration = core.growthbookIntegration;
62
- exports.handleTunnelRequest = core.handleTunnelRequest;
63
- exports.instrumentSupabaseClient = core.instrumentSupabaseClient;
64
- exports.isEnabled = core.isEnabled;
65
- exports.isInitialized = core.isInitialized;
66
- exports.lastEventId = core.lastEventId;
67
- exports.linkedErrorsIntegration = core.linkedErrorsIntegration;
68
- exports.logger = core.logger;
69
- exports.metrics = core.metrics;
70
- exports.moduleMetadataIntegration = core.moduleMetadataIntegration;
71
- exports.parameterize = core.parameterize;
72
- exports.requestDataIntegration = core.requestDataIntegration;
73
- exports.rewriteFramesIntegration = core.rewriteFramesIntegration;
74
- exports.setAttribute = core.setAttribute;
75
- exports.setAttributes = core.setAttributes;
76
- exports.setContext = core.setContext;
77
- exports.setConversationId = core.setConversationId;
78
- exports.setCurrentClient = core.setCurrentClient;
79
- exports.setExtra = core.setExtra;
80
- exports.setExtras = core.setExtras;
81
- exports.setHttpStatus = core.setHttpStatus;
82
- exports.setMeasurement = core.setMeasurement;
83
- exports.setTag = core.setTag;
84
- exports.setTags = core.setTags;
85
- exports.setUser = core.setUser;
86
- exports.spanStreamingIntegration = core.spanStreamingIntegration;
87
- exports.spanToBaggageHeader = core.spanToBaggageHeader;
88
- exports.spanToJSON = core.spanToJSON;
89
- exports.spanToStaticSpanJSON = core.spanToStaticSpanJSON;
90
- exports.spanToTraceHeader = core.spanToTraceHeader;
91
- exports.startInactiveSpan = core.startInactiveSpan;
92
- exports.startNewTrace = core.startNewTrace;
93
- exports.startSpan = core.startSpan;
94
- exports.startSpanManual = core.startSpanManual;
95
- exports.supabaseIntegration = core.supabaseIntegration;
96
- exports.suppressTracing = core.suppressTracing;
97
- exports.updateSpanName = core.updateSpanName;
98
- exports.withActiveSpan = core.withActiveSpan;
99
- exports.withIsolationScope = core.withIsolationScope;
100
- exports.withMonitor = core.withMonitor;
101
- exports.withScope = core.withScope;
102
- exports.withStaticSpan = core.withStaticSpan;
103
- exports.withStreamedSpan = core.withStreamedSpan;
104
- exports.zodErrorsIntegration = core.zodErrorsIntegration;
105
- exports.handleTunnelRequestIfMatched = server.handleTunnelRequestIfMatched;
106
- exports.isTunnelRequest = server.isTunnelRequest;
107
- exports.serveTunnelIntegration = server.serveTunnelIntegration;
108
- exports.trpcMiddleware = server.trpcMiddleware;
109
- exports.wrapMcpServerWithSentry = server.wrapMcpServerWithSentry;
110
- exports.SentryMastraExporter = serverUtils.SentryMastraExporter;
111
- exports.amqplibIntegration = serverUtils.amqplibIntegration;
112
- exports.anthropicAIIntegration = serverUtils.anthropicAIIntegration;
113
- exports.awsIntegration = serverUtils.awsIntegration;
114
- exports.createFlueInstrumentation = serverUtils.createFlueInstrumentation;
115
- exports.createLangChainCallbackHandler = serverUtils.createLangChainCallbackHandler;
116
- exports.dataloaderIntegration = serverUtils.dataloaderIntegration;
117
- exports.eveConversationHook = serverUtils.eveConversationHook;
118
- exports.eveIntegration = serverUtils.eveIntegration;
119
- exports.expressIntegration = serverUtils.expressIntegration;
120
- exports.firebaseIntegration = serverUtils.firebaseIntegration;
121
- exports.genericPoolIntegration = serverUtils.genericPoolIntegration;
122
- exports.getInstrumentedModuleNames = serverUtils.getInstrumentedModuleNames;
123
- exports.getOtlpTracesEndpoint = serverUtils.getOtlpTracesEndpoint;
124
- exports.googleGenAIIntegration = serverUtils.googleGenAIIntegration;
125
- exports.graphqlIntegration = serverUtils.graphqlIntegration;
126
- exports.groqIntegration = serverUtils.groqIntegration;
127
- exports.hapiIntegration = serverUtils.hapiIntegration;
128
- exports.honoIntegration = serverUtils.honoIntegration;
129
- exports.honoMiddleware = serverUtils.honoMiddleware;
130
- exports.instrumentAnthropicAiClient = serverUtils.instrumentAnthropicAiClient;
131
- exports.instrumentCreateReactAgent = serverUtils.instrumentCreateReactAgent;
132
- exports.instrumentGoogleGenAIClient = serverUtils.instrumentGoogleGenAIClient;
133
- exports.instrumentLangChainEmbeddings = serverUtils.instrumentLangChainEmbeddings;
134
- exports.instrumentMistralAiClient = serverUtils.instrumentMistralAiClient;
135
- exports.instrumentOpenAiClient = serverUtils.instrumentOpenAiClient;
136
- exports.instrumentPostgresJsSql = serverUtils.instrumentPostgresJsSql;
137
- exports.instrumentStateGraph = serverUtils.instrumentStateGraph;
138
- exports.instrumentStateGraphCompile = serverUtils.instrumentStateGraphCompile;
139
- exports.instrumentTypeSafeClient = serverUtils.instrumentTypeSafeClient;
140
- exports.instrumentWorkersAiClient = serverUtils.instrumentWorkersAiClient;
141
- exports.kafkaIntegration = serverUtils.kafkaIntegration;
142
- exports.knexIntegration = serverUtils.knexIntegration;
143
- exports.koaIntegration = serverUtils.koaIntegration;
144
- exports.langChainIntegration = serverUtils.langChainIntegration;
145
- exports.langGraphIntegration = serverUtils.langGraphIntegration;
146
- exports.lruMemoizerIntegration = serverUtils.lruMemoizerIntegration;
147
- exports.mastraIntegration = serverUtils.mastraIntegration;
148
- exports.mcpServerIntegration = serverUtils.mcpServerIntegration;
149
- exports.mistralAIIntegration = serverUtils.mistralAIIntegration;
150
- exports.mongoIntegration = serverUtils.mongoIntegration;
151
- exports.mongooseIntegration = serverUtils.mongooseIntegration;
152
- exports.mysql2Integration = serverUtils.mysql2Integration;
153
- exports.mysqlIntegration = serverUtils.mysqlIntegration;
154
- exports.neonIntegration = serverUtils.neonIntegration;
155
- exports.nitroIntegration = serverUtils.nitroIntegration;
156
- exports.openAIIntegration = serverUtils.openAIIntegration;
157
- exports.openTelemetryIntegration = serverUtils.openTelemetryIntegration;
158
- exports.piDurableIntegration = serverUtils.piDurableIntegration;
159
- exports.postgresIntegration = serverUtils.postgresIntegration;
160
- exports.postgresJsIntegration = serverUtils.postgresJsIntegration;
161
- exports.prismaIntegration = serverUtils.prismaIntegration;
162
- exports.redisIntegration = serverUtils.redisIntegration;
163
- exports.tediousIntegration = serverUtils.tediousIntegration;
164
- exports.togetherAIIntegration = serverUtils.togetherAIIntegration;
165
- exports.typesafeIntegration = serverUtils.typesafeIntegration;
166
- exports.vercelAIIntegration = serverUtils.vercelAIIntegration;
167
- exports.withSentry = withSentry.withSentry;
168
- exports.defineCloudflareOptions = defineCloudflareOptions.defineCloudflareOptions;
169
- exports.instrumentAgentWithSentry = durableobject.instrumentAgentWithSentry;
170
- exports.instrumentDurableObjectWithSentry = durableobject.instrumentDurableObjectWithSentry;
171
- exports._INTERNAL_wrapUnlessInstrumented = instrument._INTERNAL_wrapUnlessInstrumented;
172
- exports.sentryPagesPlugin = pagesPlugin.sentryPagesPlugin;
173
- exports.CloudflareClient = client.CloudflareClient;
174
- exports._INTERNAL_wrapRequestHandler = sdk._INTERNAL_wrapRequestHandler;
175
- exports.httpServerIntegration = httpServer.httpServerIntegration;
176
- exports.fetchIntegration = fetch.fetchIntegration;
177
- exports.spotlightIntegration = spotlight.spotlightIntegration;
178
- exports.cronTriggersIntegration = cronTriggers.cronTriggersIntegration;
179
- exports.instrumentWorkflowWithSentry = workflows.instrumentWorkflowWithSentry;
180
- exports.setAsyncLocalStorageAsyncContextStrategy = noDiagnosticChannels.setAsyncLocalStorageAsyncContextStrategy;
181
- exports.getDefaultIntegrations = baseSdk.getDefaultIntegrations;
182
- //# sourceMappingURL=index.js.map
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_withSentry = require("./withSentry.js");
3
+ const require_defineCloudflareOptions = require("./defineCloudflareOptions.js");
4
+ const require_durableobject = require("./durableobject.js");
5
+ const require_instrument = require("./instrument.js");
6
+ const require_pages_plugin = require("./pages-plugin.js");
7
+ const require_client = require("./client.js");
8
+ const require_baseSdk = require("./baseSdk.js");
9
+ const require_sdk = require("./sdk.js");
10
+ const require_options = require("./options.js");
11
+ const require_httpServer = require("./integrations/httpServer.js");
12
+ const require_fetch = require("./integrations/fetch.js");
13
+ const require_spotlight = require("./integrations/spotlight.js");
14
+ const require_cronTriggers = require("./integrations/cronTriggers.js");
15
+ const require_workflows = require("./workflows.js");
16
+ let _sentry_core = require("@sentry/core");
17
+ let _sentry_core_server = require("@sentry/core/server");
18
+ let _sentry_server_utils = require("@sentry/server-utils");
19
+ let _sentry_server_utils_no_diagnostic_channels = require("@sentry/server-utils/no-diagnostic-channels");
20
+ exports.CloudflareClient = require_client.CloudflareClient;
21
+ exports.SDK_VERSION = _sentry_core.SDK_VERSION;
22
+ exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = _sentry_core.SEMANTIC_ATTRIBUTE_SENTRY_OP;
23
+ exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = _sentry_core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
24
+ exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = _sentry_core.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE;
25
+ exports.Scope = _sentry_core.Scope;
26
+ exports.SentryMastraExporter = _sentry_server_utils.SentryMastraExporter;
27
+ exports._INTERNAL_getFinalOptions = require_options.getFinalOptions;
28
+ exports._INTERNAL_init = require_sdk.init;
29
+ exports._INTERNAL_wrapRequestHandler = require_sdk._INTERNAL_wrapRequestHandler;
30
+ exports._INTERNAL_wrapUnlessInstrumented = require_instrument._INTERNAL_wrapUnlessInstrumented;
31
+ exports.addBreadcrumb = _sentry_core.addBreadcrumb;
32
+ exports.addEventProcessor = _sentry_core.addEventProcessor;
33
+ exports.addIntegration = _sentry_core.addIntegration;
34
+ exports.amqplibIntegration = _sentry_server_utils.amqplibIntegration;
35
+ exports.anthropicAIIntegration = _sentry_server_utils.anthropicAIIntegration;
36
+ exports.awsIntegration = _sentry_server_utils.awsIntegration;
37
+ exports.bindScopeToEmitter = _sentry_core.bindScopeToEmitter;
38
+ exports.captureCheckIn = _sentry_core.captureCheckIn;
39
+ exports.captureConsoleIntegration = _sentry_core.captureConsoleIntegration;
40
+ exports.captureEvent = _sentry_core.captureEvent;
41
+ exports.captureException = _sentry_core.captureException;
42
+ exports.captureFeedback = _sentry_core.captureFeedback;
43
+ exports.captureMessage = _sentry_core.captureMessage;
44
+ exports.close = _sentry_core.close;
45
+ exports.consoleIntegration = _sentry_core.consoleIntegration;
46
+ exports.consoleLoggingIntegration = _sentry_core.consoleLoggingIntegration;
47
+ exports.continueTrace = _sentry_core.continueTrace;
48
+ exports.createConsolaReporter = _sentry_core.createConsolaReporter;
49
+ exports.createFlueInstrumentation = _sentry_server_utils.createFlueInstrumentation;
50
+ exports.createLangChainCallbackHandler = _sentry_server_utils.createLangChainCallbackHandler;
51
+ exports.createTransport = _sentry_core.createTransport;
52
+ exports.cronTriggersIntegration = require_cronTriggers.cronTriggersIntegration;
53
+ exports.dataloaderIntegration = _sentry_server_utils.dataloaderIntegration;
54
+ exports.dedupeIntegration = _sentry_core.dedupeIntegration;
55
+ exports.defineCloudflareOptions = require_defineCloudflareOptions.defineCloudflareOptions;
56
+ exports.eveConversationHook = _sentry_server_utils.eveConversationHook;
57
+ exports.eveIntegration = _sentry_server_utils.eveIntegration;
58
+ exports.eventFiltersIntegration = _sentry_core.eventFiltersIntegration;
59
+ exports.expressIntegration = _sentry_server_utils.expressIntegration;
60
+ exports.extraErrorDataIntegration = _sentry_core.extraErrorDataIntegration;
61
+ exports.featureFlagsIntegration = _sentry_core.featureFlagsIntegration;
62
+ exports.fetchIntegration = require_fetch.fetchIntegration;
63
+ exports.firebaseIntegration = _sentry_server_utils.firebaseIntegration;
64
+ exports.flush = _sentry_core.flush;
65
+ exports.functionToStringIntegration = _sentry_core.functionToStringIntegration;
66
+ exports.genericPoolIntegration = _sentry_server_utils.genericPoolIntegration;
67
+ exports.getActiveSpan = _sentry_core.getActiveSpan;
68
+ exports.getClient = _sentry_core.getClient;
69
+ exports.getCurrentScope = _sentry_core.getCurrentScope;
70
+ exports.getDefaultIntegrations = require_baseSdk.getDefaultIntegrations;
71
+ exports.getGlobalScope = _sentry_core.getGlobalScope;
72
+ exports.getInstrumentedModuleNames = _sentry_server_utils.getInstrumentedModuleNames;
73
+ exports.getIsolationScope = _sentry_core.getIsolationScope;
74
+ exports.getOtlpTracesEndpoint = _sentry_server_utils.getOtlpTracesEndpoint;
75
+ exports.getRootSpan = _sentry_core.getRootSpan;
76
+ exports.getSpanDescendants = _sentry_core.getSpanDescendants;
77
+ exports.getSpanStatusFromHttpCode = _sentry_core.getSpanStatusFromHttpCode;
78
+ exports.getTraceData = _sentry_core.getTraceData;
79
+ exports.getTraceMetaTags = _sentry_core.getTraceMetaTags;
80
+ exports.getTunnelPath = _sentry_core.getTunnelPath;
81
+ exports.googleGenAIIntegration = _sentry_server_utils.googleGenAIIntegration;
82
+ exports.graphqlIntegration = _sentry_server_utils.graphqlIntegration;
83
+ exports.groqIntegration = _sentry_server_utils.groqIntegration;
84
+ exports.growthbookIntegration = _sentry_core.growthbookIntegration;
85
+ exports.handleTunnelRequest = _sentry_core.handleTunnelRequest;
86
+ exports.handleTunnelRequestIfMatched = _sentry_core_server.handleTunnelRequestIfMatched;
87
+ exports.hapiIntegration = _sentry_server_utils.hapiIntegration;
88
+ exports.honoIntegration = _sentry_server_utils.honoIntegration;
89
+ exports.honoMiddleware = _sentry_server_utils.honoMiddleware;
90
+ exports.httpServerIntegration = require_httpServer.httpServerIntegration;
91
+ exports.instrumentAgentWithSentry = require_durableobject.instrumentAgentWithSentry;
92
+ exports.instrumentAnthropicAiClient = _sentry_server_utils.instrumentAnthropicAiClient;
93
+ exports.instrumentCreateReactAgent = _sentry_server_utils.instrumentCreateReactAgent;
94
+ exports.instrumentDurableObjectWithSentry = require_durableobject.instrumentDurableObjectWithSentry;
95
+ exports.instrumentGoogleGenAIClient = _sentry_server_utils.instrumentGoogleGenAIClient;
96
+ exports.instrumentLangChainEmbeddings = _sentry_server_utils.instrumentLangChainEmbeddings;
97
+ exports.instrumentMistralAiClient = _sentry_server_utils.instrumentMistralAiClient;
98
+ exports.instrumentOpenAiClient = _sentry_server_utils.instrumentOpenAiClient;
99
+ exports.instrumentPostgresJsSql = _sentry_server_utils.instrumentPostgresJsSql;
100
+ exports.instrumentStateGraph = _sentry_server_utils.instrumentStateGraph;
101
+ exports.instrumentStateGraphCompile = _sentry_server_utils.instrumentStateGraphCompile;
102
+ exports.instrumentSupabaseClient = _sentry_core.instrumentSupabaseClient;
103
+ exports.instrumentTypeSafeClient = _sentry_server_utils.instrumentTypeSafeClient;
104
+ exports.instrumentWorkersAiClient = _sentry_server_utils.instrumentWorkersAiClient;
105
+ exports.instrumentWorkflowWithSentry = require_workflows.instrumentWorkflowWithSentry;
106
+ exports.isEnabled = _sentry_core.isEnabled;
107
+ exports.isInitialized = _sentry_core.isInitialized;
108
+ exports.isTunnelRequest = _sentry_core_server.isTunnelRequest;
109
+ exports.kafkaIntegration = _sentry_server_utils.kafkaIntegration;
110
+ exports.knexIntegration = _sentry_server_utils.knexIntegration;
111
+ exports.koaIntegration = _sentry_server_utils.koaIntegration;
112
+ exports.langChainIntegration = _sentry_server_utils.langChainIntegration;
113
+ exports.langGraphIntegration = _sentry_server_utils.langGraphIntegration;
114
+ exports.lastEventId = _sentry_core.lastEventId;
115
+ exports.linkedErrorsIntegration = _sentry_core.linkedErrorsIntegration;
116
+ exports.logger = _sentry_core.logger;
117
+ exports.lruMemoizerIntegration = _sentry_server_utils.lruMemoizerIntegration;
118
+ exports.mastraIntegration = _sentry_server_utils.mastraIntegration;
119
+ exports.mcpServerIntegration = _sentry_server_utils.mcpServerIntegration;
120
+ exports.metrics = _sentry_core.metrics;
121
+ exports.mistralAIIntegration = _sentry_server_utils.mistralAIIntegration;
122
+ exports.moduleMetadataIntegration = _sentry_core.moduleMetadataIntegration;
123
+ exports.mongoIntegration = _sentry_server_utils.mongoIntegration;
124
+ exports.mongooseIntegration = _sentry_server_utils.mongooseIntegration;
125
+ exports.mysql2Integration = _sentry_server_utils.mysql2Integration;
126
+ exports.mysqlIntegration = _sentry_server_utils.mysqlIntegration;
127
+ exports.neonIntegration = _sentry_server_utils.neonIntegration;
128
+ exports.nitroIntegration = _sentry_server_utils.nitroIntegration;
129
+ exports.openAIIntegration = _sentry_server_utils.openAIIntegration;
130
+ exports.openTelemetryIntegration = _sentry_server_utils.openTelemetryIntegration;
131
+ exports.parameterize = _sentry_core.parameterize;
132
+ exports.piAiIntegration = _sentry_server_utils.piAiIntegration;
133
+ exports.piDurableIntegration = _sentry_server_utils.piDurableIntegration;
134
+ exports.postgresIntegration = _sentry_server_utils.postgresIntegration;
135
+ exports.postgresJsIntegration = _sentry_server_utils.postgresJsIntegration;
136
+ exports.prismaIntegration = _sentry_server_utils.prismaIntegration;
137
+ exports.redisIntegration = _sentry_server_utils.redisIntegration;
138
+ exports.requestDataIntegration = _sentry_core.requestDataIntegration;
139
+ exports.rewriteFramesIntegration = _sentry_core.rewriteFramesIntegration;
140
+ exports.sentryPagesPlugin = require_pages_plugin.sentryPagesPlugin;
141
+ exports.serveTunnelIntegration = _sentry_core_server.serveTunnelIntegration;
142
+ exports.setAsyncLocalStorageAsyncContextStrategy = _sentry_server_utils_no_diagnostic_channels.setAsyncLocalStorageAsyncContextStrategy;
143
+ exports.setAttribute = _sentry_core.setAttribute;
144
+ exports.setAttributes = _sentry_core.setAttributes;
145
+ exports.setContext = _sentry_core.setContext;
146
+ exports.setConversationId = _sentry_core.setConversationId;
147
+ exports.setCurrentClient = _sentry_core.setCurrentClient;
148
+ exports.setExtra = _sentry_core.setExtra;
149
+ exports.setExtras = _sentry_core.setExtras;
150
+ exports.setHttpStatus = _sentry_core.setHttpStatus;
151
+ exports.setMeasurement = _sentry_core.setMeasurement;
152
+ exports.setTag = _sentry_core.setTag;
153
+ exports.setTags = _sentry_core.setTags;
154
+ exports.setUser = _sentry_core.setUser;
155
+ exports.spanStreamingIntegration = _sentry_core.spanStreamingIntegration;
156
+ exports.spanToBaggageHeader = _sentry_core.spanToBaggageHeader;
157
+ exports.spanToJSON = _sentry_core.spanToJSON;
158
+ exports.spanToStaticSpanJSON = _sentry_core.spanToStaticSpanJSON;
159
+ exports.spanToTraceHeader = _sentry_core.spanToTraceHeader;
160
+ exports.spotlightIntegration = require_spotlight.spotlightIntegration;
161
+ exports.startInactiveSpan = _sentry_core.startInactiveSpan;
162
+ exports.startNewTrace = _sentry_core.startNewTrace;
163
+ exports.startSpan = _sentry_core.startSpan;
164
+ exports.startSpanManual = _sentry_core.startSpanManual;
165
+ exports.supabaseIntegration = _sentry_core.supabaseIntegration;
166
+ exports.suppressTracing = _sentry_core.suppressTracing;
167
+ exports.tediousIntegration = _sentry_server_utils.tediousIntegration;
168
+ exports.togetherAIIntegration = _sentry_server_utils.togetherAIIntegration;
169
+ exports.trpcMiddleware = _sentry_core_server.trpcMiddleware;
170
+ exports.typesafeIntegration = _sentry_server_utils.typesafeIntegration;
171
+ exports.updateSpanName = _sentry_core.updateSpanName;
172
+ exports.vercelAIIntegration = _sentry_server_utils.vercelAIIntegration;
173
+ exports.withActiveSpan = _sentry_core.withActiveSpan;
174
+ exports.withIsolationScope = _sentry_core.withIsolationScope;
175
+ exports.withMonitor = _sentry_core.withMonitor;
176
+ exports.withScope = _sentry_core.withScope;
177
+ exports.withSentry = require_withSentry.withSentry;
178
+ exports.withStaticSpan = _sentry_core.withStaticSpan;
179
+ exports.withStreamedSpan = _sentry_core.withStreamedSpan;
180
+ exports.wrapMcpServerWithSentry = _sentry_core_server.wrapMcpServerWithSentry;
181
+ exports.zodErrorsIntegration = _sentry_core.zodErrorsIntegration;
@@ -1,56 +1,70 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const core = require('@sentry/core');
4
-
1
+ let _sentry_core = require("@sentry/core");
2
+ // src/instrument.ts
5
3
  const GLOBAL_KEY = "__SENTRY_INSTRUMENTED_MAP__";
6
4
  function getInstrumentedMap() {
7
- const globalObj = globalThis;
8
- if (!globalObj[GLOBAL_KEY]) {
9
- globalObj[GLOBAL_KEY] = /* @__PURE__ */ new WeakMap();
10
- }
11
- return globalObj[GLOBAL_KEY];
5
+ const globalObj = globalThis;
6
+ if (!globalObj[GLOBAL_KEY]) globalObj[GLOBAL_KEY] = /* @__PURE__ */ new WeakMap();
7
+ return globalObj[GLOBAL_KEY];
12
8
  }
9
+ /**
10
+ * Check if a value can be used as a WeakMap key.
11
+ * WeakMap keys must be objects or non-registered symbols.
12
+ */
13
13
  function isWeakMapKey(value) {
14
- return core.isObjectLike(value) || typeof value === "function";
14
+ return (0, _sentry_core.isObjectLike)(value) || typeof value === "function";
15
15
  }
16
+ /**
17
+ * Mark an object as instrumented, storing the instrumented version.
18
+ * @param original The original uninstrumented object
19
+ * @param instrumented The instrumented version (defaults to original if not provided)
20
+ */
16
21
  function markAsInstrumented(original, instrumented) {
17
- try {
18
- if (isWeakMapKey(original)) {
19
- getInstrumentedMap().set(original, instrumented ?? original);
20
- }
21
- if (isWeakMapKey(instrumented) && instrumented !== original) {
22
- getInstrumentedMap().set(instrumented, instrumented);
23
- }
24
- } catch {
25
- }
22
+ try {
23
+ if (isWeakMapKey(original)) getInstrumentedMap().set(original, instrumented ?? original);
24
+ if (isWeakMapKey(instrumented) && instrumented !== original) getInstrumentedMap().set(instrumented, instrumented);
25
+ } catch {}
26
26
  }
27
+ /**
28
+ * Get the instrumented version of an object, if available.
29
+ * Returns the instrumented version if the object was previously instrumented,
30
+ * or undefined if not found.
31
+ */
27
32
  function getInstrumented(obj) {
28
- try {
29
- if (isWeakMapKey(obj)) {
30
- return getInstrumentedMap().get(obj);
31
- }
32
- return void 0;
33
- } catch {
34
- return void 0;
35
- }
33
+ try {
34
+ if (isWeakMapKey(obj)) return getInstrumentedMap().get(obj);
35
+ return;
36
+ } catch {
37
+ return;
38
+ }
36
39
  }
40
+ /**
41
+ * Returns the already-instrumented version of `original` if one exists,
42
+ * otherwise calls `instrumentFn` to create it, marks the mapping, and returns it.
43
+ *
44
+ * @param noMark - If true, skips storing the original→instrumented mapping.
45
+ */
37
46
  function ensureInstrumented(original, instrumentFn, noMark) {
38
- const existing = getInstrumented(original);
39
- if (existing) {
40
- return existing;
41
- }
42
- const instrumented = instrumentFn(original);
43
- if (!noMark) {
44
- markAsInstrumented(original, instrumented);
45
- }
46
- return instrumented;
47
+ const existing = getInstrumented(original);
48
+ if (existing) return existing;
49
+ const instrumented = instrumentFn(original);
50
+ if (!noMark) markAsInstrumented(original, instrumented);
51
+ return instrumented;
47
52
  }
53
+ /**
54
+ * Applies `wrap` to `Class` unless `Class` is already an instrumented wrapper.
55
+ *
56
+ * Emitted by the Vite auto-instrumentation transform for classes the worker entry only re-exports:
57
+ * such a class may already be hand-wrapped with `instrument*WithSentry` in the module it comes
58
+ * from, which the build cannot see. Wrapping again would nest two proxies and instrument the same
59
+ * work twice, duplicated child spans, so the hand-wrapped class is returned as-is. Not part of the
60
+ * public API, hand-written wrapper calls are deliberately left untouched by this guard.
61
+ */
48
62
  function _INTERNAL_wrapUnlessInstrumented(wrap, optionsCallback, Class) {
49
- return getInstrumented(Class) === Class ? Class : wrap(optionsCallback, Class);
63
+ return getInstrumented(Class) === Class ? Class : wrap(optionsCallback, Class);
50
64
  }
51
-
52
65
  exports._INTERNAL_wrapUnlessInstrumented = _INTERNAL_wrapUnlessInstrumented;
53
66
  exports.ensureInstrumented = ensureInstrumented;
54
67
  exports.getInstrumented = getInstrumented;
55
68
  exports.markAsInstrumented = markAsInstrumented;
56
- //# sourceMappingURL=instrument.js.map
69
+
70
+ //# sourceMappingURL=instrument.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"instrument.js","sources":["../../../src/instrument.ts"],"sourcesContent":["// Use a global WeakMap to track instrumented objects across module instances.\n// This is important for Cloudflare Workers where the module may be bundled\n// separately for workers and Durable Objects, but they share the same global scope.\n// The WeakMap stores original -> instrumented mappings so we can retrieve the\n// instrumented version even if we only have a reference to the original.\nimport { isObjectLike } from '@sentry/core';\n\nconst GLOBAL_KEY = '__SENTRY_INSTRUMENTED_MAP__' as const;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getInstrumentedMap(): WeakMap<any, any> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const globalObj = globalThis as typeof globalThis & { [GLOBAL_KEY]?: WeakMap<any, any> };\n if (!globalObj[GLOBAL_KEY]) {\n globalObj[GLOBAL_KEY] = new WeakMap();\n }\n return globalObj[GLOBAL_KEY];\n}\n\n/**\n * Check if a value can be used as a WeakMap key.\n * WeakMap keys must be objects or non-registered symbols.\n */\nfunction isWeakMapKey(value: unknown): value is object {\n return isObjectLike(value) || typeof value === 'function';\n}\n\n/**\n * Mark an object as instrumented, storing the instrumented version.\n * @param original The original uninstrumented object\n * @param instrumented The instrumented version (defaults to original if not provided)\n */\nexport function markAsInstrumented<T>(original: T, instrumented?: T): void {\n try {\n if (isWeakMapKey(original)) {\n // Store mapping from original to instrumented version\n // If instrumented is not provided, store original (for backwards compat)\n getInstrumentedMap().set(original, instrumented ?? original);\n }\n // Also mark the instrumented version itself so we recognize it\n if (isWeakMapKey(instrumented) && instrumented !== original) {\n getInstrumentedMap().set(instrumented, instrumented);\n }\n } catch {\n // ignore errors here\n }\n}\n\n/**\n * Get the instrumented version of an object, if available.\n * Returns the instrumented version if the object was previously instrumented,\n * or undefined if not found.\n */\nexport function getInstrumented<T>(obj: T): T | undefined {\n try {\n if (isWeakMapKey(obj)) {\n return getInstrumentedMap().get(obj) as T | undefined;\n }\n\n return undefined;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Returns the already-instrumented version of `original` if one exists,\n * otherwise calls `instrumentFn` to create it, marks the mapping, and returns it.\n *\n * @param noMark - If true, skips storing the original→instrumented mapping.\n */\nexport function ensureInstrumented<T>(original: T, instrumentFn: (original: T) => T, noMark?: boolean): T {\n const existing = getInstrumented(original);\n\n if (existing) {\n return existing;\n }\n\n const instrumented = instrumentFn(original);\n\n if (!noMark) {\n markAsInstrumented(original, instrumented);\n }\n\n return instrumented;\n}\n\n/**\n * Applies `wrap` to `Class` unless `Class` is already an instrumented wrapper.\n *\n * Emitted by the Vite auto-instrumentation transform for classes the worker entry only re-exports:\n * such a class may already be hand-wrapped with `instrument*WithSentry` in the module it comes\n * from, which the build cannot see. Wrapping again would nest two proxies and instrument the same\n * work twice, duplicated child spans, so the hand-wrapped class is returned as-is. Not part of the\n * public API, hand-written wrapper calls are deliberately left untouched by this guard.\n */\nexport function _INTERNAL_wrapUnlessInstrumented<C>(\n wrap: (optionsCallback: (env: never) => unknown, Class: C) => C,\n optionsCallback: (env: never) => unknown,\n Class: C,\n): C {\n return getInstrumented(Class) === Class ? Class : wrap(optionsCallback, Class);\n}\n"],"names":["isObjectLike"],"mappings":";;;;AAOA,MAAM,UAAA,GAAa,6BAAA;AAGnB,SAAS,kBAAA,GAAwC;AAE/C,EAAA,MAAM,SAAA,GAAY,UAAA;AAClB,EAAA,IAAI,CAAC,SAAA,CAAU,UAAU,CAAA,EAAG;AAC1B,IAAA,SAAA,CAAU,UAAU,CAAA,mBAAI,IAAI,OAAA,EAAQ;AAAA,EACtC;AACA,EAAA,OAAO,UAAU,UAAU,CAAA;AAC7B;AAMA,SAAS,aAAa,KAAA,EAAiC;AACrD,EAAA,OAAOA,iBAAA,CAAa,KAAK,CAAA,IAAK,OAAO,KAAA,KAAU,UAAA;AACjD;AAOO,SAAS,kBAAA,CAAsB,UAAa,YAAA,EAAwB;AACzE,EAAA,IAAI;AACF,IAAA,IAAI,YAAA,CAAa,QAAQ,CAAA,EAAG;AAG1B,MAAA,kBAAA,EAAmB,CAAE,GAAA,CAAI,QAAA,EAAU,YAAA,IAAgB,QAAQ,CAAA;AAAA,IAC7D;AAEA,IAAA,IAAI,YAAA,CAAa,YAAY,CAAA,IAAK,YAAA,KAAiB,QAAA,EAAU;AAC3D,MAAA,kBAAA,EAAmB,CAAE,GAAA,CAAI,YAAA,EAAc,YAAY,CAAA;AAAA,IACrD;AAAA,EACF,CAAA,CAAA,MAAQ;AAAA,EAER;AACF;AAOO,SAAS,gBAAmB,GAAA,EAAuB;AACxD,EAAA,IAAI;AACF,IAAA,IAAI,YAAA,CAAa,GAAG,CAAA,EAAG;AACrB,MAAA,OAAO,kBAAA,EAAmB,CAAE,GAAA,CAAI,GAAG,CAAA;AAAA,IACrC;AAEA,IAAA,OAAO,KAAA,CAAA;AAAA,EACT,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,MAAA;AAAA,EACT;AACF;AAQO,SAAS,kBAAA,CAAsB,QAAA,EAAa,YAAA,EAAkC,MAAA,EAAqB;AACxG,EAAA,MAAM,QAAA,GAAW,gBAAgB,QAAQ,CAAA;AAEzC,EAAA,IAAI,QAAA,EAAU;AACZ,IAAA,OAAO,QAAA;AAAA,EACT;AAEA,EAAA,MAAM,YAAA,GAAe,aAAa,QAAQ,CAAA;AAE1C,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,kBAAA,CAAmB,UAAU,YAAY,CAAA;AAAA,EAC3C;AAEA,EAAA,OAAO,YAAA;AACT;AAWO,SAAS,gCAAA,CACd,IAAA,EACA,eAAA,EACA,KAAA,EACG;AACH,EAAA,OAAO,gBAAgB,KAAK,CAAA,KAAM,QAAQ,KAAA,GAAQ,IAAA,CAAK,iBAAiB,KAAK,CAAA;AAC/E;;;;;;;"}
1
+ {"version":3,"file":"instrument.js","names":["isObjectLike"],"sources":["../../../src/instrument.ts"],"sourcesContent":["// Use a global WeakMap to track instrumented objects across module instances.\n// This is important for Cloudflare Workers where the module may be bundled\n// separately for workers and Durable Objects, but they share the same global scope.\n// The WeakMap stores original -> instrumented mappings so we can retrieve the\n// instrumented version even if we only have a reference to the original.\nimport { isObjectLike } from '@sentry/core';\n\nconst GLOBAL_KEY = '__SENTRY_INSTRUMENTED_MAP__' as const;\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getInstrumentedMap(): WeakMap<any, any> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const globalObj = globalThis as typeof globalThis & { [GLOBAL_KEY]?: WeakMap<any, any> };\n if (!globalObj[GLOBAL_KEY]) {\n globalObj[GLOBAL_KEY] = new WeakMap();\n }\n return globalObj[GLOBAL_KEY];\n}\n\n/**\n * Check if a value can be used as a WeakMap key.\n * WeakMap keys must be objects or non-registered symbols.\n */\nfunction isWeakMapKey(value: unknown): value is object {\n return isObjectLike(value) || typeof value === 'function';\n}\n\n/**\n * Mark an object as instrumented, storing the instrumented version.\n * @param original The original uninstrumented object\n * @param instrumented The instrumented version (defaults to original if not provided)\n */\nexport function markAsInstrumented<T>(original: T, instrumented?: T): void {\n try {\n if (isWeakMapKey(original)) {\n // Store mapping from original to instrumented version\n // If instrumented is not provided, store original (for backwards compat)\n getInstrumentedMap().set(original, instrumented ?? original);\n }\n // Also mark the instrumented version itself so we recognize it\n if (isWeakMapKey(instrumented) && instrumented !== original) {\n getInstrumentedMap().set(instrumented, instrumented);\n }\n } catch {\n // ignore errors here\n }\n}\n\n/**\n * Get the instrumented version of an object, if available.\n * Returns the instrumented version if the object was previously instrumented,\n * or undefined if not found.\n */\nexport function getInstrumented<T>(obj: T): T | undefined {\n try {\n if (isWeakMapKey(obj)) {\n return getInstrumentedMap().get(obj) as T | undefined;\n }\n\n return undefined;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Returns the already-instrumented version of `original` if one exists,\n * otherwise calls `instrumentFn` to create it, marks the mapping, and returns it.\n *\n * @param noMark - If true, skips storing the original→instrumented mapping.\n */\nexport function ensureInstrumented<T>(original: T, instrumentFn: (original: T) => T, noMark?: boolean): T {\n const existing = getInstrumented(original);\n\n if (existing) {\n return existing;\n }\n\n const instrumented = instrumentFn(original);\n\n if (!noMark) {\n markAsInstrumented(original, instrumented);\n }\n\n return instrumented;\n}\n\n/**\n * Applies `wrap` to `Class` unless `Class` is already an instrumented wrapper.\n *\n * Emitted by the Vite auto-instrumentation transform for classes the worker entry only re-exports:\n * such a class may already be hand-wrapped with `instrument*WithSentry` in the module it comes\n * from, which the build cannot see. Wrapping again would nest two proxies and instrument the same\n * work twice, duplicated child spans, so the hand-wrapped class is returned as-is. Not part of the\n * public API, hand-written wrapper calls are deliberately left untouched by this guard.\n */\nexport function _INTERNAL_wrapUnlessInstrumented<C>(\n wrap: (optionsCallback: (env: never) => unknown, Class: C) => C,\n optionsCallback: (env: never) => unknown,\n Class: C,\n): C {\n return getInstrumented(Class) === Class ? Class : wrap(optionsCallback, Class);\n}\n"],"mappings":";;AAOA,MAAM,aAAa;AAGnB,SAAS,qBAAwC;CAE/C,MAAM,YAAY;CAClB,IAAI,CAAC,UAAU,aACb,UAAU,8BAAc,IAAI,QAAQ;CAEtC,OAAO,UAAU;AACnB;;;;;AAMA,SAAS,aAAa,OAAiC;CACrD,QAAA,GAAOA,aAAAA,aAAAA,CAAa,KAAK,KAAK,OAAO,UAAU;AACjD;;;;;;AAOA,SAAgB,mBAAsB,UAAa,cAAwB;CACzE,IAAI;EACF,IAAI,aAAa,QAAQ,GAGvB,mBAAmB,CAAC,CAAC,IAAI,UAAU,gBAAgB,QAAQ;EAG7D,IAAI,aAAa,YAAY,KAAK,iBAAiB,UACjD,mBAAmB,CAAC,CAAC,IAAI,cAAc,YAAY;CAEvD,QAAQ,CAER;AACF;;;;;;AAOA,SAAgB,gBAAmB,KAAuB;CACxD,IAAI;EACF,IAAI,aAAa,GAAG,GAClB,OAAO,mBAAmB,CAAC,CAAC,IAAI,GAAG;EAGrC;CACF,QAAQ;EACN;CACF;AACF;;;;;;;AAQA,SAAgB,mBAAsB,UAAa,cAAkC,QAAqB;CACxG,MAAM,WAAW,gBAAgB,QAAQ;CAEzC,IAAI,UACF,OAAO;CAGT,MAAM,eAAe,aAAa,QAAQ;CAE1C,IAAI,CAAC,QACH,mBAAmB,UAAU,YAAY;CAG3C,OAAO;AACT;;;;;;;;;;AAWA,SAAgB,iCACd,MACA,iBACA,OACG;CACH,OAAO,gBAAgB,KAAK,MAAM,QAAQ,QAAQ,KAAK,iBAAiB,KAAK;AAC/E"}
@@ -1,16 +1,37 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const instrumentAgentCallableRpc = require('./instrumentAgentCallableRpc.js');
4
- const instrumentAgentRequestConversation = require('./instrumentAgentRequestConversation.js');
5
- const instrumentChatAgentConversation = require('./instrumentChatAgentConversation.js');
6
-
1
+ const require_instrumentAgentCallableRpc = require("./instrumentAgentCallableRpc.js");
2
+ const require_instrumentAgentRequestConversation = require("./instrumentAgentRequestConversation.js");
3
+ const require_instrumentChatAgentConversation = require("./instrumentChatAgentConversation.js");
4
+ // src/instrumentations/agents/index.ts
5
+ /**
6
+ * Instruments an instance of a Cloudflare [`agents`](https://www.npmjs.com/package/agents) `Agent`
7
+ * with Sentry, adding telemetry that is specific to the Agent's runtime behavior:
8
+ *
9
+ * - **Callable RPC spans** — a span (op `rpc`) for each `@callable()` method invoked over WebSocket.
10
+ * - **Conversation correlation** — sets the conversation id on the scope for each unit of agent
11
+ * work — chat turn, callable RPC call, or HTTP request — so `gen_ai` spans created within it are
12
+ * correlated, for chat and plain agents alike. The id is minted once per agent instance and
13
+ * rotated when the chat is cleared (the `message:clear` observability event); it is persisted to
14
+ * Durable Object storage so it survives hibernation.
15
+ *
16
+ * It only hooks the `agents` package internals and uses Sentry's tracing primitives. On Cloudflare
17
+ * Workers, prefer `instrumentAgentWithSentry`, which additionally instruments the Durable Object
18
+ * handlers and initializes the SDK; that function calls this one internally.
19
+ *
20
+ * The hooks replace own-properties on the instance and defer to the original implementation, so
21
+ * they compose with any other instrumentation applied to the same instance.
22
+ *
23
+ * @param agent The `agents` `Agent` instance to instrument.
24
+ * @returns The same instance, instrumented.
25
+ *
26
+ * @internal Use `instrumentAgentWithSentry` instead — this is called internally by it.
27
+ */
7
28
  function instrumentCloudflareAgent(agent) {
8
- const internals = agent;
9
- instrumentAgentCallableRpc.instrumentAgentCallableRpc(internals);
10
- instrumentChatAgentConversation.instrumentChatAgentConversation(internals);
11
- instrumentAgentRequestConversation.instrumentAgentRequestConversation(internals);
12
- return agent;
29
+ const internals = agent;
30
+ require_instrumentAgentCallableRpc.instrumentAgentCallableRpc(internals);
31
+ require_instrumentChatAgentConversation.instrumentChatAgentConversation(internals);
32
+ require_instrumentAgentRequestConversation.instrumentAgentRequestConversation(internals);
33
+ return agent;
13
34
  }
14
-
15
35
  exports.instrumentCloudflareAgent = instrumentCloudflareAgent;
16
- //# sourceMappingURL=index.js.map
36
+
37
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/instrumentations/agents/index.ts"],"sourcesContent":["import { instrumentAgentCallableRpc } from './instrumentAgentCallableRpc';\nimport { instrumentAgentRequestConversation } from './instrumentAgentRequestConversation';\nimport { instrumentChatAgentConversation } from './instrumentChatAgentConversation';\nimport type { AgentInternals } from './types';\n\n/**\n * Instruments an instance of a Cloudflare [`agents`](https://www.npmjs.com/package/agents) `Agent`\n * with Sentry, adding telemetry that is specific to the Agent's runtime behavior:\n *\n * - **Callable RPC spans** — a span (op `rpc`) for each `@callable()` method invoked over WebSocket.\n * - **Conversation correlation** — sets the conversation id on the scope for each unit of agent\n * work — chat turn, callable RPC call, or HTTP request — so `gen_ai` spans created within it are\n * correlated, for chat and plain agents alike. The id is minted once per agent instance and\n * rotated when the chat is cleared (the `message:clear` observability event); it is persisted to\n * Durable Object storage so it survives hibernation.\n *\n * It only hooks the `agents` package internals and uses Sentry's tracing primitives. On Cloudflare\n * Workers, prefer `instrumentAgentWithSentry`, which additionally instruments the Durable Object\n * handlers and initializes the SDK; that function calls this one internally.\n *\n * The hooks replace own-properties on the instance and defer to the original implementation, so\n * they compose with any other instrumentation applied to the same instance.\n *\n * @param agent The `agents` `Agent` instance to instrument.\n * @returns The same instance, instrumented.\n *\n * @internal Use `instrumentAgentWithSentry` instead — this is called internally by it.\n */\nexport function instrumentCloudflareAgent<T extends object>(agent: T): T {\n const internals = agent as T & AgentInternals;\n\n instrumentAgentCallableRpc(internals);\n instrumentChatAgentConversation(internals);\n instrumentAgentRequestConversation(internals);\n\n return agent;\n}\n"],"names":["instrumentAgentCallableRpc","instrumentChatAgentConversation","instrumentAgentRequestConversation"],"mappings":";;;;;;AA4BO,SAAS,0BAA4C,KAAA,EAAa;AACvE,EAAA,MAAM,SAAA,GAAY,KAAA;AAElB,EAAAA,qDAAA,CAA2B,SAAS,CAAA;AACpC,EAAAC,+DAAA,CAAgC,SAAS,CAAA;AACzC,EAAAC,qEAAA,CAAmC,SAAS,CAAA;AAE5C,EAAA,OAAO,KAAA;AACT;;;;"}
1
+ {"version":3,"file":"index.js","names":["instrumentAgentCallableRpc","instrumentChatAgentConversation","instrumentAgentRequestConversation"],"sources":["../../../../../src/instrumentations/agents/index.ts"],"sourcesContent":["import { instrumentAgentCallableRpc } from './instrumentAgentCallableRpc';\nimport { instrumentAgentRequestConversation } from './instrumentAgentRequestConversation';\nimport { instrumentChatAgentConversation } from './instrumentChatAgentConversation';\nimport type { AgentInternals } from './types';\n\n/**\n * Instruments an instance of a Cloudflare [`agents`](https://www.npmjs.com/package/agents) `Agent`\n * with Sentry, adding telemetry that is specific to the Agent's runtime behavior:\n *\n * - **Callable RPC spans** — a span (op `rpc`) for each `@callable()` method invoked over WebSocket.\n * - **Conversation correlation** — sets the conversation id on the scope for each unit of agent\n * work — chat turn, callable RPC call, or HTTP request — so `gen_ai` spans created within it are\n * correlated, for chat and plain agents alike. The id is minted once per agent instance and\n * rotated when the chat is cleared (the `message:clear` observability event); it is persisted to\n * Durable Object storage so it survives hibernation.\n *\n * It only hooks the `agents` package internals and uses Sentry's tracing primitives. On Cloudflare\n * Workers, prefer `instrumentAgentWithSentry`, which additionally instruments the Durable Object\n * handlers and initializes the SDK; that function calls this one internally.\n *\n * The hooks replace own-properties on the instance and defer to the original implementation, so\n * they compose with any other instrumentation applied to the same instance.\n *\n * @param agent The `agents` `Agent` instance to instrument.\n * @returns The same instance, instrumented.\n *\n * @internal Use `instrumentAgentWithSentry` instead — this is called internally by it.\n */\nexport function instrumentCloudflareAgent<T extends object>(agent: T): T {\n const internals = agent as T & AgentInternals;\n\n instrumentAgentCallableRpc(internals);\n instrumentChatAgentConversation(internals);\n instrumentAgentRequestConversation(internals);\n\n return agent;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,SAAgB,0BAA4C,OAAa;CACvE,MAAM,YAAY;CAElBA,mCAAAA,2BAA2B,SAAS;CACpCC,wCAAAA,gCAAgC,SAAS;CACzCC,2CAAAA,mCAAmC,SAAS;CAE5C,OAAO;AACT"}