@sentry/cloudflare 11.0.0-alpha.0 → 11.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (345) hide show
  1. package/build/cjs/dev/baseSdk.js +20 -8
  2. package/build/cjs/dev/baseSdk.js.map +1 -1
  3. package/build/cjs/dev/client.js +116 -24
  4. package/build/cjs/dev/client.js.map +1 -1
  5. package/build/cjs/dev/clientCache.js +15 -0
  6. package/build/cjs/dev/clientCache.js.map +1 -0
  7. package/build/cjs/dev/defineCloudflareOptions.js.map +1 -1
  8. package/build/cjs/dev/durableobject.js +24 -8
  9. package/build/cjs/dev/durableobject.js.map +1 -1
  10. package/build/cjs/dev/flush.js +6 -4
  11. package/build/cjs/dev/flush.js.map +1 -1
  12. package/build/cjs/dev/index.js +4 -3
  13. package/build/cjs/dev/index.js.map +1 -1
  14. package/build/cjs/dev/instrumentations/instrumentDurableObjectNamespace.js +4 -4
  15. package/build/cjs/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
  16. package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js +8 -16
  17. package/build/cjs/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  18. package/build/cjs/dev/instrumentations/worker/instrumentD1.js +5 -1
  19. package/build/cjs/dev/instrumentations/worker/instrumentD1.js.map +1 -1
  20. package/build/cjs/dev/instrumentations/worker/instrumentEmail.js +4 -2
  21. package/build/cjs/dev/instrumentations/worker/instrumentEmail.js.map +1 -1
  22. package/build/cjs/dev/instrumentations/worker/instrumentEnv.js +5 -5
  23. package/build/cjs/dev/instrumentations/worker/instrumentEnv.js.map +1 -1
  24. package/build/cjs/dev/instrumentations/worker/instrumentFetch.js +8 -8
  25. package/build/cjs/dev/instrumentations/worker/instrumentFetch.js.map +1 -1
  26. package/build/cjs/dev/instrumentations/worker/instrumentQueue.js +4 -2
  27. package/build/cjs/dev/instrumentations/worker/instrumentQueue.js.map +1 -1
  28. package/build/cjs/dev/instrumentations/worker/instrumentR2.js +21 -18
  29. package/build/cjs/dev/instrumentations/worker/instrumentR2.js.map +1 -1
  30. package/build/cjs/dev/instrumentations/worker/instrumentRateLimit.js +6 -1
  31. package/build/cjs/dev/instrumentations/worker/instrumentRateLimit.js.map +1 -1
  32. package/build/cjs/dev/instrumentations/worker/instrumentScheduled.js +4 -2
  33. package/build/cjs/dev/instrumentations/worker/instrumentScheduled.js.map +1 -1
  34. package/build/cjs/dev/instrumentations/worker/instrumentTail.js +2 -0
  35. package/build/cjs/dev/instrumentations/worker/instrumentTail.js.map +1 -1
  36. package/build/cjs/dev/integrations/fetch.js +1 -11
  37. package/build/cjs/dev/integrations/fetch.js.map +1 -1
  38. package/build/cjs/dev/opentelemetry/tracer.js +2 -40
  39. package/build/cjs/dev/opentelemetry/tracer.js.map +1 -1
  40. package/build/cjs/dev/pages-plugin.js +2 -2
  41. package/build/cjs/dev/pages-plugin.js.map +1 -1
  42. package/build/cjs/dev/request.js +2 -123
  43. package/build/cjs/dev/request.js.map +1 -1
  44. package/build/cjs/dev/sdk.js +12 -6
  45. package/build/cjs/dev/sdk.js.map +1 -1
  46. package/build/cjs/dev/transport.js +1 -1
  47. package/build/cjs/dev/transport.js.map +1 -1
  48. package/build/cjs/dev/utils/invocationContext.js +41 -0
  49. package/build/cjs/dev/utils/invocationContext.js.map +1 -0
  50. package/build/cjs/dev/utils/invocationScope.js +7 -2
  51. package/build/cjs/dev/utils/invocationScope.js.map +1 -1
  52. package/build/cjs/dev/utils/rpcPropagation.js +15 -0
  53. package/build/cjs/dev/utils/rpcPropagation.js.map +1 -0
  54. package/build/cjs/dev/vite/autoInstrument.js +2 -1
  55. package/build/cjs/dev/vite/autoInstrument.js.map +1 -1
  56. package/build/cjs/dev/vite/index.js +1 -1
  57. package/build/cjs/dev/vite/index.js.map +1 -1
  58. package/build/cjs/dev/vite/transform.js +30 -5
  59. package/build/cjs/dev/vite/transform.js.map +1 -1
  60. package/build/cjs/dev/vite/wranglerConfig.js +21 -1
  61. package/build/cjs/dev/vite/wranglerConfig.js.map +1 -1
  62. package/build/cjs/dev/withSentry.js.map +1 -1
  63. package/build/cjs/dev/workflows.js +45 -33
  64. package/build/cjs/dev/workflows.js.map +1 -1
  65. package/build/cjs/dev/wrapMethodWithSentry.js +51 -15
  66. package/build/cjs/dev/wrapMethodWithSentry.js.map +1 -1
  67. package/build/cjs/dev/wrapRequestHandlerWithInit.js +133 -0
  68. package/build/cjs/dev/wrapRequestHandlerWithInit.js.map +1 -0
  69. package/build/cjs/prod/baseSdk.js +20 -8
  70. package/build/cjs/prod/baseSdk.js.map +1 -1
  71. package/build/cjs/prod/client.js +116 -24
  72. package/build/cjs/prod/client.js.map +1 -1
  73. package/build/cjs/prod/clientCache.js +15 -0
  74. package/build/cjs/prod/clientCache.js.map +1 -0
  75. package/build/cjs/prod/defineCloudflareOptions.js.map +1 -1
  76. package/build/cjs/prod/durableobject.js +24 -8
  77. package/build/cjs/prod/durableobject.js.map +1 -1
  78. package/build/cjs/prod/flush.js +6 -4
  79. package/build/cjs/prod/flush.js.map +1 -1
  80. package/build/cjs/prod/index.js +4 -3
  81. package/build/cjs/prod/index.js.map +1 -1
  82. package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js +4 -4
  83. package/build/cjs/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
  84. package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js +8 -16
  85. package/build/cjs/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  86. package/build/cjs/prod/instrumentations/worker/instrumentD1.js +5 -1
  87. package/build/cjs/prod/instrumentations/worker/instrumentD1.js.map +1 -1
  88. package/build/cjs/prod/instrumentations/worker/instrumentEmail.js +4 -2
  89. package/build/cjs/prod/instrumentations/worker/instrumentEmail.js.map +1 -1
  90. package/build/cjs/prod/instrumentations/worker/instrumentEnv.js +5 -5
  91. package/build/cjs/prod/instrumentations/worker/instrumentEnv.js.map +1 -1
  92. package/build/cjs/prod/instrumentations/worker/instrumentFetch.js +8 -8
  93. package/build/cjs/prod/instrumentations/worker/instrumentFetch.js.map +1 -1
  94. package/build/cjs/prod/instrumentations/worker/instrumentQueue.js +4 -2
  95. package/build/cjs/prod/instrumentations/worker/instrumentQueue.js.map +1 -1
  96. package/build/cjs/prod/instrumentations/worker/instrumentR2.js +21 -18
  97. package/build/cjs/prod/instrumentations/worker/instrumentR2.js.map +1 -1
  98. package/build/cjs/prod/instrumentations/worker/instrumentRateLimit.js +6 -1
  99. package/build/cjs/prod/instrumentations/worker/instrumentRateLimit.js.map +1 -1
  100. package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js +4 -2
  101. package/build/cjs/prod/instrumentations/worker/instrumentScheduled.js.map +1 -1
  102. package/build/cjs/prod/instrumentations/worker/instrumentTail.js +2 -0
  103. package/build/cjs/prod/instrumentations/worker/instrumentTail.js.map +1 -1
  104. package/build/cjs/prod/integrations/fetch.js +1 -11
  105. package/build/cjs/prod/integrations/fetch.js.map +1 -1
  106. package/build/cjs/prod/opentelemetry/tracer.js +2 -40
  107. package/build/cjs/prod/opentelemetry/tracer.js.map +1 -1
  108. package/build/cjs/prod/pages-plugin.js +2 -2
  109. package/build/cjs/prod/pages-plugin.js.map +1 -1
  110. package/build/cjs/prod/request.js +2 -123
  111. package/build/cjs/prod/request.js.map +1 -1
  112. package/build/cjs/prod/sdk.js +12 -6
  113. package/build/cjs/prod/sdk.js.map +1 -1
  114. package/build/cjs/prod/transport.js +1 -1
  115. package/build/cjs/prod/transport.js.map +1 -1
  116. package/build/cjs/prod/utils/invocationContext.js +41 -0
  117. package/build/cjs/prod/utils/invocationContext.js.map +1 -0
  118. package/build/cjs/prod/utils/invocationScope.js +7 -2
  119. package/build/cjs/prod/utils/invocationScope.js.map +1 -1
  120. package/build/cjs/prod/utils/rpcPropagation.js +15 -0
  121. package/build/cjs/prod/utils/rpcPropagation.js.map +1 -0
  122. package/build/cjs/prod/vite/autoInstrument.js +2 -1
  123. package/build/cjs/prod/vite/autoInstrument.js.map +1 -1
  124. package/build/cjs/prod/vite/index.js +1 -1
  125. package/build/cjs/prod/vite/index.js.map +1 -1
  126. package/build/cjs/prod/vite/transform.js +30 -5
  127. package/build/cjs/prod/vite/transform.js.map +1 -1
  128. package/build/cjs/prod/vite/wranglerConfig.js +21 -1
  129. package/build/cjs/prod/vite/wranglerConfig.js.map +1 -1
  130. package/build/cjs/prod/withSentry.js.map +1 -1
  131. package/build/cjs/prod/workflows.js +45 -33
  132. package/build/cjs/prod/workflows.js.map +1 -1
  133. package/build/cjs/prod/wrapMethodWithSentry.js +51 -15
  134. package/build/cjs/prod/wrapMethodWithSentry.js.map +1 -1
  135. package/build/cjs/prod/wrapRequestHandlerWithInit.js +133 -0
  136. package/build/cjs/prod/wrapRequestHandlerWithInit.js.map +1 -0
  137. package/build/esm/dev/baseSdk.js +21 -9
  138. package/build/esm/dev/baseSdk.js.map +1 -1
  139. package/build/esm/dev/client.js +117 -25
  140. package/build/esm/dev/client.js.map +1 -1
  141. package/build/esm/dev/clientCache.js +12 -0
  142. package/build/esm/dev/clientCache.js.map +1 -0
  143. package/build/esm/dev/defineCloudflareOptions.js.map +1 -1
  144. package/build/esm/dev/durableobject.js +23 -7
  145. package/build/esm/dev/durableobject.js.map +1 -1
  146. package/build/esm/dev/flush.js +6 -4
  147. package/build/esm/dev/flush.js.map +1 -1
  148. package/build/esm/dev/index.js +3 -4
  149. package/build/esm/dev/index.js.map +1 -1
  150. package/build/esm/dev/instrumentations/instrumentDurableObjectNamespace.js +4 -4
  151. package/build/esm/dev/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
  152. package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js +8 -16
  153. package/build/esm/dev/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  154. package/build/esm/dev/instrumentations/worker/instrumentD1.js +6 -2
  155. package/build/esm/dev/instrumentations/worker/instrumentD1.js.map +1 -1
  156. package/build/esm/dev/instrumentations/worker/instrumentEmail.js +7 -5
  157. package/build/esm/dev/instrumentations/worker/instrumentEmail.js.map +1 -1
  158. package/build/esm/dev/instrumentations/worker/instrumentEnv.js +5 -5
  159. package/build/esm/dev/instrumentations/worker/instrumentEnv.js.map +1 -1
  160. package/build/esm/dev/instrumentations/worker/instrumentFetch.js +1 -1
  161. package/build/esm/dev/instrumentations/worker/instrumentFetch.js.map +1 -1
  162. package/build/esm/dev/instrumentations/worker/instrumentQueue.js +7 -5
  163. package/build/esm/dev/instrumentations/worker/instrumentQueue.js.map +1 -1
  164. package/build/esm/dev/instrumentations/worker/instrumentR2.js +22 -19
  165. package/build/esm/dev/instrumentations/worker/instrumentR2.js.map +1 -1
  166. package/build/esm/dev/instrumentations/worker/instrumentRateLimit.js +6 -1
  167. package/build/esm/dev/instrumentations/worker/instrumentRateLimit.js.map +1 -1
  168. package/build/esm/dev/instrumentations/worker/instrumentScheduled.js +7 -5
  169. package/build/esm/dev/instrumentations/worker/instrumentScheduled.js.map +1 -1
  170. package/build/esm/dev/instrumentations/worker/instrumentTail.js +2 -0
  171. package/build/esm/dev/instrumentations/worker/instrumentTail.js.map +1 -1
  172. package/build/esm/dev/integrations/fetch.js +2 -12
  173. package/build/esm/dev/integrations/fetch.js.map +1 -1
  174. package/build/esm/dev/opentelemetry/tracer.js +2 -40
  175. package/build/esm/dev/opentelemetry/tracer.js.map +1 -1
  176. package/build/esm/dev/package.json +1 -1
  177. package/build/esm/dev/pages-plugin.js +1 -1
  178. package/build/esm/dev/pages-plugin.js.map +1 -1
  179. package/build/esm/dev/request.js +2 -122
  180. package/build/esm/dev/request.js.map +1 -1
  181. package/build/esm/dev/sdk.js +12 -7
  182. package/build/esm/dev/sdk.js.map +1 -1
  183. package/build/esm/dev/transport.js +1 -1
  184. package/build/esm/dev/transport.js.map +1 -1
  185. package/build/esm/dev/utils/invocationContext.js +37 -0
  186. package/build/esm/dev/utils/invocationContext.js.map +1 -0
  187. package/build/esm/dev/utils/invocationScope.js +7 -2
  188. package/build/esm/dev/utils/invocationScope.js.map +1 -1
  189. package/build/esm/dev/utils/rpcPropagation.js +13 -0
  190. package/build/esm/dev/utils/rpcPropagation.js.map +1 -0
  191. package/build/esm/dev/utils/traceLinks.js +1 -1
  192. package/build/esm/dev/vite/autoInstrument.js +2 -1
  193. package/build/esm/dev/vite/autoInstrument.js.map +1 -1
  194. package/build/esm/dev/vite/index.js +1 -1
  195. package/build/esm/dev/vite/index.js.map +1 -1
  196. package/build/esm/dev/vite/transform.js +30 -5
  197. package/build/esm/dev/vite/transform.js.map +1 -1
  198. package/build/esm/dev/vite/wranglerConfig.js +21 -2
  199. package/build/esm/dev/vite/wranglerConfig.js.map +1 -1
  200. package/build/esm/dev/withSentry.js.map +1 -1
  201. package/build/esm/dev/workflows.js +48 -36
  202. package/build/esm/dev/workflows.js.map +1 -1
  203. package/build/esm/dev/wrapMethodWithSentry.js +53 -17
  204. package/build/esm/dev/wrapMethodWithSentry.js.map +1 -1
  205. package/build/esm/dev/wrapRequestHandlerWithInit.js +131 -0
  206. package/build/esm/dev/wrapRequestHandlerWithInit.js.map +1 -0
  207. package/build/esm/prod/baseSdk.js +21 -9
  208. package/build/esm/prod/baseSdk.js.map +1 -1
  209. package/build/esm/prod/client.js +117 -25
  210. package/build/esm/prod/client.js.map +1 -1
  211. package/build/esm/prod/clientCache.js +12 -0
  212. package/build/esm/prod/clientCache.js.map +1 -0
  213. package/build/esm/prod/defineCloudflareOptions.js.map +1 -1
  214. package/build/esm/prod/durableobject.js +23 -7
  215. package/build/esm/prod/durableobject.js.map +1 -1
  216. package/build/esm/prod/flush.js +6 -4
  217. package/build/esm/prod/flush.js.map +1 -1
  218. package/build/esm/prod/index.js +3 -4
  219. package/build/esm/prod/index.js.map +1 -1
  220. package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js +4 -4
  221. package/build/esm/prod/instrumentations/instrumentDurableObjectNamespace.js.map +1 -1
  222. package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js +8 -16
  223. package/build/esm/prod/instrumentations/instrumentWorkerEntrypoint.js.map +1 -1
  224. package/build/esm/prod/instrumentations/worker/instrumentD1.js +6 -2
  225. package/build/esm/prod/instrumentations/worker/instrumentD1.js.map +1 -1
  226. package/build/esm/prod/instrumentations/worker/instrumentEmail.js +7 -5
  227. package/build/esm/prod/instrumentations/worker/instrumentEmail.js.map +1 -1
  228. package/build/esm/prod/instrumentations/worker/instrumentEnv.js +5 -5
  229. package/build/esm/prod/instrumentations/worker/instrumentEnv.js.map +1 -1
  230. package/build/esm/prod/instrumentations/worker/instrumentFetch.js +1 -1
  231. package/build/esm/prod/instrumentations/worker/instrumentFetch.js.map +1 -1
  232. package/build/esm/prod/instrumentations/worker/instrumentQueue.js +7 -5
  233. package/build/esm/prod/instrumentations/worker/instrumentQueue.js.map +1 -1
  234. package/build/esm/prod/instrumentations/worker/instrumentR2.js +22 -19
  235. package/build/esm/prod/instrumentations/worker/instrumentR2.js.map +1 -1
  236. package/build/esm/prod/instrumentations/worker/instrumentRateLimit.js +6 -1
  237. package/build/esm/prod/instrumentations/worker/instrumentRateLimit.js.map +1 -1
  238. package/build/esm/prod/instrumentations/worker/instrumentScheduled.js +7 -5
  239. package/build/esm/prod/instrumentations/worker/instrumentScheduled.js.map +1 -1
  240. package/build/esm/prod/instrumentations/worker/instrumentTail.js +2 -0
  241. package/build/esm/prod/instrumentations/worker/instrumentTail.js.map +1 -1
  242. package/build/esm/prod/integrations/fetch.js +2 -12
  243. package/build/esm/prod/integrations/fetch.js.map +1 -1
  244. package/build/esm/prod/opentelemetry/tracer.js +2 -40
  245. package/build/esm/prod/opentelemetry/tracer.js.map +1 -1
  246. package/build/esm/prod/package.json +1 -1
  247. package/build/esm/prod/pages-plugin.js +1 -1
  248. package/build/esm/prod/pages-plugin.js.map +1 -1
  249. package/build/esm/prod/request.js +2 -122
  250. package/build/esm/prod/request.js.map +1 -1
  251. package/build/esm/prod/sdk.js +12 -7
  252. package/build/esm/prod/sdk.js.map +1 -1
  253. package/build/esm/prod/transport.js +1 -1
  254. package/build/esm/prod/transport.js.map +1 -1
  255. package/build/esm/prod/utils/invocationContext.js +37 -0
  256. package/build/esm/prod/utils/invocationContext.js.map +1 -0
  257. package/build/esm/prod/utils/invocationScope.js +7 -2
  258. package/build/esm/prod/utils/invocationScope.js.map +1 -1
  259. package/build/esm/prod/utils/rpcPropagation.js +13 -0
  260. package/build/esm/prod/utils/rpcPropagation.js.map +1 -0
  261. package/build/esm/prod/utils/traceLinks.js +1 -1
  262. package/build/esm/prod/vite/autoInstrument.js +2 -1
  263. package/build/esm/prod/vite/autoInstrument.js.map +1 -1
  264. package/build/esm/prod/vite/index.js +1 -1
  265. package/build/esm/prod/vite/index.js.map +1 -1
  266. package/build/esm/prod/vite/transform.js +30 -5
  267. package/build/esm/prod/vite/transform.js.map +1 -1
  268. package/build/esm/prod/vite/wranglerConfig.js +21 -2
  269. package/build/esm/prod/vite/wranglerConfig.js.map +1 -1
  270. package/build/esm/prod/withSentry.js.map +1 -1
  271. package/build/esm/prod/workflows.js +48 -36
  272. package/build/esm/prod/workflows.js.map +1 -1
  273. package/build/esm/prod/wrapMethodWithSentry.js +53 -17
  274. package/build/esm/prod/wrapMethodWithSentry.js.map +1 -1
  275. package/build/esm/prod/wrapRequestHandlerWithInit.js +131 -0
  276. package/build/esm/prod/wrapRequestHandlerWithInit.js.map +1 -0
  277. package/build/types/baseSdk.d.ts +8 -0
  278. package/build/types/baseSdk.d.ts.map +1 -1
  279. package/build/types/client.d.ts +94 -21
  280. package/build/types/client.d.ts.map +1 -1
  281. package/build/types/clientCache.d.ts +8 -0
  282. package/build/types/clientCache.d.ts.map +1 -0
  283. package/build/types/defineCloudflareOptions.d.ts +3 -2
  284. package/build/types/defineCloudflareOptions.d.ts.map +1 -1
  285. package/build/types/durableobject.d.ts +5 -7
  286. package/build/types/durableobject.d.ts.map +1 -1
  287. package/build/types/flush.d.ts +2 -0
  288. package/build/types/flush.d.ts.map +1 -1
  289. package/build/types/index.d.ts +3 -4
  290. package/build/types/index.d.ts.map +1 -1
  291. package/build/types/instrumentations/instrumentDurableObjectNamespace.d.ts +2 -1
  292. package/build/types/instrumentations/instrumentDurableObjectNamespace.d.ts.map +1 -1
  293. package/build/types/instrumentations/instrumentWorkerEntrypoint.d.ts +2 -3
  294. package/build/types/instrumentations/instrumentWorkerEntrypoint.d.ts.map +1 -1
  295. package/build/types/instrumentations/worker/instrumentD1.d.ts.map +1 -1
  296. package/build/types/instrumentations/worker/instrumentEmail.d.ts.map +1 -1
  297. package/build/types/instrumentations/worker/instrumentEnv.d.ts.map +1 -1
  298. package/build/types/instrumentations/worker/instrumentQueue.d.ts.map +1 -1
  299. package/build/types/instrumentations/worker/instrumentR2.d.ts.map +1 -1
  300. package/build/types/instrumentations/worker/instrumentRateLimit.d.ts.map +1 -1
  301. package/build/types/instrumentations/worker/instrumentScheduled.d.ts.map +1 -1
  302. package/build/types/instrumentations/worker/instrumentTail.d.ts.map +1 -1
  303. package/build/types/integrations/fetch.d.ts.map +1 -1
  304. package/build/types/opentelemetry/tracer.d.ts.map +1 -1
  305. package/build/types/pages-plugin.d.ts +3 -1
  306. package/build/types/pages-plugin.d.ts.map +1 -1
  307. package/build/types/request.d.ts +5 -31
  308. package/build/types/request.d.ts.map +1 -1
  309. package/build/types/sdk.d.ts +13 -4
  310. package/build/types/sdk.d.ts.map +1 -1
  311. package/build/types/transport.d.ts.map +1 -1
  312. package/build/types/types.d.ts +28 -0
  313. package/build/types/types.d.ts.map +1 -1
  314. package/build/types/utils/invocationContext.d.ts +58 -0
  315. package/build/types/utils/invocationContext.d.ts.map +1 -0
  316. package/build/types/utils/invocationScope.d.ts +2 -1
  317. package/build/types/utils/invocationScope.d.ts.map +1 -1
  318. package/build/types/utils/rpcPropagation.d.ts +10 -0
  319. package/build/types/utils/rpcPropagation.d.ts.map +1 -0
  320. package/build/types/vite/autoInstrument.d.ts.map +1 -1
  321. package/build/types/vite/index.d.ts +24 -20
  322. package/build/types/vite/index.d.ts.map +1 -1
  323. package/build/types/vite/transform.d.ts +3 -0
  324. package/build/types/vite/transform.d.ts.map +1 -1
  325. package/build/types/vite/wranglerConfig.d.ts +13 -0
  326. package/build/types/vite/wranglerConfig.d.ts.map +1 -1
  327. package/build/types/withSentry.d.ts +2 -3
  328. package/build/types/withSentry.d.ts.map +1 -1
  329. package/build/types/workflows.d.ts +3 -3
  330. package/build/types/workflows.d.ts.map +1 -1
  331. package/build/types/wrapMethodWithSentry.d.ts +6 -1
  332. package/build/types/wrapMethodWithSentry.d.ts.map +1 -1
  333. package/build/types/wrapRequestHandlerWithInit.d.ts +31 -0
  334. package/build/types/wrapRequestHandlerWithInit.d.ts.map +1 -0
  335. package/package.json +6 -4
  336. package/build/cjs/dev/integrations/tracing/vercelai.js +0 -18
  337. package/build/cjs/dev/integrations/tracing/vercelai.js.map +0 -1
  338. package/build/cjs/prod/integrations/tracing/vercelai.js +0 -18
  339. package/build/cjs/prod/integrations/tracing/vercelai.js.map +0 -1
  340. package/build/esm/dev/integrations/tracing/vercelai.js +0 -16
  341. package/build/esm/dev/integrations/tracing/vercelai.js.map +0 -1
  342. package/build/esm/prod/integrations/tracing/vercelai.js +0 -16
  343. package/build/esm/prod/integrations/tracing/vercelai.js.map +0 -1
  344. package/build/types/integrations/tracing/vercelai.d.ts +0 -40
  345. package/build/types/integrations/tracing/vercelai.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- import type { ClientOptions, Options } from '@sentry/core';
