@sentry/core 10.50.0 → 10.52.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 (347) hide show
  1. package/build/cjs/client.js +33 -5
  2. package/build/cjs/client.js.map +1 -1
  3. package/build/cjs/envelope.js +4 -1
  4. package/build/cjs/envelope.js.map +1 -1
  5. package/build/cjs/fetch.js +7 -4
  6. package/build/cjs/fetch.js.map +1 -1
  7. package/build/cjs/index.js +37 -13
  8. package/build/cjs/index.js.map +1 -1
  9. package/build/cjs/instrument/console.js +3 -1
  10. package/build/cjs/instrument/console.js.map +1 -1
  11. package/build/cjs/instrument/fetch.js +6 -2
  12. package/build/cjs/instrument/fetch.js.map +1 -1
  13. package/build/cjs/instrument/handlers.js +11 -1
  14. package/build/cjs/instrument/handlers.js.map +1 -1
  15. package/build/cjs/integrations/console.js +3 -1
  16. package/build/cjs/integrations/console.js.map +1 -1
  17. package/build/cjs/integrations/express/index.js +2 -4
  18. package/build/cjs/integrations/express/index.js.map +1 -1
  19. package/build/cjs/integrations/express/utils.js +0 -7
  20. package/build/cjs/integrations/express/utils.js.map +1 -1
  21. package/build/cjs/integrations/extraerrordata.js +2 -2
  22. package/build/cjs/integrations/extraerrordata.js.map +1 -1
  23. package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js +43 -0
  24. package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -0
  25. package/build/cjs/integrations/http/client-patch.js +113 -0
  26. package/build/cjs/integrations/http/client-patch.js.map +1 -0
  27. package/build/cjs/integrations/http/client-subscriptions.js +166 -0
  28. package/build/cjs/integrations/http/client-subscriptions.js.map +1 -0
  29. package/build/cjs/integrations/http/constants.js +10 -0
  30. package/build/cjs/integrations/http/constants.js.map +1 -0
  31. package/build/cjs/integrations/http/double-wrap-warning.js +29 -0
  32. package/build/cjs/integrations/http/double-wrap-warning.js.map +1 -0
  33. package/build/cjs/integrations/http/get-outgoing-span-data.js +88 -0
  34. package/build/cjs/integrations/http/get-outgoing-span-data.js.map +1 -0
  35. package/build/cjs/integrations/http/get-request-url.js +54 -0
  36. package/build/cjs/integrations/http/get-request-url.js.map +1 -0
  37. package/build/cjs/integrations/http/inject-trace-propagation-headers.js +81 -0
  38. package/build/cjs/integrations/http/inject-trace-propagation-headers.js.map +1 -0
  39. package/build/cjs/integrations/postgresjs.js +10 -1
  40. package/build/cjs/integrations/postgresjs.js.map +1 -1
  41. package/build/cjs/integrations/requestdata.js +92 -6
  42. package/build/cjs/integrations/requestdata.js.map +1 -1
  43. package/build/cjs/integrations/supabase.js +39 -12
  44. package/build/cjs/integrations/supabase.js.map +1 -1
  45. package/build/cjs/logs/console-integration.js +3 -1
  46. package/build/cjs/logs/console-integration.js.map +1 -1
  47. package/build/cjs/logs/envelope.js +12 -2
  48. package/build/cjs/logs/envelope.js.map +1 -1
  49. package/build/cjs/logs/internal.js +7 -1
  50. package/build/cjs/logs/internal.js.map +1 -1
  51. package/build/cjs/metrics/envelope.js +15 -2
  52. package/build/cjs/metrics/envelope.js.map +1 -1
  53. package/build/cjs/metrics/internal.js +7 -1
  54. package/build/cjs/metrics/internal.js.map +1 -1
  55. package/build/cjs/server-runtime-client.js +20 -2
  56. package/build/cjs/server-runtime-client.js.map +1 -1
  57. package/build/cjs/tracing/ai/gen-ai-attributes.js +6 -0
  58. package/build/cjs/tracing/ai/gen-ai-attributes.js.map +1 -1
  59. package/build/cjs/tracing/idleSpan.js +7 -1
  60. package/build/cjs/tracing/idleSpan.js.map +1 -1
  61. package/build/cjs/tracing/langchain/index.js +43 -8
  62. package/build/cjs/tracing/langchain/index.js.map +1 -1
  63. package/build/cjs/tracing/langchain/utils.js +44 -10
  64. package/build/cjs/tracing/langchain/utils.js.map +1 -1
  65. package/build/cjs/tracing/langgraph/index.js +105 -2
  66. package/build/cjs/tracing/langgraph/index.js.map +1 -1
  67. package/build/cjs/tracing/langgraph/utils.js +168 -0
  68. package/build/cjs/tracing/langgraph/utils.js.map +1 -1
  69. package/build/cjs/tracing/spans/captureSpan.js +169 -9
  70. package/build/cjs/tracing/spans/captureSpan.js.map +1 -1
  71. package/build/cjs/tracing/spans/envelope.js +13 -3
  72. package/build/cjs/tracing/spans/envelope.js.map +1 -1
  73. package/build/cjs/tracing/trace.js +2 -0
  74. package/build/cjs/tracing/trace.js.map +1 -1
  75. package/build/cjs/tracing/vercel-ai/constants.js +8 -0
  76. package/build/cjs/tracing/vercel-ai/constants.js.map +1 -1
  77. package/build/cjs/tracing/vercel-ai/index.js +93 -14
  78. package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
  79. package/build/cjs/trpc.js +2 -3
  80. package/build/cjs/trpc.js.map +1 -1
  81. package/build/cjs/utils/baggage.js +73 -0
  82. package/build/cjs/utils/baggage.js.map +1 -1
  83. package/build/cjs/utils/chain-and-copy-promiselike.js +1 -0
  84. package/build/cjs/utils/chain-and-copy-promiselike.js.map +1 -1
  85. package/build/cjs/utils/get-default-export.js +32 -0
  86. package/build/cjs/utils/get-default-export.js.map +1 -0
  87. package/build/cjs/utils/isSentryRequestUrl.js +9 -1
  88. package/build/cjs/utils/isSentryRequestUrl.js.map +1 -1
  89. package/build/cjs/utils/normalizationHints.js +38 -0
  90. package/build/cjs/utils/normalizationHints.js.map +1 -0
  91. package/build/cjs/utils/normalize.js +7 -11
  92. package/build/cjs/utils/normalize.js.map +1 -1
  93. package/build/cjs/utils/object.js +1 -1
  94. package/build/cjs/utils/object.js.map +1 -1
  95. package/build/cjs/utils/request.js +192 -12
  96. package/build/cjs/utils/request.js.map +1 -1
  97. package/build/cjs/utils/should-ignore-span.js +27 -8
  98. package/build/cjs/utils/should-ignore-span.js.map +1 -1
  99. package/build/cjs/utils/spanUtils.js +1 -1
  100. package/build/cjs/utils/spanUtils.js.map +1 -1
  101. package/build/cjs/utils/version.js +1 -1
  102. package/build/esm/client.js +33 -5
  103. package/build/esm/client.js.map +1 -1
  104. package/build/esm/envelope.js +4 -1
  105. package/build/esm/envelope.js.map +1 -1
  106. package/build/esm/fetch.js +7 -4
  107. package/build/esm/fetch.js.map +1 -1
  108. package/build/esm/index.js +11 -5
  109. package/build/esm/index.js.map +1 -1
  110. package/build/esm/instrument/console.js +3 -1
  111. package/build/esm/instrument/console.js.map +1 -1
  112. package/build/esm/instrument/fetch.js +6 -2
  113. package/build/esm/instrument/fetch.js.map +1 -1
  114. package/build/esm/instrument/handlers.js +11 -1
  115. package/build/esm/instrument/handlers.js.map +1 -1
  116. package/build/esm/integrations/console.js +3 -1
  117. package/build/esm/integrations/console.js.map +1 -1
  118. package/build/esm/integrations/express/index.js +3 -5
  119. package/build/esm/integrations/express/index.js.map +1 -1
  120. package/build/esm/integrations/express/utils.js +1 -7
  121. package/build/esm/integrations/express/utils.js.map +1 -1
  122. package/build/esm/integrations/extraerrordata.js +2 -2
  123. package/build/esm/integrations/extraerrordata.js.map +1 -1
  124. package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js +41 -0
  125. package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -0
  126. package/build/esm/integrations/http/client-patch.js +111 -0
  127. package/build/esm/integrations/http/client-patch.js.map +1 -0
  128. package/build/esm/integrations/http/client-subscriptions.js +164 -0
  129. package/build/esm/integrations/http/client-subscriptions.js.map +1 -0
  130. package/build/esm/integrations/http/constants.js +6 -0
  131. package/build/esm/integrations/http/constants.js.map +1 -0
  132. package/build/esm/integrations/http/double-wrap-warning.js +26 -0
  133. package/build/esm/integrations/http/double-wrap-warning.js.map +1 -0
  134. package/build/esm/integrations/http/get-outgoing-span-data.js +85 -0
  135. package/build/esm/integrations/http/get-outgoing-span-data.js.map +1 -0
  136. package/build/esm/integrations/http/get-request-url.js +49 -0
  137. package/build/esm/integrations/http/get-request-url.js.map +1 -0
  138. package/build/esm/integrations/http/inject-trace-propagation-headers.js +79 -0
  139. package/build/esm/integrations/http/inject-trace-propagation-headers.js.map +1 -0
  140. package/build/esm/integrations/postgresjs.js +10 -1
  141. package/build/esm/integrations/postgresjs.js.map +1 -1
  142. package/build/esm/integrations/requestdata.js +92 -6
  143. package/build/esm/integrations/requestdata.js.map +1 -1
  144. package/build/esm/integrations/supabase.js +39 -12
  145. package/build/esm/integrations/supabase.js.map +1 -1
  146. package/build/esm/logs/console-integration.js +3 -1
  147. package/build/esm/logs/console-integration.js.map +1 -1
  148. package/build/esm/logs/envelope.js +12 -2
  149. package/build/esm/logs/envelope.js.map +1 -1
  150. package/build/esm/logs/internal.js +7 -1
  151. package/build/esm/logs/internal.js.map +1 -1
  152. package/build/esm/metrics/envelope.js +15 -2
  153. package/build/esm/metrics/envelope.js.map +1 -1
  154. package/build/esm/metrics/internal.js +7 -1
  155. package/build/esm/metrics/internal.js.map +1 -1
  156. package/build/esm/package.json +1 -1
  157. package/build/esm/server-runtime-client.js +20 -2
  158. package/build/esm/server-runtime-client.js.map +1 -1
  159. package/build/esm/tracing/ai/gen-ai-attributes.js +6 -1
  160. package/build/esm/tracing/ai/gen-ai-attributes.js.map +1 -1
  161. package/build/esm/tracing/idleSpan.js +7 -1
  162. package/build/esm/tracing/idleSpan.js.map +1 -1
  163. package/build/esm/tracing/langchain/index.js +45 -10
  164. package/build/esm/tracing/langchain/index.js.map +1 -1
  165. package/build/esm/tracing/langchain/utils.js +44 -12
  166. package/build/esm/tracing/langchain/utils.js.map +1 -1
  167. package/build/esm/tracing/langgraph/index.js +107 -5
  168. package/build/esm/tracing/langgraph/index.js.map +1 -1
  169. package/build/esm/tracing/langgraph/utils.js +166 -2
  170. package/build/esm/tracing/langgraph/utils.js.map +1 -1
  171. package/build/esm/tracing/spans/captureSpan.js +170 -11
  172. package/build/esm/tracing/spans/captureSpan.js.map +1 -1
  173. package/build/esm/tracing/spans/envelope.js +13 -3
  174. package/build/esm/tracing/spans/envelope.js.map +1 -1
  175. package/build/esm/tracing/trace.js +2 -1
  176. package/build/esm/tracing/trace.js.map +1 -1
  177. package/build/esm/tracing/vercel-ai/constants.js +8 -1
  178. package/build/esm/tracing/vercel-ai/constants.js.map +1 -1
  179. package/build/esm/tracing/vercel-ai/index.js +95 -17
  180. package/build/esm/tracing/vercel-ai/index.js.map +1 -1
  181. package/build/esm/trpc.js +2 -3
  182. package/build/esm/trpc.js.map +1 -1
  183. package/build/esm/utils/baggage.js +73 -1
  184. package/build/esm/utils/baggage.js.map +1 -1
  185. package/build/esm/utils/chain-and-copy-promiselike.js +1 -0
  186. package/build/esm/utils/chain-and-copy-promiselike.js.map +1 -1
  187. package/build/esm/utils/get-default-export.js +30 -0
  188. package/build/esm/utils/get-default-export.js.map +1 -0
  189. package/build/esm/utils/isSentryRequestUrl.js +9 -1
  190. package/build/esm/utils/isSentryRequestUrl.js.map +1 -1
  191. package/build/esm/utils/normalizationHints.js +33 -0
  192. package/build/esm/utils/normalizationHints.js.map +1 -0
  193. package/build/esm/utils/normalize.js +7 -11
  194. package/build/esm/utils/normalize.js.map +1 -1
  195. package/build/esm/utils/object.js +1 -1
  196. package/build/esm/utils/object.js.map +1 -1
  197. package/build/esm/utils/request.js +190 -13
  198. package/build/esm/utils/request.js.map +1 -1
  199. package/build/esm/utils/should-ignore-span.js +27 -8
  200. package/build/esm/utils/should-ignore-span.js.map +1 -1
  201. package/build/esm/utils/spanUtils.js +1 -1
  202. package/build/esm/utils/spanUtils.js.map +1 -1
  203. package/build/esm/utils/version.js +1 -1
  204. package/build/types/client.d.ts +12 -1
  205. package/build/types/client.d.ts.map +1 -1
  206. package/build/types/envelope.d.ts.map +1 -1
  207. package/build/types/fetch.d.ts.map +1 -1
  208. package/build/types/index.d.ts +17 -6
  209. package/build/types/index.d.ts.map +1 -1
  210. package/build/types/instrument/console.d.ts +2 -1
  211. package/build/types/instrument/console.d.ts.map +1 -1
  212. package/build/types/instrument/fetch.d.ts +4 -2
  213. package/build/types/instrument/fetch.d.ts.map +1 -1
  214. package/build/types/instrument/handlers.d.ts +2 -2
  215. package/build/types/instrument/handlers.d.ts.map +1 -1
  216. package/build/types/integrations/console.d.ts.map +1 -1
  217. package/build/types/integrations/express/index.d.ts.map +1 -1
  218. package/build/types/integrations/express/utils.d.ts +1 -5
  219. package/build/types/integrations/express/utils.d.ts.map +1 -1
  220. package/build/types/integrations/http/add-outgoing-request-breadcrumb.d.ts +6 -0
  221. package/build/types/integrations/http/add-outgoing-request-breadcrumb.d.ts.map +1 -0
  222. package/build/types/integrations/http/client-patch.d.ts +46 -0
  223. package/build/types/integrations/http/client-patch.d.ts.map +1 -0
  224. package/build/types/integrations/http/client-subscriptions.d.ts +21 -0
  225. package/build/types/integrations/http/client-subscriptions.d.ts.map +1 -0
  226. package/build/types/integrations/http/constants.d.ts +6 -0
  227. package/build/types/integrations/http/constants.d.ts.map +1 -0
  228. package/build/types/integrations/http/double-wrap-warning.d.ts +4 -0
  229. package/build/types/integrations/http/double-wrap-warning.d.ts.map +1 -0
  230. package/build/types/integrations/http/get-outgoing-span-data.d.ts +13 -0
  231. package/build/types/integrations/http/get-outgoing-span-data.d.ts.map +1 -0
  232. package/build/types/integrations/http/get-request-url.d.ts +10 -0
  233. package/build/types/integrations/http/get-request-url.d.ts.map +1 -0
  234. package/build/types/integrations/http/index.d.ts +4 -0
  235. package/build/types/integrations/http/index.d.ts.map +1 -0
  236. package/build/types/integrations/http/inject-trace-propagation-headers.d.ts +12 -0
  237. package/build/types/integrations/http/inject-trace-propagation-headers.d.ts.map +1 -0
  238. package/build/types/integrations/http/types.d.ts +249 -0
  239. package/build/types/integrations/http/types.d.ts.map +1 -0
  240. package/build/types/integrations/postgresjs.d.ts.map +1 -1
  241. package/build/types/integrations/requestdata.d.ts.map +1 -1
  242. package/build/types/integrations/supabase.d.ts.map +1 -1
  243. package/build/types/logs/console-integration.d.ts.map +1 -1
  244. package/build/types/logs/envelope.d.ts +5 -2
  245. package/build/types/logs/envelope.d.ts.map +1 -1
  246. package/build/types/logs/internal.d.ts.map +1 -1
  247. package/build/types/metrics/envelope.d.ts +5 -2
  248. package/build/types/metrics/envelope.d.ts.map +1 -1
  249. package/build/types/metrics/internal.d.ts.map +1 -1
  250. package/build/types/server-runtime-client.d.ts +5 -0
  251. package/build/types/server-runtime-client.d.ts.map +1 -1
  252. package/build/types/tracing/idleSpan.d.ts.map +1 -1
  253. package/build/types/tracing/index.d.ts +1 -1
  254. package/build/types/tracing/index.d.ts.map +1 -1
  255. package/build/types/tracing/langchain/index.d.ts.map +1 -1
  256. package/build/types/tracing/langchain/types.d.ts +8 -0
  257. package/build/types/tracing/langchain/types.d.ts.map +1 -1
  258. package/build/types/tracing/langchain/utils.d.ts +2 -0
  259. package/build/types/tracing/langchain/utils.d.ts.map +1 -1
  260. package/build/types/tracing/langgraph/index.d.ts +4 -0
  261. package/build/types/tracing/langgraph/index.d.ts.map +1 -1
  262. package/build/types/tracing/langgraph/utils.d.ts +18 -2
  263. package/build/types/tracing/langgraph/utils.d.ts.map +1 -1
  264. package/build/types/tracing/spans/captureSpan.d.ts +13 -3
  265. package/build/types/tracing/spans/captureSpan.d.ts.map +1 -1
  266. package/build/types/tracing/spans/envelope.d.ts.map +1 -1
  267. package/build/types/tracing/trace.d.ts +1 -0
  268. package/build/types/tracing/trace.d.ts.map +1 -1
  269. package/build/types/tracing/vercel-ai/constants.d.ts +1 -0
  270. package/build/types/tracing/vercel-ai/constants.d.ts.map +1 -1
  271. package/build/types/tracing/vercel-ai/index.d.ts +9 -0
  272. package/build/types/tracing/vercel-ai/index.d.ts.map +1 -1
  273. package/build/types/trpc.d.ts.map +1 -1
  274. package/build/types/types-hoist/feedback/config.d.ts +20 -0
  275. package/build/types/types-hoist/feedback/config.d.ts.map +1 -1
  276. package/build/types/types-hoist/feedback/index.d.ts +2 -2
  277. package/build/types/types-hoist/feedback/index.d.ts.map +1 -1
  278. package/build/types/types-hoist/feedback/sendFeedback.d.ts +3 -0
  279. package/build/types/types-hoist/feedback/sendFeedback.d.ts.map +1 -1
  280. package/build/types/types-hoist/log.d.ts +5 -0
  281. package/build/types/types-hoist/log.d.ts.map +1 -1
  282. package/build/types/types-hoist/metric.d.ts +5 -0
  283. package/build/types/types-hoist/metric.d.ts.map +1 -1
  284. package/build/types/types-hoist/options.d.ts +37 -2
  285. package/build/types/types-hoist/options.d.ts.map +1 -1
  286. package/build/types/types-hoist/span.d.ts +5 -0
  287. package/build/types/types-hoist/span.d.ts.map +1 -1
  288. package/build/types/types-hoist/webfetchapi.d.ts +2 -0
  289. package/build/types/types-hoist/webfetchapi.d.ts.map +1 -1
  290. package/build/types/utils/baggage.d.ts +13 -0
  291. package/build/types/utils/baggage.d.ts.map +1 -1
  292. package/build/types/utils/get-default-export.d.ts +22 -0
  293. package/build/types/utils/get-default-export.d.ts.map +1 -0
  294. package/build/types/utils/normalizationHints.d.ts +9 -0
  295. package/build/types/utils/normalizationHints.d.ts.map +1 -0
  296. package/build/types/utils/normalize.d.ts.map +1 -1
  297. package/build/types/utils/object.d.ts +1 -1
  298. package/build/types/utils/object.d.ts.map +1 -1
  299. package/build/types/utils/request.d.ts +30 -0
  300. package/build/types/utils/request.d.ts.map +1 -1
  301. package/build/types/utils/should-ignore-span.d.ts +3 -1
  302. package/build/types/utils/should-ignore-span.d.ts.map +1 -1
  303. package/build/types/utils/spanUtils.d.ts +1 -1
  304. package/build/types-ts3.8/client.d.ts +12 -1
  305. package/build/types-ts3.8/index.d.ts +17 -6
  306. package/build/types-ts3.8/instrument/console.d.ts +2 -1
  307. package/build/types-ts3.8/instrument/fetch.d.ts +4 -2
  308. package/build/types-ts3.8/instrument/handlers.d.ts +2 -2
  309. package/build/types-ts3.8/integrations/express/utils.d.ts +1 -5
  310. package/build/types-ts3.8/integrations/http/add-outgoing-request-breadcrumb.d.ts +6 -0
  311. package/build/types-ts3.8/integrations/http/client-patch.d.ts +46 -0
  312. package/build/types-ts3.8/integrations/http/client-subscriptions.d.ts +21 -0
  313. package/build/types-ts3.8/integrations/http/constants.d.ts +6 -0
  314. package/build/types-ts3.8/integrations/http/double-wrap-warning.d.ts +4 -0
  315. package/build/types-ts3.8/integrations/http/get-outgoing-span-data.d.ts +13 -0
  316. package/build/types-ts3.8/integrations/http/get-request-url.d.ts +10 -0
  317. package/build/types-ts3.8/integrations/http/index.d.ts +4 -0
  318. package/build/types-ts3.8/integrations/http/inject-trace-propagation-headers.d.ts +12 -0
  319. package/build/types-ts3.8/integrations/http/types.d.ts +252 -0
  320. package/build/types-ts3.8/logs/envelope.d.ts +5 -2
  321. package/build/types-ts3.8/metrics/envelope.d.ts +5 -2
  322. package/build/types-ts3.8/server-runtime-client.d.ts +5 -0
  323. package/build/types-ts3.8/tracing/index.d.ts +1 -1
  324. package/build/types-ts3.8/tracing/langchain/types.d.ts +8 -0
  325. package/build/types-ts3.8/tracing/langchain/utils.d.ts +2 -0
  326. package/build/types-ts3.8/tracing/langgraph/index.d.ts +4 -0
  327. package/build/types-ts3.8/tracing/langgraph/utils.d.ts +18 -2
  328. package/build/types-ts3.8/tracing/spans/captureSpan.d.ts +13 -3
  329. package/build/types-ts3.8/tracing/trace.d.ts +1 -0
  330. package/build/types-ts3.8/tracing/vercel-ai/constants.d.ts +1 -0
  331. package/build/types-ts3.8/tracing/vercel-ai/index.d.ts +9 -0
  332. package/build/types-ts3.8/types-hoist/feedback/config.d.ts +20 -0
  333. package/build/types-ts3.8/types-hoist/feedback/index.d.ts +2 -2
  334. package/build/types-ts3.8/types-hoist/feedback/sendFeedback.d.ts +3 -0
  335. package/build/types-ts3.8/types-hoist/log.d.ts +5 -0
  336. package/build/types-ts3.8/types-hoist/metric.d.ts +5 -0
  337. package/build/types-ts3.8/types-hoist/options.d.ts +37 -2
  338. package/build/types-ts3.8/types-hoist/span.d.ts +5 -0
  339. package/build/types-ts3.8/types-hoist/webfetchapi.d.ts +2 -0
  340. package/build/types-ts3.8/utils/baggage.d.ts +13 -0
  341. package/build/types-ts3.8/utils/get-default-export.d.ts +22 -0
  342. package/build/types-ts3.8/utils/normalizationHints.d.ts +9 -0
  343. package/build/types-ts3.8/utils/object.d.ts +1 -1
  344. package/build/types-ts3.8/utils/request.d.ts +30 -0
  345. package/build/types-ts3.8/utils/should-ignore-span.d.ts +3 -1
  346. package/build/types-ts3.8/utils/spanUtils.d.ts +1 -1
  347. package/package.json +1 -1