1
+ import type { ClientOptions, Options, TracePropagationTargets } from '@sentry/core';
2
2
  import { ServerRuntimeClient } from '@sentry/core';
3
3
  import type { ExecutionContextCompat } from './executionContext';
4
4
  import type { makeFlushLock } from './flush';
@@ -16,6 +16,13 @@ export declare class CloudflareClient extends ServerRuntimeClient {
16
16
  private _resolveSpanCompletion;
17
17
  private _unsubscribeSpanStart;
18
18
  private _unsubscribeSpanEnd;
19
+ private _inBoundaryFlush;
20
+ /**
21
+ * Whether this client is a cached, cross-invocation client (`cacheClient`).
22
+ * Cached clients are never disposed at an invocation boundary, so their spans/events
23
+ * are delivered eagerly instead of waiting for a per-invocation flush.
24
+ */
25
+ readonly isCachedClient: boolean;
19
26
  /**
20
27
  * Creates a new Cloudflare SDK instance.
21
28
  * @param options Configuration options for this SDK.
@@ -47,6 +54,39 @@ export declare class CloudflareClient extends ServerRuntimeClient {
47
54
  * Resets the span completion promise and resolve function.
48
55
  */
49
56
  private _resetSpanCompletionPromise;
57
+ /**
58
+ * Drains the transport after an envelope has been accepted past the invocation's
59
+ * flush point. The transport queues request producers until `flush()`; before the
60
+ * flush point the boundary `flush()` drains everything, but envelopes created after
61
+ * it (post-response `waitUntil` work, detached continuations) have no later flush to
62
+ * ride. The drain is registered with the invocation's `waitUntil` to keep the fetch
63
+ * alive; outside any instrumented invocation it always runs.
64
+ */
65
+ private _setupEagerEnvelopeDelivery;
66
+ /**
67
+ * Turns spans, logs and metrics captured past the invocation's flush point into
68
+ * envelopes. Before the flush point the boundary `flush()` drains their buffers; after
69
+ * it (or outside any instrumented invocation) nothing else would: the log/metric idle
70
+ * timer is disabled for this runtime (`_flushInterval: 0`) and the span buffer's own 5s
71
+ * timer fires outside any invocation, where the runtime suspends the send. Each capture
72
+ * drains only its own bucket (the ended span's trace, the log buffer, the metric
73
+ * buffer), so a fan-out of concurrent traces stays one envelope per trace. RPC method
74
+ * spans never reach this path: `wrapMethodWithSentry` runs the boundary flush after the
75
+ * method span has ended, so only work past that (e.g. detached continuations) lands here.
76
+ */
77
+ private _setupEagerBufferDelivery;
78
+ /**
79
+ * Runs `drain` unless the owning invocation has not reached its flush point yet
80
+ * (before it the boundary `flush()` delivers the buffers).
81
+ */
82
+ private _eagerDrain;
83
+ /**
84
+ * Attaches a promise to the `waitUntil` of the invocation that owns the current
85
+ * async context, so the runtime keeps the send alive after the response is returned.
86
+ * Outside any instrumented invocation (or where the context has no `waitUntil`,
87
+ * e.g. Astro prerendering) the send is fire-and-forget.
88
+ */
89
+ private _registerWithInvocationWaitUntil;
50
90
  }
51
91
  interface BaseCloudflareOptions {
52
92
  /**
@@ -56,47 +96,52 @@ interface BaseCloudflareOptions {
56
96
  */
57
97
  enableDedupe?: boolean;
58
98
  /**
59
- * The Cloudflare SDK is not OpenTelemetry native. By default (`true`) it does not set up a tracer
99
+ * The Cloudflare SDK is not OpenTelemetry native. By default (`false`) it does not set up a tracer
60
100
  * provider; spans are emitted via the SDK's own instrumentation and scopes are isolated with
61
101
  * AsyncLocalStorage.
62
102
  *
63
- * Set this to `false` to opt into the OpenTelemetry compatibility tracer, which captures spans
103
+ * Set this to `true` to opt into the OpenTelemetry compatibility tracer, which captures spans
64
104
  * emitted via `@opentelemetry/api`. Big caveat: it does not handle custom context, always working
65
105
  * off the current scope. This is good enough for many, but not all, integrations.
66
106
  *
67
- * @default true
107
+ * @default false
68
108
  */
69
- skipOpenTelemetrySetup?: boolean;
109
+ enableOpenTelemetrySetup?: boolean;
70
110
  /**
71
- * Enable trace propagation for RPC calls between Workers, Durable Objects, and Service Bindings.
111
+ * The bindings on `env` that outgoing RPC calls propagate trace context to.
72
112
  *
73
- * When enabled, trace context (sentry-trace + baggage) is propagated across:
74
- * - `stub.fetch()` calls to Durable Objects (via HTTP headers)
75
- * - Service binding `fetch()` calls (via HTTP headers)
76
- * - RPC method calls to Durable Objects and WorkerEntrypoints (via trailing argument)
113
+ * Strings match a binding name exactly, regular expressions match by pattern. An empty array
114
+ * (the default) propagates to nothing.
77
115
  *
78
- * When enabled on the **receiver side** (DurableObject or WorkerEntrypoint), the SDK will also:
79
- * - Extract and continue traces from incoming RPC calls
80
- * - Create spans for each RPC method invocation
81
- * - Capture errors thrown by RPC methods
116
+ * RPC has no headers to carry trace context, so the SDK appends it as a trailing argument to
117
+ * every RPC method call on a matching binding. Only a Sentry-instrumented receiver strips that
118
+ * argument again. Anywhere else it arrives as a real argument and changes what the method was
119
+ * called with, so list only the bindings whose receiver you know runs Sentry.
82
120
  *
83
- * **Important:** This option is enabled by default. Set it to `false` to opt out, e.g. if you
84
- * do not want trace context to leave your Worker via RPC calls.
121
+ * Propagation over `stub.fetch()` and service binding `fetch()` uses HTTP headers and is not
122
+ * affected by this option.
85
123
  *
86
- * @default true
124
+ * Strings match a binding name exactly, regular expressions match by pattern. Both match
125
+ * case-insensitively.
126
+ *
127
+ * When you build with the Sentry Cloudflare Vite plugin, bindings that resolve to *this* worker
128
+ * (its own Durable Objects, its self service bindings) are added for you, because the plugin
129
+ * instruments those receivers itself. Whatever you list here is added on top of them.
130
+ *
131
+ * @default []
87
132
  * @example
88
133
  * ```ts
89
- * // Opt out of RPC trace propagation
134
+ * // Propagate to `env.ORDERS` and every `env.SVC_*` binding
90
135
  * export default Sentry.withSentry(
91
- * (env) => ({
136
+ * env => ({
92
137
  * dsn: env.SENTRY_DSN,
93
- * enableRpcTracePropagation: false,
138
+ * rpcTracePropagationBindings: ['ORDERS', /^SVC_/],
94
139
  * }),
95
140
  * handler,
96
141
  * );
97
142
  * ```
98
143
  */
99
- enableRpcTracePropagation?: boolean;
144
+ rpcTracePropagationBindings?: TracePropagationTargets;
100
145
  /**
101
146
  * Table names that should stay instrumented even though they match the reserved `cf_` prefix used
102
147
  * by Durable Object frameworks (`agents`, `partyserver`, ...) for their internal SQLite tables.
@@ -144,6 +189,12 @@ interface BaseCloudflareOptions {
144
189
  * ```
145
190
  */
146
191
  durableObjectStorageSpanAllowlist?: Array<string | RegExp>;
192
+ /**
193
+ * Sets an optional server name (device name).
194
+ *
195
+ * This is useful for identifying which server or instance is sending events.
196
+ */
197
+ serverName?: string;
147
198
  /**
148
199
  * If you use Spotlight by Sentry during development, use
149
200
  * this option to forward captured Sentry events to Spotlight.
@@ -155,6 +206,28 @@ interface BaseCloudflareOptions {
155
206
  * IMPORTANT: Only set this option to `true` while developing, not in production!
156
207
  */
157
208
  spotlight?: boolean | string;
209
+ /**
210
+ * Cache the client and reuse it across invocations within the same isolate.
211
+ *
212
+ * The SDK creates one client per isolate and reuses it for all requests/DO
213
+ * handlers in that isolate. This avoids the per-invocation cost of
214
+ * constructing a new client.
215
+ *
216
+ * Since a cached client outlives any single invocation, data captured after an
217
+ * invocation's flush point (post-response `waitUntil` work, detached background
218
+ * work) is delivered eagerly instead of waiting for a flush that never comes.
219
+ *
220
+ * The first `init()` in an isolate decides the cached client's options; later
221
+ * `init()` calls with different options (e.g. another DSN) reuse the cached client
222
+ * unchanged (a debug warning is logged for a DSN change). Use `cacheClient: false`
223
+ * when options must differ per invocation.
224
+ *
225
+ * When disabled, a new client is created per invocation and disposed after the
226
+ * handler completes.
227
+ *
228
+ * @default true
229
+ */
230
+ cacheClient?: boolean;
158
231
  }