@@ -10,6 +10,8 @@ export interface WebFetchRequest {
10
10
  readonly headers: WebFetchHeaders;
11
11
  readonly method: string;
12
12
  readonly url: string;
13
+ readonly body?: unknown;
13
14
  clone(): WebFetchRequest;
15
+ text(): Promise<string>;
14
16
  }
15
17
  //# sourceMappingURL=webfetchapi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webfetchapi.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/webfetchapi.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACjC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,KAAK,IAAI,GAAG,IAAI,CAAC;CAC1F;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,KAAK,IAAI,eAAe,CAAC;CAC1B"}
1
+ {"version":3,"file":"webfetchapi.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/webfetchapi.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACjC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,KAAK,IAAI,GAAG,IAAI,CAAC;CAC1F;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,IAAI,eAAe,CAAC;IACzB,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACzB"}
@@ -37,4 +37,17 @@ export declare function parseBaggageHeader(baggageHeader: string | string[] | nu
37
37
  * is not spec compliant.
38
38
  */
39
39
  export declare function objectToBaggageHeader(object: Record<string, string>): string | undefined;
40
+ /**
41
+ * Merge two baggage headers into one.
42
+ * - Sentry-specific entries (keys starting with "sentry-") from the new
43
+ * baggage take precedence
44
+ * - Non-Sentry entries from existing baggage take precedence
45
+ *
46
+ * The order of the existing baggage will be preserved, and new entries will
47
+ * be added to the end.
48
+ *
49
+ * This matches the behavior of OTEL's propagation.inject() which uses
50
+ * `baggage.setEntry()` to overwrite existing entries with the same key.
51
+ */
52
+ export declare function mergeBaggageHeaders<Existing extends string | string[] | number | undefined>(existing: Existing, incoming: string): string | undefined | Existing;
40
53
  //# sourceMappingURL=baggage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"baggage.d.ts","sourceRoot":"","sources":["../../../src/utils/baggage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAItE,eAAO,MAAM,yBAAyB,YAAY,CAAC;AAEnD,eAAO,MAAM,+BAA+B,QAAa,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,qCAAqC,CAEnD,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,GACrE,OAAO,CAAC,sBAAsB,CAAC,GAAG,SAAS,CAuB7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,2CAA2C,CAEzD,sBAAsB,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GACvD,MAAM,GAAG,SAAS,CAiBpB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,GACrE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAiBpC;AAqCD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS,CAmBxF"}
1
+ {"version":3,"file":"baggage.d.ts","sourceRoot":"","sources":["../../../src/utils/baggage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAItE,eAAO,MAAM,yBAAyB,YAAY,CAAC;AAEnD,eAAO,MAAM,+BAA+B,QAAa,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,qCAAqC,CAEnD,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,GACrE,OAAO,CAAC,sBAAsB,CAAC,GAAG,SAAS,CAuB7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,2CAA2C,CAEzD,sBAAsB,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GACvD,MAAM,GAAG,SAAS,CAiBpB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,GACrE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAiBpC;AAqCD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS,CAmBxF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,EACzF,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,MAAM,GACf,MAAM,GAAG,SAAS,GAAG,QAAQ,CAuD/B"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Often we patch a module's default export, but we want to be able to do
3
+ * something like this:
4
+ *
5
+ * ```ts
6
+ * patchTheThing(await import('the-thing'));
7
+ * ```
8
+ *
9
+ * Or like this:
10
+ *
11
+ * ```ts
12
+ * import theThing from 'the-thing';
13
+ * patchTheThing(theThing);
14
+ * ```
15
+ *
16
+ * Note: this does not support modules with a falsey default export. However,
17
+ * presumably in those cases, there's no default export to patch anyway.
18
+ */
19
+ export declare function getDefaultExport<T>(moduleExport: T | {
20
+ default: T;
21
+ }): T;
22
+ //# sourceMappingURL=get-default-export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-default-export.d.ts","sourceRoot":"","sources":["../../../src/utils/get-default-export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,GAAG;IAAE,OAAO,EAAE,CAAC,CAAA;CAAE,GAAG,CAAC,CAQvE"}
@@ -0,0 +1,9 @@
1
+ /** Marks an object so `normalize` returns it unchanged (already-normalized SDK data). */
2
+ export declare function setSkipNormalizationHint(obj: object): void;
3
+ /** Overrides remaining normalization depth from this object downward (e.g. Redux / Pinia state). */
4
+ export declare function setNormalizationDepthOverrideHint(obj: object, depth: number): void;
5
+ /** @internal */
6
+ export declare function hasSkipNormalizationHint(value: object): boolean;
7
+ /** @internal */
8
+ export declare function getNormalizationDepthOverrideHint(value: object): number | undefined;
9
+ //# sourceMappingURL=normalizationHints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizationHints.d.ts","sourceRoot":"","sources":["../../../src/utils/normalizationHints.ts"],"names":[],"mappings":"AAUA,yFAAyF;AACzF,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE1D;AAED,oGAAoG;AACpG,wBAAgB,iCAAiC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAElF;AAED,gBAAgB;AAChB,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,WAErD;AAED,gBAAgB;AAChB,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGnF"}
@@ -1 +1 @@
1
- {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../src/utils/normalize.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,GAAE,MAAY,EAAE,aAAa,GAAE,MAAkB,GAAG,GAAG,CAOrG;AAED,YAAY;AACZ,wBAAgB,eAAe,CAAC,CAAC,EAE/B,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAE9B,KAAK,GAAE,MAAU,EAEjB,OAAO,GAAE,MAAmB,GAC3B,CAAC,CAQH;AAwND;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoBxE"}
1
+ {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../src/utils/normalize.ts"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,GAAE,MAAY,EAAE,aAAa,GAAE,MAAkB,GAAG,GAAG,CAOrG;AAED,YAAY;AACZ,wBAAgB,eAAe,CAAC,CAAC,EAE/B,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAE9B,KAAK,GAAE,MAAU,EAEjB,OAAO,GAAE,MAAmB,GAC3B,CAAC,CAQH;AAmND;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoBxE"}
@@ -22,7 +22,7 @@ export declare function fill(source: {
22
22
  * @param name The name of the property to be set
23
23
  * @param value The value to which to set the property
24
24
  */
25
- export declare function addNonEnumerableProperty(obj: object, name: string, value: unknown): void;
25
+ export declare function addNonEnumerableProperty(obj: object, name: string | symbol, value: unknown): void;
26
26
  /**
27
27
  * Remembers the original function on the wrapped function and
28
28
  * patches up the prototype.
@@ -1 +1 @@
1
- {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/utils/object.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAKtE;;;;;;;;;;;;GAYG;AAEH,wBAAgB,IAAI,CAAC,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG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,CAAC,EAAE,KAAK,EAAE,CAAC,GAC5C;IACE,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GACD;IACE,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACD,CAAC,CA8BJ;AAmBD;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAKzF;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,CAQrD;AAsDD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,MAAM,CA2BrD"}
@@ -1,5 +1,21 @@
1
+ import type { Scope } from '../scope';
1
2
  import type { RequestEventData } from '../types-hoist/request';
2
3
  import type { WebFetchHeaders, WebFetchRequest } from '../types-hoist/webfetchapi';
4
+ /**
5
+ * Maximum size of incoming HTTP request bodies attached to events.
6
+ *
7
+ * - `'none'`: No request bodies will be attached
8
+ * - `'small'`: Request bodies up to 1,000 bytes will be attached
9
+ * - `'medium'`: Request bodies up to 10,000 bytes will be attached
10
+ * - `'always'`: Request bodies will always be attached (up to 1MB hard cap)
11
+ */
12
+ export type MaxRequestBodySize = 'none' | 'small' | 'medium' | 'always';
13
+ /** Hard cap on captured body size, even when `maxRequestBodySize` is `'always'`. */
14
+ export declare const MAX_BODY_BYTE_LENGTH: number;
15
+ /**
16
+ * Convert a `maxRequestBodySize` setting to a maximum byte length.
17
+ */
18
+ export declare function getMaxBodyByteLength(maxRequestBodySize: Exclude<MaxRequestBodySize, 'none'>): number;
3
19
  /**
4
20
  * Transforms a `Headers` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into a simple key-value dict.
5
21
  * The header keys will be lower case: e.g. A "Content-Type" header will be stored as "content-type".
@@ -13,6 +29,20 @@ export declare function headersToDict(reqHeaders: Record<string, string | string
13
29
  * Converts a `Request` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into the format that the `RequestData` integration understands.
14
30
  */
15
31
  export declare function winterCGRequestToRequestData(req: WebFetchRequest): RequestEventData;
32
+ /**
33
+ * Captures the body from a Web Fetch API Request and adds it to the isolation scope.
34
+ *
35
+ * This function clones the request to read the body without affecting the original.
36
+ * Only textual content types are captured - binary data is skipped.
37
+ *
38
+ * This is used by WinterCG-compatible runtimes (Cloudflare Workers, Deno, Bun, Vercel Edge, etc.)
39
+ * that use the Web Fetch API Request object.
40
+ *
41
+ * @param request - The incoming Web Fetch API Request
42
+ * @param isolationScope - The isolation scope to add the body to
43
+ * @param maxRequestBodySize - The maximum size of the request body to capture ('small' = 1KB, 'medium' = 10KB, 'always' = 1MB)
44
+ */
45
+ export declare function captureBodyFromWinterCGRequest(request: WebFetchRequest, isolationScope: Scope, maxRequestBodySize: Exclude<MaxRequestBodySize, 'none'>): Promise<void>;
16
46
  /**
17
47
  * Convert a HTTP request object to RequestEventData to be passed as normalizedRequest.
18
48
  * Instead of allowing `PolymorphicRequest` to be passed,
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/utils/request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAEnF;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MA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;CACH,GAAG,gBAAgB,CAkCnB;AAmFD;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,EACtD,cAAc,GAAE,OAAe,EAC/B,SAAS,GAAE,SAAS,GAAG,UAAsB,GAC5C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAoDxB;AAgED,4CAA4C;AAC5C,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAczE"}
@@ -3,7 +3,9 @@ import type { SpanJSON } from '../types-hoist/span';
3
3
  /**
4
4
  * Check if a span should be ignored based on the ignoreSpans configuration.
5
5
  */
6
- export declare function shouldIgnoreSpan(span: Pick<SpanJSON, 'description' | 'op'>, ignoreSpans: Required<ClientOptions>['ignoreSpans']): boolean;
6
+ export declare function shouldIgnoreSpan(span: Pick<SpanJSON, 'description' | 'op'> & {
7
+ attributes?: Record<string, unknown>;
8
+ }, ignoreSpans: Required<ClientOptions>['ignoreSpans']): boolean;
7
9
  /**
8
10
  * Takes a list of spans, and a span that was dropped, and re-parents the child spans of the dropped span to the parent of the dropped span, if possible.
9
11
  * This mutates the spans array in place!
@@ -1 +1 @@
1
- {"version":3,"file":"should-ignore-span.d.ts","sourceRoot":"","sources":["../../../src/utils/should-ignore-span.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAQpD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC,EAC1C,WAAW,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC,aAAa,CAAC,GAClD,OAAO,CAgCT;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAe9E"}
1
+ {"version":3,"file":"should-ignore-span.d.ts","sourceRoot":"","sources":["../../../src/utils/should-ignore-span.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAA4B,MAAM,wBAAwB,CAAC;AACtF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAQpD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EACrF,WAAW,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC,aAAa,CAAC,GAClD,OAAO,CAsCT;AAeD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAe9E"}
@@ -73,7 +73,7 @@ export declare function spanIsSampled(span: Span): boolean;
73
73
  /** Get the status message to use for a JSON representation of a span. */
74
74
  export declare function getStatusMessage(status: SpanStatus | undefined): string | undefined;
75
75
  /**
76
- * Convert the various statuses to the simple onces expected by Sentry for steamed spans ('ok' is default).
76
+ * Convert the various statuses to the simple ones expected by Sentry for streamed spans ('ok' is default).
77
77
  */
78
78
  export declare function getSimpleStatusMessage(status: SpanStatus | undefined): 'ok' | 'error';
79
79
  declare const CHILD_SPANS_FIELD = "_sentryChildSpans";
@@ -604,10 +604,21 @@ export declare abstract class Client<O extends ClientOptions = ClientOptions> {
604
604
  * Send an envelope to Sentry.
605
605
  */
606
606
  sendEnvelope(envelope: Envelope): PromiseLike<TransportMakeRequestResponse>;
607
+ /**
608
+ * Register a cleanup function to be called when the client is disposed.
609
+ * This is useful for integrations that need to clean up global state.
610
+ *
611
+ * NOTE: This is a no-op in the base `Client` class. Subclasses like `ServerRuntimeClient`
612
+ * override this method to actually register and execute cleanup callbacks.
613
+ */
614
+ registerCleanup(callback: () => void): void;
607
615
  /**
608
616
  * Disposes of the client and releases all resources.
609
617
  *
610
- * Subclasses should override this method to clean up their own resources.
618
+ * Subclasses should override this method to clean up their own resources, including invoking
619
+ * any callbacks registered via {@link Client.registerCleanup}. The base implementation is a
620
+ * no-op and does NOT execute registered cleanup callbacks.
621
+ *
611
622
  * After calling dispose(), the client should not be used anymore.
612
623
  */
613
624
  dispose(): void;
@@ -33,6 +33,7 @@ export { createCheckInEnvelope } from './checkin';
33
33
  export { hasSpansEnabled } from './utils/hasSpansEnabled';
34
34
  export { withStreamedSpan } from './tracing/spans/beforeSendSpan';
35
35
  export { isStreamedBeforeSendSpanCallback } from './tracing/spans/beforeSendSpan';
36
+ export { safeSetSpanJSONAttributes } from './tracing/spans/captureSpan';
36
37
  export { isSentryRequestUrl } from './utils/isSentryRequestUrl';
37
38
  export { handleCallbackErrors } from './utils/handleCallbackErrors';
38
39
  export { parameterize, fmt } from './utils/parameterize';
@@ -51,7 +52,8 @@ export { debounce } from './utils/debounce';
51
52
  export { makeWeakRef, derefWeakRef } from './utils/weakRef';
52
53
  export { MaybeWeakRef } from './utils/weakRef';
53
54
  export { shouldIgnoreSpan } from './utils/should-ignore-span';
54
- export { winterCGHeadersToDict, winterCGRequestToRequestData, httpRequestToRequestData, extractQueryParamsFromUrl, headersToDict, httpHeadersToSpanAttributes, } from './utils/request';
55
+ export { winterCGHeadersToDict, winterCGRequestToRequestData, captureBodyFromWinterCGRequest, httpRequestToRequestData, extractQueryParamsFromUrl, headersToDict, httpHeadersToSpanAttributes, getMaxBodyByteLength, MAX_BODY_BYTE_LENGTH, } from './utils/request';
56
+ export { MaxRequestBodySize } from './utils/request';
55
57
  export { DEFAULT_ENVIRONMENT, DEV_ENVIRONMENT } from './constants';
56
58
  export { addBreadcrumb } from './breadcrumbs';
57
59
  export { functionToStringIntegration } from './integrations/functiontostring';
@@ -71,9 +73,16 @@ export { instrumentPostgresJsSql } from './integrations/postgresjs';
71
73
  export { zodErrorsIntegration } from './integrations/zoderrors';
72
74
  export { thirdPartyErrorFilterIntegration } from './integrations/third-party-errors-filter';
73
75
  export { consoleIntegration } from './integrations/console';
74
- export { featureFlagsIntegration, FeatureFlagsIntegration } from './integrations/featureFlags';
76
+ export { FeatureFlagsIntegration } from './integrations/featureFlags';
77
+ export { featureFlagsIntegration } from './integrations/featureFlags';
75
78
  export { growthbookIntegration } from './integrations/featureFlags';
76
79
  export { conversationIdIntegration } from './integrations/conversationId';
80
+ export { patchHttpModuleClient } from './integrations/http/client-patch';
81
+ export { getHttpClientSubscriptions } from './integrations/http/client-subscriptions';
82
+ export { addOutgoingRequestBreadcrumb } from './integrations/http/add-outgoing-request-breadcrumb';
83
+ export { getRequestUrl, getRequestUrlObject, getRequestUrlFromClientRequest, getRequestOptions, } from './integrations/http/get-request-url';
84
+ export { HTTP_ON_CLIENT_REQUEST, HTTP_ON_SERVER_REQUEST } from './integrations/http/constants';
85
+ export { HttpInstrumentationOptions, HttpClientRequest, HttpIncomingMessage, HttpServerResponse, HttpModuleExport, } from './integrations/http/types';
77
86
  export { profiler } from './profiling';
78
87
  export { instrumentFetchRequest, _INTERNAL_getTracingHeadersForFetchRequest } from './fetch';
79
88
  export { trpcMiddleware } from './trpc';
@@ -102,7 +111,7 @@ export { GoogleGenAIResponse } from './tracing/google-genai/types';
102
111
  export { createLangChainCallbackHandler, instrumentLangChainEmbeddings } from './tracing/langchain';
103
112
  export { LANGCHAIN_INTEGRATION_NAME } from './tracing/langchain/constants';
104
113
  export { LangChainOptions, LangChainIntegration } from './tracing/langchain/types';
105
- export { instrumentStateGraphCompile, instrumentLangGraph } from './tracing/langgraph';
114
+ export { instrumentStateGraphCompile, instrumentCreateReactAgent, instrumentLangGraph } from './tracing/langgraph';
106
115
  export { LANGGRAPH_INTEGRATION_NAME } from './tracing/langgraph/constants';
107
116
  export { LangGraphOptions, LangGraphIntegration, CompiledGraph } from './tracing/langgraph/types';
108
117
  export { OpenAiClient, OpenAiOptions, InstrumentedMethod } from './tracing/openai/types';
@@ -133,6 +142,7 @@ export { SentryDebugLogger } from './utils/debug-logger';
133
142
  export { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, checkOrSetAlreadyCaught, isAlreadyCaptured, getEventDescription, parseSemver, uuid4, } from './utils/misc';
134
143
  export { isNodeEnv, loadModule } from './utils/node';
135
144
  export { normalize, normalizeToSize, normalizeUrlToBase } from './utils/normalize';
145
+ export { setNormalizationDepthOverrideHint, setSkipNormalizationHint } from './utils/normalizationHints';
136
146
  export { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, } from './utils/object';
137
147
  export { basename, dirname, isAbsolute, join, normalizePath, relative, resolve } from './utils/path';
138
148
  export { makePromiseBuffer, SENTRY_BUFFER_FULL_ERROR } from './utils/promisebuffer';
@@ -152,7 +162,7 @@ export { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, create
152
162
  export { createClientReportEnvelope } from './utils/clientreport';
153
163
  export { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits, } from './utils/ratelimit';
154
164
  export { RateLimits } from './utils/ratelimit';
155
- export { MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader, parseBaggageHeader, objectToBaggageHeader, } from './utils/baggage';
165
+ export { MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader, parseBaggageHeader, objectToBaggageHeader, mergeBaggageHeaders, } from './utils/baggage';
156
166
  export { getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment, parseStringToURLObject, getHttpSpanDetailsFromUrlObject, isURLObjectRelative, getSanitizedUrlStringFromUrlObject, stripDataUrlContent, } from './utils/url';
157
167
  export { eventFromMessage, eventFromUnknownInput, exceptionFromError, parseStackFrames, _enhanceErrorWithSentryInfo as _INTERNAL_enhanceErrorWithSentryInfo, } from './utils/eventbuilder';
158
168
  export { callFrameToStackFrame, watchdogTimer } from './utils/anr';
@@ -185,7 +195,7 @@ export { Package } from './types-hoist/package';
185
195
  export { PolymorphicEvent, PolymorphicRequest } from './types-hoist/polymorphics';
186
196
  export { ThreadId, FrameId, StackId, ThreadCpuSample, ThreadCpuStack, ThreadCpuFrame, ThreadCpuProfile, ContinuousThreadCpuProfile, Profile, ProfileChunk, } from './types-hoist/profiling';
187
197
  export { ReplayEndEvent, ReplayEvent, ReplayRecordingData, ReplayRecordingMode, ReplayStartEvent, ReplayStopReason, } from './types-hoist/replay';
188
- export { FeedbackEvent, FeedbackFormData, FeedbackInternalOptions, FeedbackModalIntegration, FeedbackScreenshotIntegration, SendFeedback, SendFeedbackParams, UserFeedback, } from './types-hoist/feedback';
198
+ export { FeedbackErrorCode, FeedbackErrorMessages, FeedbackEvent, FeedbackFormData, FeedbackInternalOptions, FeedbackModalIntegration, FeedbackScreenshotIntegration, SendFeedback, SendFeedbackParams, UserFeedback, } from './types-hoist/feedback';
189
199
  export { QueryParams, RequestEventData, RequestHookInfo, ResponseHookInfo, SanitizedRequestData, } from './types-hoist/request';
190
200
  export { Runtime } from './types-hoist/runtime';
191
201
  export { SdkInfo } from './types-hoist/sdkinfo';
@@ -219,6 +229,7 @@ export { ViewHierarchyData, ViewHierarchyWindow } from './types-hoist/view-hiera
219
229
  export { LegacyCSPReport } from './types-hoist/csp';
220
230
  export { SerializedLog, SerializedLogContainer } from './types-hoist/log';
221
231
  export { BuildTimeOptionsBase, UnstableVitePluginOptions, UnstableRollupPluginOptions, UnstableWebpackPluginOptions, } from './build-time-plugins/buildTimeOptionsBase';
222
- export { withRandomSafeContext as _INTERNAL_withRandomSafeContext, RandomSafeContextRunner as _INTERNAL_RandomSafeContextRunner, safeMathRandom as _INTERNAL_safeMathRandom, safeDateNow as _INTERNAL_safeDateNow } from './utils/randomSafeContext';
232
+ export { RandomSafeContextRunner as _INTERNAL_RandomSafeContextRunner } from './utils/randomSafeContext';
233
+ export { withRandomSafeContext as _INTERNAL_withRandomSafeContext, safeMathRandom as _INTERNAL_safeMathRandom, safeDateNow as _INTERNAL_safeDateNow, } from './utils/randomSafeContext';
223
234
  export { safeUnref as _INTERNAL_safeUnref } from './utils/timer';
224
235
  //# sourceMappingURL=index.d.ts.map
@@ -1,9 +1,10 @@
1
1
  import { HandlerDataConsole } from '../types-hoist/instrument';
2
2
  /**
3
3
  * Add an instrumentation handler for when a console.xxx method is called.
4
+ * Returns a function to remove the handler.
4
5
  *
5
6
  * Use at your own risk, this might break without changelog notice, only used internally.
6
7
  * @hidden
7
8
  */
8
- export declare function addConsoleInstrumentationHandler(handler: (data: HandlerDataConsole) => void): void;
9
+ export declare function addConsoleInstrumentationHandler(handler: (data: HandlerDataConsole) => void): () => void;
9
10
  //# sourceMappingURL=console.d.ts.map
@@ -3,20 +3,22 @@ import { HandlerDataFetch } from '../types-hoist/instrument';
3
3
  * Add an instrumentation handler for when a fetch request happens.
4
4
  * The handler function is called once when the request starts and once when it ends,
5
5
  * which can be identified by checking if it has an `endTimestamp`.
6
+ * Returns a function to remove the handler.
6
7
  *
7
8
  * Use at your own risk, this might break without changelog notice, only used internally.
8
9
  * @hidden
9
10
  */
10
- export declare function addFetchInstrumentationHandler(handler: (data: HandlerDataFetch) => void, skipNativeFetchCheck?: boolean): void;
11
+ export declare function addFetchInstrumentationHandler(handler: (data: HandlerDataFetch) => void, skipNativeFetchCheck?: boolean): () => void;
11
12
  /**
12
13
  * Add an instrumentation handler for long-lived fetch requests, like consuming server-sent events (SSE) via fetch.
13
14
  * The handler will resolve the request body and emit the actual `endTimestamp`, so that the
14
15
  * span can be updated accordingly.
16
+ * Returns a function to remove the handler.
15
17
  *
16
18
  * Only used internally
17
19
  * @hidden
18
20
  */
19
- export declare function addFetchEndInstrumentationHandler(handler: (data: HandlerDataFetch) => void): void;
21
+ export declare function addFetchEndInstrumentationHandler(handler: (data: HandlerDataFetch) => void): () => void;
20
22
  /**
21
23
  * Parses the fetch arguments to find the used Http method and the url of the request.
22
24
  * Exported for tests only.
@@ -1,7 +1,7 @@
1
1
  export type InstrumentHandlerType = 'console' | 'dom' | 'fetch' | 'fetch-body-resolved' | 'history' | 'xhr' | 'error' | 'unhandledrejection';
2
2
  export type InstrumentHandlerCallback = (data: any) => void;
3
- /** Add a handler function. */
4
- export declare function addHandler(type: InstrumentHandlerType, handler: InstrumentHandlerCallback): void;
3
+ /** Add a handler function. Returns a function to remove the handler. */
4
+ export declare function addHandler(type: InstrumentHandlerType, handler: InstrumentHandlerCallback): () => void;
5
5
  /**
6
6
  * Reset all instrumentation handlers.
7
7
  * This can be used by tests to ensure we have a clean slate of instrumentation handlers.
@@ -27,7 +27,7 @@
27
27
  * limitations under the License.
28
28
  */
29
29
  import { SpanAttributes } from '../../types-hoist/span';
30
- import { ExpressExport, ExpressIntegrationOptions, ExpressLayer, ExpressLayerType, ExpressRequest, MiddlewareError, ExpressExportv5, ExpressExportv4 } from './types';
30
+ import { ExpressIntegrationOptions, ExpressLayer, ExpressLayerType, ExpressRequest, MiddlewareError, ExpressExportv5, ExpressExportv4 } from './types';
31
31
  import { ATTR_EXPRESS_NAME, ATTR_EXPRESS_TYPE } from './types';
32
32
  /**
33
33
  * Converts a user-provided error value into an error and error message pair
@@ -87,10 +87,6 @@ export declare function getConstructedRoute(req: ExpressRequest): string;
87
87
  export declare const getLayerPath: (args: unknown[]) => string | undefined;
88
88
  export declare const isExpressWithRouterPrototype: (express: unknown) => express is ExpressExportv5;
89
89
  export declare const isExpressWithoutRouterPrototype: (express: unknown) => express is ExpressExportv4;
90
- export declare const hasDefaultProp: (express: unknown) => express is {
91
- [k: string]: unknown;
92
- default: ExpressExport;
93
- };
94
90
  /** Returns true if response code is internal server error */
95
91
  export declare function defaultShouldHandleError(error: MiddlewareError): boolean;
96
92
  //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { HttpClientRequest, HttpIncomingMessage } from './types';
2
+ /**
3
+ * Create a breadcrumb for a finished outgoing HTTP request.
4
+ */
5
+ export declare function addOutgoingRequestBreadcrumb(request: HttpClientRequest, response: HttpIncomingMessage | undefined): void;
6
+ //# sourceMappingURL=add-outgoing-request-breadcrumb.d.ts.map
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Platform-portable HTTP(S) outgoing-request patching integration
3
+ *
4
+ * Patches the `http` and `https` Node.js built-in module exports to create
5
+ * Sentry spans for outgoing requests and optionally inject distributed trace
6
+ * propagation headers.
7
+ *
8
+ * @module
9
+ *
10
+ * This Sentry integration is a derivative work based on the OpenTelemetry
11
+ * HTTP instrumentation.
12
+ *
13
+ * <https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-http>
14
+ *
15
+ * Extended under the terms of the Apache 2.0 license linked below:
16
+ *
17
+ * ----
18
+ *
19
+ * Copyright The OpenTelemetry Authors
20
+ *
21
+ * Licensed under the Apache License, Version 2.0 (the "License");
22
+ * you may not use this file except in compliance with the License.
23
+ * You may obtain a copy of the License at
24
+ *
25
+ * https://www.apache.org/licenses/LICENSE-2.0
26
+ *
27
+ * Unless required by applicable law or agreed to in writing, software
28
+ * distributed under the License is distributed on an "AS IS" BASIS,
29
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30
+ * See the License for the specific language governing permissions and
31
+ * limitations under the License.
32
+ */
33
+ import { HttpModuleExport, HttpInstrumentationOptions } from './types';
34
+ /**
35
+ * Patch an `node:http` or `node:https` module-shaped export so that every
36
+ * outgoing request is tracked by Sentry.
37
+ *
38
+ * @example
39
+ * ```javascript
40
+ * import http from 'http';
41
+ * import { patchHttpModule } from '@sentry/core';
42
+ * patchHttpModule(http, { propagateTrace: true });
43
+ * ```
44
+ */
45
+ export declare const patchHttpModuleClient: (httpModuleExport: HttpModuleExport, options?: HttpInstrumentationOptions) => HttpModuleExport;
46
+ //# sourceMappingURL=client-patch.d.ts.map
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Define the channels and subscription methods to subscribe to in order to
3
+ * instrument the `node:http` module. Note that this does *not* actually
4
+ * register the subscriptions, it simply returns a data object with the
5
+ * channel names and the subscription handlers. Attach these to diagnostic
6
+ * channels on Node versions where they are supported (ie, >=22.12.0).
7
+ *
8
+ * If any other platforms that do support diagnostic channels eventually add
9
+ * channel coverage for the `node:http` client, then these methods can be
10
+ * used on those platforms as well.
11
+ *
12
+ * This implementation is used in the client-patch strategy, by simply
13
+ * calling the handlers with the relevant data at the appropriate time.
14
+ */
15
+ import { HttpInstrumentationOptions } from './types';
16
+ import { ClientSubscriptionName } from './constants';
17
+ type ChannelListener = (message: unknown, name: string | symbol) => void;
18
+ export type HttpClientSubscriptions = Record<ClientSubscriptionName, ChannelListener>;
19
+ export declare function getHttpClientSubscriptions(options: HttpInstrumentationOptions): HttpClientSubscriptions;
20
+ export {};
21
+ //# sourceMappingURL=client-subscriptions.d.ts.map
@@ -0,0 +1,6 @@
1
+ export declare const LOG_PREFIX = "@sentry/instrumentation-http";
2
+ export declare const HTTP_ON_CLIENT_REQUEST = "http.client.request.created";
3
+ export declare const HTTP_ON_SERVER_REQUEST = "http.server.request.start";
4
+ export type ClientSubscriptionName = typeof HTTP_ON_CLIENT_REQUEST;
5
+ export type ServerSubscriptionName = typeof HTTP_ON_SERVER_REQUEST;
6
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { HttpModuleExport } from './types';
2
+ export declare const warning = "Double-wrapped http.client detected. Either disable spans in Sentry.httpIntegration, or disable the OpenTelemetry HTTP instrumentation.";
3
+ export declare const doubleWrapWarning: (http: HttpModuleExport) => void;
4
+ //# sourceMappingURL=double-wrap-warning.d.ts.map
@@ -0,0 +1,13 @@
1
+ import { Span } from '../../types-hoist/span';
2
+ import { HttpClientRequest, HttpIncomingMessage } from './types';
3
+ import { StartSpanOptions } from '../../types-hoist/startSpanOptions';
4
+ /**
5
+ * Build the initial span name and attributes for an outgoing HTTP request.
6
+ * This is called before the span is created, to get the initial details.
7
+ */
8
+ export declare function getOutgoingRequestSpanData(request: HttpClientRequest): StartSpanOptions;
9
+ /**
10
+ * Add span attributes once the response is received.
11
+ */
12
+ export declare function setIncomingResponseSpanData(response: HttpIncomingMessage, span: Span): void;
13
+ //# sourceMappingURL=get-outgoing-span-data.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { HttpClientRequest, HttpRequestOptions } from './types';
2
+ /** Convert an outgoing request to request options. */
3
+ export declare function getRequestOptions(request: HttpClientRequest): HttpRequestOptions;
4
+ export declare function getRequestUrl(requestOptions: HttpRequestOptions): string;
5
+ export declare function getRequestUrlObject(requestOptions: HttpRequestOptions): URL;
6
+ /**
7
+ * Build the full URL string from a Node.js ClientRequest.
8
+ */
9
+ export declare function getRequestUrlFromClientRequest(request: HttpClientRequest): string;
10
+ //# sourceMappingURL=get-request-url.d.ts.map
@@ -0,0 +1,4 @@
1
+ export { HttpInstrumentationOptions } from './types';
2
+ export * from './client-patch';
3
+ export * from './client-subscriptions';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { LRUMap } from '../../utils/lru';
2
+ import { HttpClientRequest } from './types';
3
+ /**
4
+ * Inject Sentry trace-propagation headers into an outgoing request if the
5
+ * target URL matches the configured `tracePropagationTargets`.
6
+ *
7
+ * Note: this must be called *before* calling `request.end()` (or firing the
8
+ * `http.client.request.start` diagnostics channel), because at that point,
9
+ * the headers have already been sent, and cannot be modified.
10
+ */
11
+ export declare function injectTracePropagationHeaders(request: HttpClientRequest, propagationDecisionMap: LRUMap<string, boolean>): void;
12
+ //# sourceMappingURL=inject-trace-propagation-headers.d.ts.map