159
232
  /**
160
233
  * Configuration options for the Sentry Cloudflare SDK
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAA8B,MAAM,cAAc,CAAC;AACvF,OAAO,EAIL,mBAAmB,EAEpB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE9D;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,mBAAmB;IACvD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA0C;IACrE,OAAO,CAAC,aAAa,CAA0B;IAC/C,OAAO,CAAC,sBAAsB,CAA8B;IAC5D,OAAO,CAAC,sBAAsB,CAA6B;IAE3D,OAAO,CAAC,qBAAqB,CAA6B;IAC1D,OAAO,CAAC,mBAAmB,CAA6B;IAExD;;;OAGG;IACH,YAAmB,OAAO,EAAE,uBAAuB,EAmDlD;IAED;;;;;;;;OAQG;IACU,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAyBrD;IAED;;;;;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AAC,CAAC;IAEvD;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,iCAAiC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAE3D;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE7B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,OAAO,CAAC,0BAA0B,CAAC,EAAE,qBAAqB;IACnG,GAAG,CAAC,EAAE,sBAAsB,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAwB,SAAQ,aAAa,CAAC,0BAA0B,CAAC,EAAE,qBAAqB;IAC/G,SAAS,CAAC,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;CAC9C"}
@@ -0,0 +1,8 @@
1
+ import type { CloudflareClient } from './client';
2
+ /** Returns the one cached Cloudflare client for this isolate. */
3
+ export declare function getCachedClient(): CloudflareClient | undefined;
4
+ /** Stores the one Cloudflare client reused by every invocation in this isolate. */
5
+ export declare function cacheClient(client: CloudflareClient): void;
6
+ /** @hidden Only for testing - clears the isolate's cached Cloudflare client. */
7
+ export declare function _clearGlobalClientCache(): void;
8
+ //# sourceMappingURL=clientCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientCache.d.ts","sourceRoot":"","sources":["../../src/clientCache.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAQjD,iEAAiE;AACjE,wBAAgB,eAAe,IAAI,gBAAgB,GAAG,SAAS,CAE9D;AAED,mFAAmF;AACnF,wBAAgB,WAAW,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAE1D;AAED,gFAAgF;AAChF,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C"}
@@ -1,5 +1,5 @@
1
1
  import type { CloudflareOptions } from './client';
2
- import type { DefaultEnv } from './types';
2
+ import type { DefaultEnv, StrictCloudflareOptions } from './types';
3
3
  /**
4
4
  * Define the Sentry options for a Cloudflare Worker in a dedicated module.
5
5
  *
@@ -34,5 +34,6 @@ import type { DefaultEnv } from './types';
34
34
  * export default defineCloudflareOptions({ tracesSampleRate: 1.0 });
35
35
  * ```
36
36
  */
37
- export declare function defineCloudflareOptions<Env = DefaultEnv>(optionsOrCallback: CloudflareOptions | ((env: Env) => CloudflareOptions | undefined)): (env: Env) => CloudflareOptions | undefined;
37
+ export declare function defineCloudflareOptions<Env = DefaultEnv, O = unknown>(callback: (env: Env) => StrictCloudflareOptions<O> | undefined): (env: Env) => CloudflareOptions | undefined;
38
+ export declare function defineCloudflareOptions<Env = DefaultEnv>(options: CloudflareOptions): (env: Env) => CloudflareOptions | undefined;
38
39
  //# sourceMappingURL=defineCloudflareOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defineCloudflareOptions.d.ts","sourceRoot":"","sources":["../../src/defineCloudflareOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,GAAG,UAAU,EACtD,iBAAiB,EAAE,iBAAiB,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,iBAAiB,GAAG,SAAS,CAAC,GACnF,CAAC,GAAG,EAAE,GAAG,KAAK,iBAAiB,GAAG,SAAS,CAM7C"}
1
+ {"version":3,"file":"defineCloudflareOptions.d.ts","sourceRoot":"","sources":["../../src/defineCloudflareOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAKH,wBAAgB,uBAAuB,CAAC,GAAG,GAAG,UAAU,EAAE,CAAC,GAAG,OAAO,EACnE,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,uBAAuB,CAAC,CAAC,CAAC,GAAG,SAAS,GAC7D,CAAC,GAAG,EAAE,GAAG,KAAK,iBAAiB,GAAG,SAAS,CAAC;AAC/C,wBAAgB,uBAAuB,CAAC,GAAG,GAAG,UAAU,EACtD,OAAO,EAAE,iBAAiB,GACzB,CAAC,GAAG,EAAE,GAAG,KAAK,iBAAiB,GAAG,SAAS,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { DurableObject } from 'cloudflare:workers';
2
2
  import type { CloudflareOptions } from './client';
3
- import type { DefaultEnv, ResolveEnv } from './types';
3
+ import type { DefaultEnv, ResolveEnv, StrictCloudflareOptions } from './types';
4
4
  /**
5
5
  * The instrumented context passed between the shared construction helpers.
6
6
  *
@@ -38,8 +38,7 @@ export declare function constructInstrumentedDurableObject<E, T extends DurableO
38
38
  * visible to Cloudflare's RPC dispatcher. Built-in handlers, Agent handlers, and methods managed by
39
39
  * another framework are left untouched.
40
40
  *
41
- * Call this after all per-instance instrumentation has been applied. If RPC trace propagation is
42
- * disabled, the object is returned unchanged.
41
+ * Call this after all per-instance instrumentation has been applied.
43
42
  *
44
43
  * @param obj The constructed Durable Object instance.
45
44
  * @param options The resolved SDK options for this instance.
@@ -59,8 +58,7 @@ export declare function finalizeWithRpcInstrumentation<T extends object>(obj: T,
59
58
  * - webSocketClose
60
59
  * - webSocketError
61
60
  *
62
- * RPC methods (prototype methods) are instrumented by default. Set `enableRpcTracePropagation`
63
- * to `false` to opt out.
61
+ * RPC methods (prototype methods) are instrumented too, so an incoming trace continues into them.
64
62
  *
65
63
  * @param optionsCallback Function that returns the options for the SDK initialization.
66
64
  * @param DurableObjectClass The Durable Object class to instrument.
@@ -83,7 +81,7 @@ export declare function finalizeWithRpcInstrumentation<T extends object>(obj: T,
83
81
  * );
84
82
  * ```
85
83
  */
86
- export declare function instrumentDurableObjectWithSentry<Env = DefaultEnv, T extends DurableObject<any> = DurableObject<Env>, C extends new (state: DurableObjectState, env: any) => T = new (state: DurableObjectState, env: any) => T>(optionsCallback: (env: ResolveEnv<C, Env>) => CloudflareOptions, DurableObjectClass: C): C;
84
+ export declare function instrumentDurableObjectWithSentry<Env = DefaultEnv, T extends DurableObject<any> = DurableObject<Env>, C extends new (state: DurableObjectState, env: any) => T = new (state: DurableObjectState, env: any) => T, O = unknown>(optionsCallback: (env: ResolveEnv<C, Env>) => StrictCloudflareOptions<O>, DurableObjectClass: C): C;
87
85
  /**
88
86
  * Instruments a Cloudflare [`agents`](https://www.npmjs.com/package/agents) Agent class with Sentry.
89
87
  *
@@ -123,6 +121,6 @@ export declare function instrumentDurableObjectWithSentry<Env = DefaultEnv, T ex
123
121
  * );
124
122
  * ```
125
123
  */
126
- export declare function instrumentAgentWithSentry<Env = DefaultEnv, T extends DurableObject<any> = DurableObject<Env>, C extends new (state: DurableObjectState, env: any) => T = new (state: DurableObjectState, env: any) => T>(optionsCallback: (env: ResolveEnv<C, Env>) => CloudflareOptions, AgentClass: C): C;
124
+ export declare function instrumentAgentWithSentry<Env = DefaultEnv, T extends DurableObject<any> = DurableObject<Env>, C extends new (state: DurableObjectState, env: any) => T = new (state: DurableObjectState, env: any) => T, O = unknown>(optionsCallback: (env: ResolveEnv<C, Env>) => StrictCloudflareOptions<O>, AgentClass: C): C;
127
125
  export {};
128
126
  //# sourceMappingURL=durableobject.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"durableobject.d.ts","sourceRoot":"","sources":["../../src/durableobject.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,KAAK,EAAE,iB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,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,uBAAuB,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,CAoB5F"}
@@ -32,6 +32,8 @@ export declare function makeFlushLock(context: ExecutionContextCompat): FlushLoc
32
32
  /**
33
33
  * Flushes the client and then disposes of it to allow garbage collection.
34
34
  * This should be called at the end of each request to prevent memory leaks.
35
+ * Cached clients (`cacheClient`) are reused across invocations, so
36
+ * they are flushed but not disposed.
35
37
  *
36
38
  * This function never rejects. On Workers, a rejected promise passed to
37
39
  * `ctx.waitUntil` marks the whole invocation as `outcome: exception` even when
@@ -1 +1 @@
1
- {"version":3,"file":"flush.d.ts","sourceRoot":"","sources":["../../src/flush.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC,CAAC;AAcF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAKnG;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,SAAS,CA8BxE;AAoCD;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,SAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB/F"}
1
+ {"version":3,"file":"flush.d.ts","sourceRoot":"","sources":["../../src/flush.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC,CAAC;AAcF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAKnG;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,SAAS,CA8BxE;AAoCD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,SAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB/F"}
@@ -1,17 +1,16 @@
1
1
  export type { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, FeatureFlagsIntegration, Session, SeverityLevel, Span, StackFrame, Stacktrace, Thread, User, Metric, ExclusiveEventHintOrCaptureContext, CaptureContext, } from '@sentry/core';
2
2
  export type { CloudflareOptions } from './client';
3
- export { addEventProcessor, addBreadcrumb, addIntegration, captureException, captureEvent, captureMessage, captureFeedback, close, createTransport, lastEventId, flush, getClient, isInitialized, isEnabled, getCurrentScope, getGlobalScope, getIsolationScope, setCurrentClient, Scope, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setAttribute, setAttributes, setUser, setConversationId, getSpanStatusFromHttpCode, setHttpStatus, withScope, withIsolationScope, captureCheckIn, withMonitor, setMeasurement, getActiveSpan, getRootSpan, getTraceData, getTraceMetaTags, startSpan, startInactiveSpan, startSpanManual, startNewTrace, bindScopeToEmitter, suppressTracing, withActiveSpan, getSpanDescendants, continueTrace, functionToStringIntegration, eventFiltersIntegration, linkedErrorsIntegration, requestDataIntegration, extraErrorDataIntegration, dedupeIntegration, rewriteFramesIntegration, captureConsoleIntegration, moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient, instrumentPostgresJsSql, zodErrorsIntegration, consoleIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, trpcMiddleware, spanToJSON, spanToTraceHeader, spanToBaggageHeader, updateSpanName, wrapMcpServerWithSentry, consoleLoggingIntegration, createConsolaReporter, featureFlagsIntegration, growthbookIntegration, logger, metrics, withStaticSpan, withStreamedSpan, spanStreamingIntegration, } from '@sentry/core';
3
+ export { addEventProcessor, addBreadcrumb, addIntegration, captureException, captureEvent, captureMessage, captureFeedback, close, createTransport, lastEventId, flush, getClient, isInitialized, isEnabled, getCurrentScope, getGlobalScope, getIsolationScope, setCurrentClient, Scope, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setAttribute, setAttributes, setUser, setConversationId, getSpanStatusFromHttpCode, setHttpStatus, withScope, withIsolationScope, captureCheckIn, withMonitor, setMeasurement, getActiveSpan, getRootSpan, getTraceData, getTraceMetaTags, startSpan, startInactiveSpan, startSpanManual, startNewTrace, bindScopeToEmitter, suppressTracing, withActiveSpan, getSpanDescendants, continueTrace, functionToStringIntegration, eventFiltersIntegration, linkedErrorsIntegration, requestDataIntegration, extraErrorDataIntegration, dedupeIntegration, rewriteFramesIntegration, captureConsoleIntegration, moduleMetadataIntegration, supabaseIntegration, instrumentSupabaseClient, instrumentPostgresJsSql, zodErrorsIntegration, consoleIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SENTRY_SEGMENT_NAME_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, trpcMiddleware, spanToStaticSpanJSON, spanToJSON, spanToTraceHeader, spanToBaggageHeader, updateSpanName, wrapMcpServerWithSentry, consoleLoggingIntegration, createConsolaReporter, featureFlagsIntegration, growthbookIntegration, logger, metrics, withStaticSpan, withStreamedSpan, spanStreamingIntegration, } from '@sentry/core';
4
4
  export { withSentry } from './withSentry';
5
5
  export { defineCloudflareOptions } from './defineCloudflareOptions';
6
6
  export { instrumentAgentWithSentry, instrumentDurableObjectWithSentry } from './durableobject';
7
7
  export { sentryPagesPlugin } from './pages-plugin';
8
8
  export { CloudflareClient } from './client';
9
- export { getDefaultIntegrations } from './sdk';
9
+ export { _INTERNAL_wrapRequestHandler, getDefaultIntegrations } from './sdk';
10
10
  export { httpServerIntegration } from './integrations/httpServer';
11
11
  export { fetchIntegration } from './integrations/fetch';
12
12
  export { spotlightIntegration } from './integrations/spotlight';
13
- export { vercelAIIntegration } from './integrations/tracing/vercelai';
14
- export { otlpIntegration, getOtlpTracesEndpoint, prismaIntegration, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, instrumentWorkersAiClient, createLangChainCallbackHandler, instrumentLangChainEmbeddings, instrumentStateGraph, instrumentCreateReactAgent, } from '@sentry/server-utils';
13
+ export { otlpIntegration, getOtlpTracesEndpoint, prismaIntegration, instrumentOpenAiClient, instrumentAnthropicAiClient, instrumentGoogleGenAIClient, instrumentWorkersAiClient, createLangChainCallbackHandler, instrumentLangChainEmbeddings, instrumentStateGraph, instrumentCreateReactAgent, vercelAIIntegration, } from '@sentry/server-utils';
15
14
  export { instrumentWorkflowWithSentry } from './workflows';
16
15
  export { setAsyncLocalStorageAsyncContextStrategy } from '@sentry/server-utils/no-diagnostic-channels';
17
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YA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C;AAEtB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,iCAAiC,EAAE,MAAM,iBAAiB,CAAC;AAC/F,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAE7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,2BAA2B,EAC3B,yBAAyB,EACzB,8BAA8B,EAC9B,6BAA6B,EAC7B,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,wCAAwC,EAAE,MAAM,6CAA6C,CAAC"}
@@ -8,6 +8,7 @@ export declare const STUB_NON_RPC_METHODS: Set<string>;
8
8
  * - `namespace.idFromName(name)` / `namespace.idFromString(id)` / `namespace.newUniqueId()` with breadcrumbs
9
9
  *
10
10
  * @param namespace - The DurableObjectNamespace to instrument
11
+ * @param propagateRpcTrace - Whether RPC method calls on the returned stubs carry trace context
11
12
  */
12
- export declare function instrumentDurableObjectNamespace(namespace: DurableObjectNamespace): DurableObjectNamespace;
13
+ export declare function instrumentDurableObjectNamespace(namespace: DurableObjectNamespace, propagateRpcTrace?: boolean): DurableObjectNamespace;
13
14
  //# sourceMappingURL=instrumentDurableObjectNamespace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentDurableObjectNamespace.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentDurableObjectNamespace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAqB,MAAM,2BAA2B,CAAC;AAK3F,eAAO,MAAM,oBAAoB,aAAuC,CAAC;AAEzE;;;;;;;;GAQG;AACH,wBAAgB,gCAAgC,CAAC,SAAS,EAAE,sBAAsB,GAAG,sBAAsB,CAoB1G"}
1
+ {"version":3,"file":"instrumentDurableObjectNamespace.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentDurableObjectNamespace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAqB,MAAM,2BAA2B,CAAC;AAK3F,eAAO,MAAM,oBAAoB,aAAuC,CAAC;AAEzE;;;;;;;;;GASG;AACH,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,sBAAsB,EACjC,iBAAiB,UAAQ,GACxB,sBAAsB,CAoBxB"}
@@ -1,6 +1,5 @@
1
1
  import type { WorkerEntrypoint } from 'cloudflare:workers';
2
- import type { CloudflareOptions } from '../client';
3
- import type { DefaultEnv, ResolveEnv } from '../types';
2
+ import type { DefaultEnv, ResolveEnv, StrictCloudflareOptions } from '../types';
4
3
  export type WorkerEntrypointConstructor<Env = unknown, Props = {}> = new (ctx: ExecutionContext, env: any) => InstanceType<typeof WorkerEntrypoint<Env, Props>>;
5
4
  /**
6
5
  * Instruments a WorkerEntrypoint class to capture errors and performance data.
@@ -39,5 +38,5 @@ export type WorkerEntrypointConstructor<Env = unknown, Props = {}> = new (ctx: E
39
38
  * );
40
39
  * ```
41
40
  */
42
- export declare function instrumentWorkerEntrypoint<Env = DefaultEnv, Props = {}, T extends WorkerEntrypoint<any, any> = WorkerEntrypoint<Env, Props>, C extends new (ctx: ExecutionContext, env: any) => T = new (ctx: ExecutionContext, env: any) => T>(optionsCallback: (env: ResolveEnv<C, Env>) => CloudflareOptions | undefined, WorkerEntrypointClass: C): C;
41
+ export declare function instrumentWorkerEntrypoint<Env = DefaultEnv, Props = {}, T extends WorkerEntrypoint<any, any> = WorkerEntrypoint<Env, Props>, C extends new (ctx: ExecutionContext, env: any) => T = new (ctx: ExecutionContext, env: any) => T, O = unknown>(optionsCallback: (env: ResolveEnv<C, Env>) => StrictCloudflareOptions<O> | undefined, WorkerEntrypointClass: C): C;
43
42
  //# sourceMappingURL=instrumentWorkerEntrypoint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentWorkerEntrypoint.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentWorkerEntrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAqCvD,MAAM,MAAM,2BAA2B,CAAC,GAAG,GAAG,OAAO,EAAE,KAAK,GAAG,EAAE,IAAI,KACnE,GAAG,EAAE,gBAAgB,EAGrB,GAAG,EAAE,GAAG,KACL,YAAY,CAAC,OAAO,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAmEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,GAAG,UAAU,EAChB,KAAK,GAAG,EAAE,EAEV,CAAC,SAAS,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,EAEnE,CAAC,SAAS,KAAK,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,EACjG,eAAe,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,iBAAiB,GAAG,SAAS,EAAE,qBAAqB,EAAE,CAAC,GAAG,CAAC,CAkF1G"}
1
+ {"version":3,"file":"instrumentWorkerEntrypoint.d.ts","sourceRoot":"","sources":["../../../src/instrumentations/instrumentWorkerEntrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAIpE,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAoChF,MAAM,MAAM,2BAA2B,CAAC,GAAG,GAAG,OAAO,EAAE,KAAK,GAAG,EAAE,IAAI,KACnE,GAAG,EAAE,gBAAgB,EAGrB,GAAG,EAAE,GAAG,KACL,YAAY,CAAC,OAAO,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAyDvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,GAAG,UAAU,EAChB,KAAK,GAAG,EAAE,EAEV,CAAC,SAAS,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,EAEnE,CAAC,SAAS,KAAK,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,EACjG,CAAC,GAAG,OAAO,EACX,eAAe,EAAE,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,uBAAuB,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,qBAAqB,EAAE,CAAC,GAAG,CAAC,CAkFnH"}
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentD1.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentD1.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAsD,MAAM,2BAA2B,CAAC;AAoNhH,wBAAgB,YAAY,CAAC,EAAE,EAAE,UAAU,GAAG,UAAU,CAEvD"}
1
+ {"version":3,"file":"instrumentD1.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentD1.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAsD,MAAM,2BAA2B,CAAC;AAmOhH,wBAAgB,YAAY,CAAC,EAAE,EAAE,UAAU,GAAG,UAAU,CAEvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentEmail.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentEmail.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAU/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAkDtD;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,kBAAkB,EACzE,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN"}
1
+ {"version":3,"file":"instrumentEmail.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentEmail.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAI/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAqDtD;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,kBAAkB,EACzE,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN"}
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentEnv.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentEnv.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAwBtD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,GAAG,CAsF7G"}
1
+ {"version":3,"file":"instrumentEnv.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentEnv.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAyBtD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,GAAG,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,GAAG,CA2F7G"}
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentQueue.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentQueue.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAUjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAwDtD;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,kBAAkB,EACzE,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,CAAC,SAAS,gBAAgB,EACxE,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gBAAgB,GACxB,IAAI,CAaN"}
1
+ {"version":3,"file":"instrumentQueue.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentQueue.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAIjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AA2DtD;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,kBAAkB,EACzE,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,CAAC,SAAS,gBAAgB,EACxE,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gBAAgB,GACxB,IAAI,CAaN"}
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentR2.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentR2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAoC,MAAM,2BAA2B,CAAC;AAuG5F;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAuCxF"}
1
+ {"version":3,"file":"instrumentR2.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentR2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAoC,MAAM,2BAA2B,CAAC;AA4H5F;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAuCxF"}
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentRateLimit.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentRateLimit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAsC,MAAM,2BAA2B,CAAC;AAK/F;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAsB7F"}
1
+ {"version":3,"file":"instrumentRateLimit.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentRateLimit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAsC,MAAM,2BAA2B,CAAC;AAQ/F;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAwB7F"}
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentScheduled.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentScheduled.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAUjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAiDtD;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,CAAC,SAAS,kBAAkB,EAC7E,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,CAAC,SAAS,gBAAgB,EAC5E,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gBAAgB,GACxB,IAAI,CAaN"}
1
+ {"version":3,"file":"instrumentScheduled.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentScheduled.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAIjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAoDtD;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,CAAC,SAAS,kBAAkB,EAC7E,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,CAAC,SAAS,gBAAgB,EAC5E,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gBAAgB,GACxB,IAAI,CAaN"}
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentTail.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentTail.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAiCtD;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,kBAAkB,EACxE,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,gBAAgB,EACvE,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gBAAgB,GACxB,IAAI,CAWN"}
1
+ {"version":3,"file":"instrumentTail.d.ts","sourceRoot":"","sources":["../../../../src/instrumentations/worker/instrumentTail.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,GAAG,IAAI,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAoCtD;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,SAAS,kBAAkB,EACxE,OAAO,EAAE,CAAC,EACV,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,aAAa,KAAK,iBAAiB,GAAG,SAAS,GAC5E,IAAI,CAoBN;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,gBAAgB,EACvE,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,gBAAgB,GACxB,IAAI,CAWN"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/integrations/fetch.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,0BAA0B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACvD;AAiFD;;GAEG;AACH,eAAO,MAAM,gBAAgB;;CAAuC,CAAC"}
1
+ {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/integrations/fetch.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,0BAA0B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACvD;AAoED;;GAEG;AACH,eAAO,MAAM,gBAAgB;;CAAuC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tracer.d.ts","sourceRoot":"","sources":["../../../src/opentelemetry/tracer.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}
1
+ {"version":3,"file":"tracer.d.ts","sourceRoot":"","sources":["../../../src/opentelemetry/tracer.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}
@@ -1,4 +1,5 @@
1
1
  import type { CloudflareOptions } from './client';
2
+ import type { StrictCloudflareOptions } from './types';
2
3
  /**
3
4
  * Plugin middleware for Cloudflare Pages.
4
5
  *
@@ -30,5 +31,6 @@ import type { CloudflareOptions } from './client';
30
31
  * @param handlerOrOptions Configuration options or a function that returns configuration options.
31
32
  * @returns A plugin function that can be used in Cloudflare Pages.
32
33
  */
33
- export declare function sentryPagesPlugin<Env = any, Params extends string = any, Data extends Record<string, unknown> = Record<string, unknown>, PluginParams = any>(handlerOrOptions: CloudflareOptions | ((context: EventPluginContext<Env, Params, Data, PluginParams>) => CloudflareOptions)): PagesPluginFunction<Env, Params, Data, PluginParams>;
34
+ export declare function sentryPagesPlugin<Env = any, Params extends string = any, Data extends Record<string, unknown> = Record<string, unknown>, PluginParams = any, O = unknown>(handler: (context: EventPluginContext<Env, Params, Data, PluginParams>) => StrictCloudflareOptions<O>): PagesPluginFunction<Env, Params, Data, PluginParams>;
35
+ export declare function sentryPagesPlugin<Env = any, Params extends string = any, Data extends Record<string, unknown> = Record<string, unknown>, PluginParams = any>(options: CloudflareOptions): PagesPluginFunction<Env, Params, Data, PluginParams>;
34
36
  //# sourceMappingURL=pages-plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pages-plugin.d.ts","sourceRoot":"","sources":["../../src/pages-plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAKlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,iBAAiB,CAE/B,GAAG,GAAG,GAAG,EAET,MAAM,SAAS,MAAM,GAAG,GAAG,EAC3B,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAG9D,YAAY,GAAG,GAAG,EAElB,gBAAgB,EACZ,iBAAiB,GACjB,CAAC,CAAC,OAAO,EAAE,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,KAAK,iBAAiB,CAAC,GACxF,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,CAiBtD"}
1
+ {"version":3,"file":"pages-plugin.d.ts","sourceRoot":"","sources":["../../src/pages-plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIlD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAKH,wBAAgB,iBAAiB,CAE/B,GAAG,GAAG,GAAG,EAET,MAAM,SAAS,MAAM,GAAG,GAAG,EAC3B,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAE9D,YAAY,GAAG,GAAG,EAClB,CAAC,GAAG,OAAO,EAEX,OAAO,EAAE,CAAC,OAAO,EAAE,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,KAAK,uBAAuB,CAAC,CAAC,CAAC,GACpG,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;AACxD,wBAAgB,iBAAiB,CAE/B,GAAG,GAAG,GAAG,EAET,MAAM,SAAS,MAAM,GAAG,GAAG,EAC3B,IAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAE9D,YAAY,GAAG,GAAG,EAClB,OAAO,EAAE,iBAAiB,GAAG,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC"}
@@ -1,23 +1,5 @@
1
- import type { CfProperties, IncomingRequestCfProperties } from '@cloudflare/workers-types';
2
- import type { CloudflareClient, CloudflareOptions } from './client';
3
- import type { ExecutionContextCompat } from './executionContext';
4
- interface RequestHandlerWrapperOptions {
5
- options: CloudflareOptions;
6
- request: Request<unknown, IncomingRequestCfProperties<unknown> | CfProperties<unknown>>;
7
- context: ExecutionContextCompat | undefined;
8
- /**
9
- * If true, errors will be captured, rethrown and sent to Sentry.
10
- * Otherwise, errors are rethrown but not captured.
11
- *
12
- * You most likely don't want to set this to `false`, if you use `wrapRequestHandler` directly.
13
- * This is primarily meant as an escape hatch for higher-level SDKs relying on additional error
14
- * capturing mechanisms where this wrapper captures errors too early or too generally.
15
- *
16
- * @default true
17
- */
18
- captureErrors?: boolean;
19
- }
20
- type InitSdk = (options: CloudflareOptions) => CloudflareClient | undefined;
1
+ import type { CloudflareOptions } from './client';
2
+ import { type RequestHandlerWrapperOptions } from './wrapRequestHandlerWithInit';
21
3
  /**
22
4
  * Wraps a cloudflare request handler in Sentry instrumentation.
23
5
  *
@@ -26,15 +8,7 @@ type InitSdk = (options: CloudflareOptions) => CloudflareClient | undefined;
26
8
  * Oxygen). On a runtime that has `nodejs_compat`, pass `defaultIntegrations:
27
9
  * getDefaultIntegrations(options)` in `options` to get the full set instead.
28
10
  */
29
- export declare function wrapRequestHandler(wrapperOptions: RequestHandlerWrapperOptions, handler: (...args: unknown[]) => Response | Promise<Response>): Promise<Response>;
30
- /**
31
- * Same as {@link wrapRequestHandler}, but with the SDK initialization injected.
32
- *
33
- * Wrappers that are only reachable from the main entry point — where `nodejs_compat` is a
34
- * requirement anyway — pass `init` from `sdk.ts` to get the full default integrations.
35
- *
36
- * @internal
37
- */
38
- export declare function wrapRequestHandlerWithInit(wrapperOptions: RequestHandlerWrapperOptions, handler: (...args: unknown[]) => Response | Promise<Response>, initSdk: InitSdk): Promise<Response>;
39
- export {};
11
+ export declare function wrapRequestHandler(wrapperOptions: Omit<RequestHandlerWrapperOptions, 'options'> & {
12
+ options: Omit<CloudflareOptions, 'enableOpenTelemetrySetup'>;
13
+ }, handler: (...args: unknown[]) => Response | Promise<Response>): Promise<Response>;
40
14
  //# sourceMappingURL=request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAc3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAWjE,UAAU,4BAA4B;IACpC,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,kBAAkB,CAChC,cAAc,EAAE,4BAA4B,EAC5C,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAC5D,OAAO,CAAC,QAAQ,CAAC,CAEnB;AAED;;;;;;;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,CA4JnB"}
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,KAAK,4BAA4B,EAA8B,MAAM,8BAA8B,CAAC;AAE7G;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,cAAc,EAAE,IAAI,CAAC,4BAA4B,EAAE,SAAS,CAAC,GAAG;IAG9D,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,0BAA0B,CAAC,CAAC;CAC9D,EACD,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAC5D,OAAO,CAAC,QAAQ,CAAC,CAEnB"}
@@ -1,15 +1,24 @@
1
1
  import type { Integration } from '@sentry/core';
2
2
  import type { CloudflareClient, CloudflareOptions } from './client';
3
+ import { type RequestHandlerWrapperOptions } from './wrapRequestHandlerWithInit';
4
+ export { _clearGlobalClientCache } from './clientCache';
3
5
  /**
4
6
  * Get the default integrations for the Cloudflare SDK.
5
- *
6
- * This is the full set and requires the `nodejs_compat` compatibility flag. Runtimes that cannot
7
- * enable it (e.g. Shopify Oxygen) go through `wrapRequestHandler`, which only sets up
8
- * `getBaseDefaultIntegrations`.
9
7
  */
10
8
  export declare function getDefaultIntegrations(options: CloudflareOptions): Integration[];
11
9
  /**
12
10
  * Initializes the cloudflare SDK.
13
11
  */
14
12
  export declare function init(options: CloudflareOptions): CloudflareClient | undefined;
13
+ /**
14
+ * `wrapRequestHandler` backed by `init`, so the request gets the full default integrations and
15
+ * honors `enableOpenTelemetrySetup`. The `@sentry/cloudflare/request` variant deliberately skips
16
+ * both to stay usable without `nodejs_compat`.
17
+ *
18
+ * For framework SDKs building on the main entry point, e.g. SvelteKit, whose OpenTelemetry spans
19
+ * need the tracer provider.
20
+ *
21
+ * @internal
22
+ */
23
+ export declare function _INTERNAL_wrapRequestHandler(wrapperOptions: RequestHandlerWrapperOptions, handler: (...args: unknown[]) => Response | Promise<Response>): Promise<Response>;
15
24
  //# sourceMappingURL=sdk.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEpE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,WAAW,EAAE,CAMhF;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,SAAS,CAE7E"}
1
+ {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEpE,OAAO,EAAE,KAAK,4BAA4B,EAA8B,MAAM,8BAA8B,CAAC;AAG7G,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAExD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,WAAW,EAAE,CAEhF;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,GAAG,SAAS,CAY7E;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,cAAc,EAAE,4BAA4B,EAC5C,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GAC5D,OAAO,CAAC,QAAQ,CAAC,CAEnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,4BAA4B,EAAoB,MAAM,cAAc,CAAC;AAGpH,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB;IACtE,iFAAiF;IACjF,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,iCAAiC;IACjC,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B;AAID;;;;;;;GAOG;AACH,qBAAa,qBAAqB;IAGzB,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC,CAAC;IAE3D,OAAO,CAAC,cAAc,CAAsD;IAE5E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IAErC,YAAmB,WAAW,SAAgC,EAI7D;IAED;;OAEG;IACI,GAAG,CAAC,YAAY,EAAE,MAAM,WAAW,CAAC,4BAA4B,CAAC,GAAG,WAAW,CAAC,4BAA4B,CAAC,CAOnH;IAED;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAyBnD;CACF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,0BAA0B,GAAG,SAAS,CAkCtF"}
1
+ {"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,4BAA4B,EAAoB,MAAM,cAAc,CAAC;AAGpH,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB;IACtE,iFAAiF;IACjF,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,iCAAiC;IACjC,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B;AAUD;;;;;;;GAOG;AACH,qBAAa,qBAAqB;IAGzB,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC,CAAC;IAE3D,OAAO,CAAC,cAAc,CAAsD;IAE5E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IAErC,YAAmB,WAAW,SAAgC,EAI7D;IAED;;OAEG;IACI,GAAG,CAAC,YAAY,EAAE,MAAM,WAAW,CAAC,4BAA4B,CAAC,GAAG,WAAW,CAAC,4BAA4B,CAAC,CAOnH;IAED;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAyBnD;CACF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,0BAA0B,GAAG,SAAS,CAkCtF"}
@@ -1,5 +1,33 @@
1
1
  import type { env as cloudflareEnv } from 'cloudflare:workers';
2
+ import type { CloudflareOptions } from './client';
2
3
  type IsAny<T> = 0 extends 1 & T ? true : false;
4
+ /**
5
+ * `CloudflareOptions` for the options *callbacks*, where the excess property check does not reach.
6
+ *
7
+ * A plain `CloudflareOptions` parameter already rejects unknown keys when the caller writes a
8
+ * direct object literal, which is why it is enough everywhere else. That check only applies to
9
+ * literals TypeScript still sees as "fresh", though, and freshness is lost across a function
10
+ * boundary — the literal returned from `withSentry(() => ({ dsn, tracesSampleRte: 1 }), handler)`
11
+ * is compared as part of a function type, so the typo passes. Since `env` only exists at request
12
+ * time, a callback is the only way to configure these APIs, so the check has to be rebuilt:
13
+ * inferring the literal into `O` and intersecting it with a `never` map over its extra keys puts
14
+ * the error back on the offending property.
15
+ *
16
+ * `O` is deliberately unconstrained: a `CloudflareOptions` constraint makes inference fail for an
17
+ * options object whose keys are *all* unknown, and TypeScript then silently falls back to the type
18
+ * parameter default instead of reporting anything. The `CloudflareOptions` member of the
19
+ * intersection carries the actual check on known keys.
20
+ *
21
+ * The function-rejecting branch keeps "returned the options factory instead of calling it" an
22
+ * error. A plain `CloudflareOptions` target rejects functions via the weak type check (no shared
23
+ * properties), but an intersection is only weak-type checked when every member is weak, and the
24
+ * `Record` member has no properties at all — so without the guard a function would slip through.
25
+ * `keyof` of a function type is `never`, so the never-map alone cannot catch it.
26
+ *
27
+ * Two known gaps: this only covers top level keys, and unlike a plain excess property check it
28
+ * also rejects a pre-built object carrying extra keys.
29
+ */
30
+ export type StrictCloudflareOptions<O> = O extends (...args: never[]) => unknown ? never : O & CloudflareOptions & Record<Exclude<keyof O, keyof CloudflareOptions>, never>;
3
31
  /**
4
32
  * A handler method of an `ExportedHandler` (`fetch`, `scheduled`, `queue`, ...).
5
33
  */