@sentry/core 10.51.0 → 10.53.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 (361) hide show
  1. package/browser.js +3 -0
  2. package/build/cjs/browser.js +529 -0
  3. package/build/cjs/browser.js.map +1 -0
  4. package/build/cjs/client.js +15 -2
  5. package/build/cjs/client.js.map +1 -1
  6. package/build/cjs/fetch.js +7 -4
  7. package/build/cjs/fetch.js.map +1 -1
  8. package/build/cjs/index.js +82 -62
  9. package/build/cjs/index.js.map +1 -1
  10. package/build/cjs/instrument/console.js +43 -3
  11. package/build/cjs/instrument/console.js.map +1 -1
  12. package/build/cjs/integrations/captureconsole.js +2 -2
  13. package/build/cjs/integrations/captureconsole.js.map +1 -1
  14. package/build/cjs/integrations/console.js +5 -1
  15. package/build/cjs/integrations/console.js.map +1 -1
  16. package/build/cjs/integrations/express/index.js +4 -6
  17. package/build/cjs/integrations/express/index.js.map +1 -1
  18. package/build/cjs/integrations/express/utils.js +0 -7
  19. package/build/cjs/integrations/express/utils.js.map +1 -1
  20. package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js +43 -0
  21. package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -0
  22. package/build/cjs/integrations/http/client-patch.js +113 -0
  23. package/build/cjs/integrations/http/client-patch.js.map +1 -0
  24. package/build/cjs/integrations/http/client-subscriptions.js +166 -0
  25. package/build/cjs/integrations/http/client-subscriptions.js.map +1 -0
  26. package/build/cjs/integrations/http/constants.js +10 -0
  27. package/build/cjs/integrations/http/constants.js.map +1 -0
  28. package/build/cjs/integrations/http/double-wrap-warning.js +29 -0
  29. package/build/cjs/integrations/http/double-wrap-warning.js.map +1 -0
  30. package/build/cjs/integrations/http/get-outgoing-span-data.js +88 -0
  31. package/build/cjs/integrations/http/get-outgoing-span-data.js.map +1 -0
  32. package/build/cjs/integrations/http/get-request-url.js +54 -0
  33. package/build/cjs/integrations/http/get-request-url.js.map +1 -0
  34. package/build/cjs/integrations/http/inject-trace-propagation-headers.js +81 -0
  35. package/build/cjs/integrations/http/inject-trace-propagation-headers.js.map +1 -0
  36. package/build/cjs/integrations/mcp-server/errorCapture.js +2 -2
  37. package/build/cjs/integrations/mcp-server/errorCapture.js.map +1 -1
  38. package/build/cjs/integrations/mcp-server/handlers.js +72 -0
  39. package/build/cjs/integrations/mcp-server/handlers.js.map +1 -1
  40. package/build/cjs/integrations/mcp-server/index.js +10 -1
  41. package/build/cjs/integrations/mcp-server/index.js.map +1 -1
  42. package/build/cjs/integrations/requestdata.js +85 -3
  43. package/build/cjs/integrations/requestdata.js.map +1 -1
  44. package/build/cjs/integrations/supabase.js +4 -4
  45. package/build/cjs/integrations/supabase.js.map +1 -1
  46. package/build/cjs/logs/envelope.js +12 -2
  47. package/build/cjs/logs/envelope.js.map +1 -1
  48. package/build/cjs/logs/internal.js +7 -1
  49. package/build/cjs/logs/internal.js.map +1 -1
  50. package/build/cjs/metrics/envelope.js +15 -2
  51. package/build/cjs/metrics/envelope.js.map +1 -1
  52. package/build/cjs/metrics/internal.js +7 -1
  53. package/build/cjs/metrics/internal.js.map +1 -1
  54. package/build/cjs/server.js +563 -0
  55. package/build/cjs/server.js.map +1 -0
  56. package/build/cjs/tracing/ai/utils.js +2 -2
  57. package/build/cjs/tracing/ai/utils.js.map +1 -1
  58. package/build/cjs/tracing/anthropic-ai/index.js +3 -3
  59. package/build/cjs/tracing/anthropic-ai/index.js.map +1 -1
  60. package/build/cjs/tracing/anthropic-ai/streaming.js +3 -3
  61. package/build/cjs/tracing/anthropic-ai/streaming.js.map +1 -1
  62. package/build/cjs/tracing/anthropic-ai/utils.js +2 -2
  63. package/build/cjs/tracing/anthropic-ai/utils.js.map +1 -1
  64. package/build/cjs/tracing/google-genai/index.js +3 -3
  65. package/build/cjs/tracing/google-genai/index.js.map +1 -1
  66. package/build/cjs/tracing/google-genai/streaming.js +2 -2
  67. package/build/cjs/tracing/google-genai/streaming.js.map +1 -1
  68. package/build/cjs/tracing/langchain/embeddings.js +2 -2
  69. package/build/cjs/tracing/langchain/embeddings.js.map +1 -1
  70. package/build/cjs/tracing/langchain/index.js +4 -4
  71. package/build/cjs/tracing/langchain/index.js.map +1 -1
  72. package/build/cjs/tracing/langgraph/index.js +3 -3
  73. package/build/cjs/tracing/langgraph/index.js.map +1 -1
  74. package/build/cjs/tracing/langgraph/utils.js +2 -2
  75. package/build/cjs/tracing/langgraph/utils.js.map +1 -1
  76. package/build/cjs/tracing/openai/index.js +3 -3
  77. package/build/cjs/tracing/openai/index.js.map +1 -1
  78. package/build/cjs/tracing/openai/streaming.js +2 -2
  79. package/build/cjs/tracing/openai/streaming.js.map +1 -1
  80. package/build/cjs/tracing/sentrySpan.js +5 -0
  81. package/build/cjs/tracing/sentrySpan.js.map +1 -1
  82. package/build/cjs/tracing/spans/captureSpan.js +58 -23
  83. package/build/cjs/tracing/spans/captureSpan.js.map +1 -1
  84. package/build/cjs/tracing/spans/extractGenAiSpans.js +60 -0
  85. package/build/cjs/tracing/spans/extractGenAiSpans.js.map +1 -0
  86. package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js +26 -0
  87. package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js.map +1 -0
  88. package/build/cjs/tracing/trace.js +1 -0
  89. package/build/cjs/tracing/trace.js.map +1 -1
  90. package/build/cjs/tracing/vercel-ai/constants.js +8 -0
  91. package/build/cjs/tracing/vercel-ai/constants.js.map +1 -1
  92. package/build/cjs/tracing/vercel-ai/index.js +99 -15
  93. package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
  94. package/build/cjs/trpc.js +3 -3
  95. package/build/cjs/trpc.js.map +1 -1
  96. package/build/cjs/utils/baggage.js +73 -0
  97. package/build/cjs/utils/baggage.js.map +1 -1
  98. package/build/cjs/utils/chain-and-copy-promiselike.js +1 -0
  99. package/build/cjs/utils/chain-and-copy-promiselike.js.map +1 -1
  100. package/build/cjs/utils/exports.js +7 -7
  101. package/build/cjs/utils/exports.js.map +1 -1
  102. package/build/cjs/utils/flushIfServerless.js +2 -2
  103. package/build/cjs/utils/flushIfServerless.js.map +1 -1
  104. package/build/cjs/utils/get-default-export.js +32 -0
  105. package/build/cjs/utils/get-default-export.js.map +1 -0
  106. package/build/cjs/utils/request.js +129 -0
  107. package/build/cjs/utils/request.js.map +1 -1
  108. package/build/cjs/utils/spanUtils.js +1 -1
  109. package/build/cjs/utils/spanUtils.js.map +1 -1
  110. package/build/cjs/utils/string.js +9 -2
  111. package/build/cjs/utils/string.js.map +1 -1
  112. package/build/cjs/utils/traceData.js +2 -2
  113. package/build/cjs/utils/traceData.js.map +1 -1
  114. package/build/cjs/utils/version.js +1 -1
  115. package/build/esm/browser.js +142 -0
  116. package/build/esm/browser.js.map +1 -0
  117. package/build/esm/client.js +15 -2
  118. package/build/esm/client.js.map +1 -1
  119. package/build/esm/fetch.js +7 -4
  120. package/build/esm/fetch.js.map +1 -1
  121. package/build/esm/index.js +20 -15
  122. package/build/esm/index.js.map +1 -1
  123. package/build/esm/instrument/console.js +44 -5
  124. package/build/esm/instrument/console.js.map +1 -1
  125. package/build/esm/integrations/console.js +6 -2
  126. package/build/esm/integrations/console.js.map +1 -1
  127. package/build/esm/integrations/express/index.js +3 -5
  128. package/build/esm/integrations/express/index.js.map +1 -1
  129. package/build/esm/integrations/express/utils.js +1 -7
  130. package/build/esm/integrations/express/utils.js.map +1 -1
  131. package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js +41 -0
  132. package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -0
  133. package/build/esm/integrations/http/client-patch.js +111 -0
  134. package/build/esm/integrations/http/client-patch.js.map +1 -0
  135. package/build/esm/integrations/http/client-subscriptions.js +164 -0
  136. package/build/esm/integrations/http/client-subscriptions.js.map +1 -0
  137. package/build/esm/integrations/http/constants.js +6 -0
  138. package/build/esm/integrations/http/constants.js.map +1 -0
  139. package/build/esm/integrations/http/double-wrap-warning.js +26 -0
  140. package/build/esm/integrations/http/double-wrap-warning.js.map +1 -0
  141. package/build/esm/integrations/http/get-outgoing-span-data.js +85 -0
  142. package/build/esm/integrations/http/get-outgoing-span-data.js.map +1 -0
  143. package/build/esm/integrations/http/get-request-url.js +49 -0
  144. package/build/esm/integrations/http/get-request-url.js.map +1 -0
  145. package/build/esm/integrations/http/inject-trace-propagation-headers.js +79 -0
  146. package/build/esm/integrations/http/inject-trace-propagation-headers.js.map +1 -0
  147. package/build/esm/integrations/mcp-server/handlers.js +72 -1
  148. package/build/esm/integrations/mcp-server/handlers.js.map +1 -1
  149. package/build/esm/integrations/mcp-server/index.js +11 -2
  150. package/build/esm/integrations/mcp-server/index.js.map +1 -1
  151. package/build/esm/integrations/requestdata.js +85 -3
  152. package/build/esm/integrations/requestdata.js.map +1 -1
  153. package/build/esm/logs/envelope.js +12 -2
  154. package/build/esm/logs/envelope.js.map +1 -1
  155. package/build/esm/logs/internal.js +7 -1
  156. package/build/esm/logs/internal.js.map +1 -1
  157. package/build/esm/metrics/envelope.js +15 -2
  158. package/build/esm/metrics/envelope.js.map +1 -1
  159. package/build/esm/metrics/internal.js +7 -1
  160. package/build/esm/metrics/internal.js.map +1 -1
  161. package/build/esm/package.json +1 -1
  162. package/build/esm/server.js +157 -0
  163. package/build/esm/server.js.map +1 -0
  164. package/build/esm/tracing/sentrySpan.js +5 -0
  165. package/build/esm/tracing/sentrySpan.js.map +1 -1
  166. package/build/esm/tracing/spans/captureSpan.js +58 -23
  167. package/build/esm/tracing/spans/captureSpan.js.map +1 -1
  168. package/build/esm/tracing/spans/extractGenAiSpans.js +58 -0
  169. package/build/esm/tracing/spans/extractGenAiSpans.js.map +1 -0
  170. package/build/esm/tracing/spans/spanJsonToStreamedSpan.js +24 -0
  171. package/build/esm/tracing/spans/spanJsonToStreamedSpan.js.map +1 -0
  172. package/build/esm/tracing/trace.js +1 -1
  173. package/build/esm/tracing/trace.js.map +1 -1
  174. package/build/esm/tracing/vercel-ai/constants.js +8 -1
  175. package/build/esm/tracing/vercel-ai/constants.js.map +1 -1
  176. package/build/esm/tracing/vercel-ai/index.js +101 -18
  177. package/build/esm/tracing/vercel-ai/index.js.map +1 -1
  178. package/build/esm/utils/baggage.js +73 -1
  179. package/build/esm/utils/baggage.js.map +1 -1
  180. package/build/esm/utils/chain-and-copy-promiselike.js +1 -0
  181. package/build/esm/utils/chain-and-copy-promiselike.js.map +1 -1
  182. package/build/esm/utils/exports.js +7 -7
  183. package/build/esm/utils/exports.js.map +1 -1
  184. package/build/esm/utils/get-default-export.js +30 -0
  185. package/build/esm/utils/get-default-export.js.map +1 -0
  186. package/build/esm/utils/request.js +127 -1
  187. package/build/esm/utils/request.js.map +1 -1
  188. package/build/esm/utils/spanUtils.js +1 -1
  189. package/build/esm/utils/spanUtils.js.map +1 -1
  190. package/build/esm/utils/string.js +9 -2
  191. package/build/esm/utils/string.js.map +1 -1
  192. package/build/esm/utils/version.js +1 -1
  193. package/build/types/browser-exports.d.ts +11 -0
  194. package/build/types/browser-exports.d.ts.map +1 -0
  195. package/build/types/browser.d.ts +3 -0
  196. package/build/types/browser.d.ts.map +1 -0
  197. package/build/types/build-time-plugins/buildTimeOptionsBase.d.ts +8 -0
  198. package/build/types/build-time-plugins/buildTimeOptionsBase.d.ts.map +1 -1
  199. package/build/types/carrier.d.ts +1 -1
  200. package/build/types/carrier.d.ts.map +1 -1
  201. package/build/types/client.d.ts.map +1 -1
  202. package/build/types/fetch.d.ts.map +1 -1
  203. package/build/types/index.d.ts +3 -223
  204. package/build/types/index.d.ts.map +1 -1
  205. package/build/types/instrument/console.d.ts +7 -0
  206. package/build/types/instrument/console.d.ts.map +1 -1
  207. package/build/types/integrations/captureconsole.d.ts +1 -1
  208. package/build/types/integrations/captureconsole.d.ts.map +1 -1
  209. package/build/types/integrations/console.d.ts +5 -0
  210. package/build/types/integrations/console.d.ts.map +1 -1
  211. package/build/types/integrations/conversationId.d.ts +1 -1
  212. package/build/types/integrations/conversationId.d.ts.map +1 -1
  213. package/build/types/integrations/dedupe.d.ts +1 -1
  214. package/build/types/integrations/dedupe.d.ts.map +1 -1
  215. package/build/types/integrations/eventFilters.d.ts +2 -2
  216. package/build/types/integrations/eventFilters.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/extraerrordata.d.ts +1 -1
  221. package/build/types/integrations/extraerrordata.d.ts.map +1 -1
  222. package/build/types/integrations/functiontostring.d.ts +1 -1
  223. package/build/types/integrations/functiontostring.d.ts.map +1 -1
  224. package/build/types/integrations/http/add-outgoing-request-breadcrumb.d.ts +6 -0
  225. package/build/types/integrations/http/add-outgoing-request-breadcrumb.d.ts.map +1 -0
  226. package/build/types/integrations/http/client-patch.d.ts +46 -0
  227. package/build/types/integrations/http/client-patch.d.ts.map +1 -0
  228. package/build/types/integrations/http/client-subscriptions.d.ts +21 -0
  229. package/build/types/integrations/http/client-subscriptions.d.ts.map +1 -0
  230. package/build/types/integrations/http/constants.d.ts +6 -0
  231. package/build/types/integrations/http/constants.d.ts.map +1 -0
  232. package/build/types/integrations/http/double-wrap-warning.d.ts +4 -0
  233. package/build/types/integrations/http/double-wrap-warning.d.ts.map +1 -0
  234. package/build/types/integrations/http/get-outgoing-span-data.d.ts +13 -0
  235. package/build/types/integrations/http/get-outgoing-span-data.d.ts.map +1 -0
  236. package/build/types/integrations/http/get-request-url.d.ts +10 -0
  237. package/build/types/integrations/http/get-request-url.d.ts.map +1 -0
  238. package/build/types/integrations/http/index.d.ts +4 -0
  239. package/build/types/integrations/http/index.d.ts.map +1 -0
  240. package/build/types/integrations/http/inject-trace-propagation-headers.d.ts +12 -0
  241. package/build/types/integrations/http/inject-trace-propagation-headers.d.ts.map +1 -0
  242. package/build/types/integrations/http/types.d.ts +249 -0
  243. package/build/types/integrations/http/types.d.ts.map +1 -0
  244. package/build/types/integrations/linkederrors.d.ts +1 -1
  245. package/build/types/integrations/linkederrors.d.ts.map +1 -1
  246. package/build/types/integrations/mcp-server/handlers.d.ts +18 -0
  247. package/build/types/integrations/mcp-server/handlers.d.ts.map +1 -1
  248. package/build/types/integrations/mcp-server/index.d.ts +8 -1
  249. package/build/types/integrations/mcp-server/index.d.ts.map +1 -1
  250. package/build/types/integrations/requestdata.d.ts +1 -1
  251. package/build/types/integrations/requestdata.d.ts.map +1 -1
  252. package/build/types/integrations/spanStreaming.d.ts +1 -1
  253. package/build/types/integrations/spanStreaming.d.ts.map +1 -1
  254. package/build/types/integrations/supabase.d.ts +1 -1
  255. package/build/types/integrations/supabase.d.ts.map +1 -1
  256. package/build/types/integrations/zoderrors.d.ts +1 -1
  257. package/build/types/integrations/zoderrors.d.ts.map +1 -1
  258. package/build/types/logs/console-integration.d.ts +1 -1
  259. package/build/types/logs/console-integration.d.ts.map +1 -1
  260. package/build/types/logs/envelope.d.ts +5 -2
  261. package/build/types/logs/envelope.d.ts.map +1 -1
  262. package/build/types/logs/internal.d.ts.map +1 -1
  263. package/build/types/metrics/envelope.d.ts +5 -2
  264. package/build/types/metrics/envelope.d.ts.map +1 -1
  265. package/build/types/metrics/internal.d.ts.map +1 -1
  266. package/build/types/server-exports.d.ts +26 -0
  267. package/build/types/server-exports.d.ts.map +1 -0
  268. package/build/types/server.d.ts +10 -0
  269. package/build/types/server.d.ts.map +1 -0
  270. package/build/types/shared-exports.d.ts +215 -0
  271. package/build/types/shared-exports.d.ts.map +1 -0
  272. package/build/types/tracing/index.d.ts +1 -1
  273. package/build/types/tracing/index.d.ts.map +1 -1
  274. package/build/types/tracing/sentrySpan.d.ts.map +1 -1
  275. package/build/types/tracing/spans/captureSpan.d.ts +4 -4
  276. package/build/types/tracing/spans/captureSpan.d.ts.map +1 -1
  277. package/build/types/tracing/spans/extractGenAiSpans.d.ts +15 -0
  278. package/build/types/tracing/spans/extractGenAiSpans.d.ts.map +1 -0
  279. package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts +6 -0
  280. package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts.map +1 -0
  281. package/build/types/tracing/trace.d.ts +1 -0
  282. package/build/types/tracing/trace.d.ts.map +1 -1
  283. package/build/types/tracing/vercel-ai/constants.d.ts +1 -0
  284. package/build/types/tracing/vercel-ai/constants.d.ts.map +1 -1
  285. package/build/types/tracing/vercel-ai/index.d.ts +9 -0
  286. package/build/types/tracing/vercel-ai/index.d.ts.map +1 -1
  287. package/build/types/types-hoist/envelope.d.ts +1 -1
  288. package/build/types/types-hoist/envelope.d.ts.map +1 -1
  289. package/build/types/types-hoist/log.d.ts +5 -0
  290. package/build/types/types-hoist/log.d.ts.map +1 -1
  291. package/build/types/types-hoist/metric.d.ts +5 -0
  292. package/build/types/types-hoist/metric.d.ts.map +1 -1
  293. package/build/types/types-hoist/options.d.ts +8 -0
  294. package/build/types/types-hoist/options.d.ts.map +1 -1
  295. package/build/types/types-hoist/webfetchapi.d.ts +2 -0
  296. package/build/types/types-hoist/webfetchapi.d.ts.map +1 -1
  297. package/build/types/utils/baggage.d.ts +13 -0
  298. package/build/types/utils/baggage.d.ts.map +1 -1
  299. package/build/types/utils/get-default-export.d.ts +22 -0
  300. package/build/types/utils/get-default-export.d.ts.map +1 -0
  301. package/build/types/utils/request.d.ts +30 -0
  302. package/build/types/utils/request.d.ts.map +1 -1
  303. package/build/types/utils/spanUtils.d.ts +1 -1
  304. package/build/types/utils/string.d.ts +1 -1
  305. package/build/types/utils/string.d.ts.map +1 -1
  306. package/build/types-ts3.8/browser-exports.d.ts +11 -0
  307. package/build/types-ts3.8/browser.d.ts +3 -0
  308. package/build/types-ts3.8/build-time-plugins/buildTimeOptionsBase.d.ts +8 -0
  309. package/build/types-ts3.8/carrier.d.ts +1 -1
  310. package/build/types-ts3.8/index.d.ts +3 -225
  311. package/build/types-ts3.8/instrument/console.d.ts +7 -0
  312. package/build/types-ts3.8/integrations/captureconsole.d.ts +1 -1
  313. package/build/types-ts3.8/integrations/console.d.ts +5 -0
  314. package/build/types-ts3.8/integrations/conversationId.d.ts +1 -1
  315. package/build/types-ts3.8/integrations/dedupe.d.ts +1 -1
  316. package/build/types-ts3.8/integrations/eventFilters.d.ts +2 -2
  317. package/build/types-ts3.8/integrations/express/utils.d.ts +1 -5
  318. package/build/types-ts3.8/integrations/extraerrordata.d.ts +1 -1
  319. package/build/types-ts3.8/integrations/functiontostring.d.ts +1 -1
  320. package/build/types-ts3.8/integrations/http/add-outgoing-request-breadcrumb.d.ts +6 -0
  321. package/build/types-ts3.8/integrations/http/client-patch.d.ts +46 -0
  322. package/build/types-ts3.8/integrations/http/client-subscriptions.d.ts +21 -0
  323. package/build/types-ts3.8/integrations/http/constants.d.ts +6 -0
  324. package/build/types-ts3.8/integrations/http/double-wrap-warning.d.ts +4 -0
  325. package/build/types-ts3.8/integrations/http/get-outgoing-span-data.d.ts +13 -0
  326. package/build/types-ts3.8/integrations/http/get-request-url.d.ts +10 -0
  327. package/build/types-ts3.8/integrations/http/index.d.ts +4 -0
  328. package/build/types-ts3.8/integrations/http/inject-trace-propagation-headers.d.ts +12 -0
  329. package/build/types-ts3.8/integrations/http/types.d.ts +252 -0
  330. package/build/types-ts3.8/integrations/linkederrors.d.ts +1 -1
  331. package/build/types-ts3.8/integrations/mcp-server/handlers.d.ts +18 -0
  332. package/build/types-ts3.8/integrations/mcp-server/index.d.ts +8 -1
  333. package/build/types-ts3.8/integrations/requestdata.d.ts +1 -1
  334. package/build/types-ts3.8/integrations/spanStreaming.d.ts +1 -1
  335. package/build/types-ts3.8/integrations/supabase.d.ts +1 -1
  336. package/build/types-ts3.8/integrations/zoderrors.d.ts +1 -1
  337. package/build/types-ts3.8/logs/console-integration.d.ts +1 -1
  338. package/build/types-ts3.8/logs/envelope.d.ts +5 -2
  339. package/build/types-ts3.8/metrics/envelope.d.ts +5 -2
  340. package/build/types-ts3.8/server-exports.d.ts +21 -0
  341. package/build/types-ts3.8/server.d.ts +10 -0
  342. package/build/types-ts3.8/shared-exports.d.ts +214 -0
  343. package/build/types-ts3.8/tracing/index.d.ts +1 -1
  344. package/build/types-ts3.8/tracing/spans/captureSpan.d.ts +4 -4
  345. package/build/types-ts3.8/tracing/spans/extractGenAiSpans.d.ts +15 -0
  346. package/build/types-ts3.8/tracing/spans/spanJsonToStreamedSpan.d.ts +6 -0
  347. package/build/types-ts3.8/tracing/trace.d.ts +1 -0
  348. package/build/types-ts3.8/tracing/vercel-ai/constants.d.ts +1 -0
  349. package/build/types-ts3.8/tracing/vercel-ai/index.d.ts +9 -0
  350. package/build/types-ts3.8/types-hoist/envelope.d.ts +1 -1
  351. package/build/types-ts3.8/types-hoist/log.d.ts +5 -0
  352. package/build/types-ts3.8/types-hoist/metric.d.ts +5 -0
  353. package/build/types-ts3.8/types-hoist/options.d.ts +8 -0
  354. package/build/types-ts3.8/types-hoist/webfetchapi.d.ts +2 -0
  355. package/build/types-ts3.8/utils/baggage.d.ts +13 -0
  356. package/build/types-ts3.8/utils/get-default-export.d.ts +22 -0
  357. package/build/types-ts3.8/utils/request.d.ts +30 -0
  358. package/build/types-ts3.8/utils/spanUtils.d.ts +1 -1
  359. package/build/types-ts3.8/utils/string.d.ts +1 -1
  360. package/package.json +24 -2
  361. package/server.js +3 -0
@@ -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"}
@@ -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,MAAM,CAAC,CAc9F;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAc/G;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,eAAe,GAAG,gBAAgB,CAUnF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;KAC9C,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;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"}
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/utils/request.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAInF;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAExE,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,QAAgB,CAAC;AAWlD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,EAAE,MAAM,CAAC,GAAG,MAAM,CAIpG;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAc9F;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAc/G;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,eAAe,GAAG,gBAAgB,CAUnF;AAaD;;;;;;;;;;;;GAYG;AACH,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,eAAe,EACxB,cAAc,EAAE,KAAK,EACrB,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,EAAE,MAAM,CAAC,GACtD,OAAO,CAAC,IAAI,CAAC,CA4Df;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;KAC9C,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;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"}
@@ -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";
@@ -42,5 +42,5 @@ export declare function isMatchingPattern(value: string, pattern: RegExp | strin
42
42
  * count. If false, `testString` will match a string pattern if it contains that pattern.
43
43
  * @returns
44
44
  */
45
- export declare function stringMatchesSomePattern(testString: string, patterns?: Array<string | RegExp | ((value: string) => boolean)>, requireExactStringMatch?: boolean): boolean;
45
+ export declare function stringMatchesSomePattern(testString: string, patterns?: Array<string | RegExp | ((value: string) => boolean)> | Set<string | RegExp | ((value: string) => boolean)>, requireExactStringMatch?: boolean): boolean;
46
46
  //# sourceMappingURL=string.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../src/utils/string.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU,GAAG,MAAM,CAK7D;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAiC5D;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CA0BrE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,EACvD,uBAAuB,GAAE,OAAe,GACvC,OAAO,CAgBT;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAClB,QAAQ,GAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAM,EACpE,uBAAuB,GAAE,OAAe,GACvC,OAAO,CAET"}
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../src/utils/string.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU,GAAG,MAAM,CAK7D;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAiC5D;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CA0BrE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,EACvD,uBAAuB,GAAE,OAAe,GACvC,OAAO,CAgBT;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,EAClB,QAAQ,GACJ,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,GACrD,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAM,EAC5D,uBAAuB,GAAE,OAAe,GACvC,OAAO,CAOT"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Browser-specific utilities for Sentry SDKs
3
+ *
4
+ * @module
5
+ */
6
+ export { getComponentName, getLocationHref, htmlTreeAsString } from './utils/browser';
7
+ export { supportsDOMError, supportsHistory, supportsNativeFetch, supportsReportingObserver } from './utils/supports';
8
+ export { XhrBreadcrumbData, XhrBreadcrumbHint } from './types-hoist/breadcrumb';
9
+ export { HandlerDataXhr, HandlerDataDom, HandlerDataHistory, SentryXhrData, SentryWrappedXMLHttpRequest, } from './types-hoist/instrument';
10
+ export { BrowserClientReplayOptions, BrowserClientProfilingOptions } from './types-hoist/browseroptions';
11
+ //# sourceMappingURL=browser-exports.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from './shared-exports';
2
+ export * from './browser-exports';
3
+ //# sourceMappingURL=browser.d.ts.map
@@ -114,6 +114,14 @@ export interface BuildTimeOptionsBase {
114
114
  * Options for bundle size optimizations by excluding certain features of the Sentry SDK.
115
115
  */
116
116
  bundleSizeOptimizations?: BundleSizeOptimizationsOptions;
117
+ /**
118
+ * A key that is used to identify the application in the Sentry bundler plugins.
119
+ * This key is used by the `thirdPartyErrorFilterIntegration` to filter out errors
120
+ * originating from third-party scripts.
121
+ *
122
+ * @see https://docs.sentry.io/platforms/javascript/configuration/filtering/#using-thirdpartyerrorfilterintegration
123
+ */
124
+ applicationKey?: string;
117
125
  }
118
126
  /**
119
127
  * Utility type for adding Vite plugin options to build-time configuration.
@@ -59,6 +59,6 @@ export declare function getSentryCarrier(carrier: Carrier): SentryCarrier;
59
59
  * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value
60
60
  * @returns the singleton
61
61
  */
62
- export declare function getGlobalSingleton<Prop extends keyof SentryCarrier>(name: Prop, creator: () => NonNullable<SentryCarrier[Prop]>, obj?: import("./utils/worldwide").InternalGlobal): NonNullable<SentryCarrier[Prop]>;
62
+ export declare function getGlobalSingleton<Prop extends keyof SentryCarrier>(name: Prop, creator: () => NonNullable<SentryCarrier[Prop]>, obj?: import("./shared-exports").InternalGlobal): NonNullable<SentryCarrier[Prop]>;
63
63
  export {};
64
64
  //# sourceMappingURL=carrier.d.ts.map
@@ -1,226 +1,4 @@
1
- export { ClientClass as SentryCoreCurrentScopes } from './sdk';
2
- export { AsyncContextStrategy } from './asyncContext/types';
3
- export { Carrier } from './carrier';
4
- export { OfflineStore, OfflineTransportOptions } from './transports/offline';
5
- export { ServerRuntimeClientOptions } from './server-runtime-client';
6
- export { IntegrationIndex } from './integration';
7
- export * from './tracing';
8
- export * from './semanticAttributes';
9
- export { createEventEnvelope, createSessionEnvelope, createSpanEnvelope } from './envelope';
10
- export { captureCheckIn, withMonitor, captureException, captureEvent, captureMessage, lastEventId, close, flush, setContext, setExtra, setExtras, setTag, setTags, setUser, setConversationId, isInitialized, isEnabled, startSession, endSession, captureSession, addEventProcessor, } from './exports';
11
- export { getCurrentScope, getIsolationScope, getGlobalScope, withScope, withIsolationScope, getClient, getTraceContextFromScope, registerExternalPropagationContext, getExternalPropagationContext, hasExternalPropagationContext, } from './currentScopes';
12
- export { getDefaultCurrentScope, getDefaultIsolationScope } from './defaultScopes';
13
- export { setAsyncContextStrategy } from './asyncContext';
14
- export { getGlobalSingleton, getMainCarrier } from './carrier';
15
- export { makeSession, closeSession, updateSession } from './session';
16
- export { Scope } from './scope';
17
- export { CaptureContext, ScopeContext, ScopeData } from './scope';
18
- export { notifyEventProcessors } from './eventProcessors';
19
- export { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint, SENTRY_API_VERSION } from './api';
20
- export { Client } from './client';
21
- export { ServerRuntimeClient } from './server-runtime-client';
22
- export { initAndBind, setCurrentClient } from './sdk';
23
- export { createTransport } from './transports/base';
24
- export { makeOfflineTransport } from './transports/offline';
25
- export { makeMultiplexedTransport, MULTIPLEXED_TRANSPORT_EXTRA_KEY } from './transports/multiplexed';
26
- export { getIntegrationsToSetup, addIntegration, defineIntegration, installedIntegrations } from './integration';
27
- export { _INTERNAL_skipAiProviderWrapping, _INTERNAL_shouldSkipAiProviderWrapping, _INTERNAL_clearAiProviderSkips, } from './utils/ai/providerSkip';
28
- export { envToBool } from './utils/envToBool';
29
- export { applyScopeDataToEvent, mergeScopeData, getCombinedScopeData } from './utils/scopeData';
30
- export { prepareEvent } from './utils/prepareEvent';
31
- export { ExclusiveEventHintOrCaptureContext } from './utils/prepareEvent';
32
- export { createCheckInEnvelope } from './checkin';
33
- export { hasSpansEnabled } from './utils/hasSpansEnabled';
34
- export { withStreamedSpan } from './tracing/spans/beforeSendSpan';
35
- export { isStreamedBeforeSendSpanCallback } from './tracing/spans/beforeSendSpan';
36
- export { safeSetSpanJSONAttributes } from './tracing/spans/captureSpan';
37
- export { isSentryRequestUrl } from './utils/isSentryRequestUrl';
38
- export { handleCallbackErrors } from './utils/handleCallbackErrors';
39
- export { parameterize, fmt } from './utils/parameterize';
40
- export { HandleTunnelRequestOptions } from './utils/tunnel';
41
- export { handleTunnelRequest } from './utils/tunnel';
42
- export { addAutoIpAddressToSession } from './utils/ipAddress';
43
- export { addAutoIpAddressToUser } from './utils/ipAddress';
44
- export { convertSpanLinksForEnvelope, spanToTraceHeader, spanToJSON, spanToStreamedSpanJSON, spanIsSampled, spanToTraceContext, getSpanDescendants, getStatusMessage, getRootSpan, INTERNAL_getSegmentSpan, getActiveSpan, addChildSpanToSpan, spanTimeInputToSeconds, updateSpanName, } from './utils/spanUtils';
45
- export { _setSpanForScope as _INTERNAL_setSpanForScope } from './utils/spanOnScope';
46
- export { parseSampleRate } from './utils/parseSampleRate';
47
- export { applySdkMetadata } from './utils/sdkMetadata';
48
- export { getTraceData } from './utils/traceData';
49
- export { shouldPropagateTraceForUrl } from './utils/tracePropagationTargets';
50
- export { getTraceMetaTags } from './utils/meta';
51
- export { debounce } from './utils/debounce';
52
- export { makeWeakRef, derefWeakRef } from './utils/weakRef';
53
- export { MaybeWeakRef } from './utils/weakRef';
54
- export { shouldIgnoreSpan } from './utils/should-ignore-span';
55
- export { winterCGHeadersToDict, winterCGRequestToRequestData, httpRequestToRequestData, extractQueryParamsFromUrl, headersToDict, httpHeadersToSpanAttributes, } from './utils/request';
56
- export { DEFAULT_ENVIRONMENT, DEV_ENVIRONMENT } from './constants';
57
- export { addBreadcrumb } from './breadcrumbs';
58
- export { functionToStringIntegration } from './integrations/functiontostring';
59
- export { inboundFiltersIntegration } from './integrations/eventFilters';
60
- export { eventFiltersIntegration } from './integrations/eventFilters';
61
- export { linkedErrorsIntegration } from './integrations/linkederrors';
62
- export { moduleMetadataIntegration } from './integrations/moduleMetadata';
63
- export { requestDataIntegration } from './integrations/requestdata';
64
- export { captureConsoleIntegration } from './integrations/captureconsole';
65
- export { patchExpressModule, setupExpressErrorHandler, expressErrorHandler } from './integrations/express/index';
66
- export { ExpressIntegrationOptions, ExpressHandlerOptions, ExpressMiddleware, ExpressErrorMiddleware, } from './integrations/express/types';
67
- export { dedupeIntegration } from './integrations/dedupe';
68
- export { extraErrorDataIntegration } from './integrations/extraerrordata';
69
- export { rewriteFramesIntegration } from './integrations/rewriteframes';
70
- export { supabaseIntegration, instrumentSupabaseClient } from './integrations/supabase';
71
- export { instrumentPostgresJsSql } from './integrations/postgresjs';
72
- export { zodErrorsIntegration } from './integrations/zoderrors';
73
- export { thirdPartyErrorFilterIntegration } from './integrations/third-party-errors-filter';
74
- export { consoleIntegration } from './integrations/console';
75
- export { featureFlagsIntegration, FeatureFlagsIntegration } from './integrations/featureFlags';
76
- export { growthbookIntegration } from './integrations/featureFlags';
77
- export { conversationIdIntegration } from './integrations/conversationId';
78
- export { profiler } from './profiling';
79
- export { instrumentFetchRequest, _INTERNAL_getTracingHeadersForFetchRequest } from './fetch';
80
- export { trpcMiddleware } from './trpc';
81
- export { wrapMcpServerWithSentry } from './integrations/mcp-server';
82
- export { captureFeedback } from './feedback';
83
- export { ReportDialogOptions } from './report-dialog';
84
- export { _INTERNAL_captureLog, _INTERNAL_flushLogsBuffer, _INTERNAL_captureSerializedLog } from './logs/internal';
85
- import * as logger_1 from './logs/public-api';
86
- export { logger_1 as logger };
87
- export { consoleLoggingIntegration } from './logs/console-integration';
88
- export { _INTERNAL_captureMetric, _INTERNAL_flushMetricsBuffer, _INTERNAL_captureSerializedMetric, } from './metrics/internal';
89
- import * as metrics_1 from './metrics/public-api';
90
- export { metrics_1 as metrics };
91
- export { MetricOptions } from './metrics/public-api';
92
- export { createConsolaReporter } from './integrations/consola';
93
- export { addVercelAiProcessors } from './tracing/vercel-ai';
94
- export { _INTERNAL_getSpanContextForToolCallId, _INTERNAL_cleanupToolCallSpanContext } from './tracing/vercel-ai/utils';
95
- export { toolCallSpanContextMap as _INTERNAL_toolCallSpanContextMap } from './tracing/vercel-ai/constants';
96
- export { instrumentOpenAiClient } from './tracing/openai';
97
- export { OPENAI_INTEGRATION_NAME } from './tracing/openai/constants';
98
- export { instrumentAnthropicAiClient } from './tracing/anthropic-ai';
99
- export { ANTHROPIC_AI_INTEGRATION_NAME } from './tracing/anthropic-ai/constants';
100
- export { instrumentGoogleGenAIClient } from './tracing/google-genai';
101
- export { GOOGLE_GENAI_INTEGRATION_NAME } from './tracing/google-genai/constants';
102
- export { GoogleGenAIResponse } from './tracing/google-genai/types';
103
- export { createLangChainCallbackHandler, instrumentLangChainEmbeddings } from './tracing/langchain';
104
- export { LANGCHAIN_INTEGRATION_NAME } from './tracing/langchain/constants';
105
- export { LangChainOptions, LangChainIntegration } from './tracing/langchain/types';
106
- export { instrumentStateGraphCompile, instrumentCreateReactAgent, instrumentLangGraph } from './tracing/langgraph';
107
- export { LANGGRAPH_INTEGRATION_NAME } from './tracing/langgraph/constants';
108
- export { LangGraphOptions, LangGraphIntegration, CompiledGraph } from './tracing/langgraph/types';
109
- export { OpenAiClient, OpenAiOptions, InstrumentedMethod } from './tracing/openai/types';
110
- export { AnthropicAiClient, AnthropicAiOptions, AnthropicAiInstrumentedMethod, AnthropicAiResponse, } from './tracing/anthropic-ai/types';
111
- export { GoogleGenAIClient, GoogleGenAIChat, GoogleGenAIOptions, GoogleGenAIInstrumentedMethod, } from './tracing/google-genai/types';
112
- export { GoogleGenAIIstrumentedMethod } from './tracing/google-genai/types';
113
- export { SpanBuffer } from './tracing/spans/spanBuffer';
114
- export { hasSpanStreamingEnabled } from './tracing/spans/hasSpanStreamingEnabled';
115
- export { spanStreamingIntegration } from './integrations/spanStreaming';
116
- export { FeatureFlag } from './utils/featureFlags';
117
- export { _INTERNAL_copyFlagsFromScopeToEvent, _INTERNAL_insertFlagToScope, _INTERNAL_addFeatureFlagToActiveSpan, _INTERNAL_FLAG_BUFFER_SIZE, _INTERNAL_MAX_FLAGS_PER_SPAN, } from './utils/featureFlags';
118
- export { applyAggregateErrorsToEvent } from './utils/aggregate-errors';
119
- export { getBreadcrumbLogLevelFromHttpStatusCode } from './utils/breadcrumb-log-level';
120
- export { getComponentName, getLocationHref, htmlTreeAsString } from './utils/browser';
121
- export { dsnFromString, dsnToString, makeDsn } from './utils/dsn';
122
- export { SentryError } from './utils/error';
123
- export { GLOBAL_OBJ } from './utils/worldwide';
124
- export { InternalGlobal } from './utils/worldwide';
125
- export { addConsoleInstrumentationHandler } from './instrument/console';
126
- export { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler } from './instrument/fetch';
127
- export { addGlobalErrorInstrumentationHandler } from './instrument/globalError';
128
- export { addGlobalUnhandledRejectionInstrumentationHandler } from './instrument/globalUnhandledRejection';
129
- export { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers } from './instrument/handlers';
130
- export { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isParameterizedString, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel, } from './utils/is';
131
- export { isBrowser } from './utils/isBrowser';
132
- export { CONSOLE_LEVELS, consoleSandbox, debug, originalConsoleMethods } from './utils/debug-logger';
133
- export { SentryDebugLogger } from './utils/debug-logger';
134
- export { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, checkOrSetAlreadyCaught, isAlreadyCaptured, getEventDescription, parseSemver, uuid4, } from './utils/misc';
135
- export { isNodeEnv, loadModule } from './utils/node';
136
- export { normalize, normalizeToSize, normalizeUrlToBase } from './utils/normalize';
137
- export { setNormalizationDepthOverrideHint, setSkipNormalizationHint } from './utils/normalizationHints';
138
- export { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, } from './utils/object';
139
- export { basename, dirname, isAbsolute, join, normalizePath, relative, resolve } from './utils/path';
140
- export { makePromiseBuffer, SENTRY_BUFFER_FULL_ERROR } from './utils/promisebuffer';
141
- export { PromiseBuffer } from './utils/promisebuffer';
142
- export { severityLevelFromString } from './utils/severity';
143
- export { replaceExports } from './utils/exports';
144
- export { UNKNOWN_FUNCTION, createStackParser, getFramesFromEvent, getFunctionName, stackParserFromStackParserOptions, stripSentryFramesAndReverse, } from './utils/stacktrace';
145
- export { filenameIsInApp, node, nodeStackLineParser } from './utils/node-stack-trace';
146
- export { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate } from './utils/string';
147
- export { isNativeFunction, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsHistory, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver, } from './utils/supports';
148
- export { SyncPromise, rejectedSyncPromise, resolvedSyncPromise } from './utils/syncpromise';
149
- export { browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds } from './utils/time';
150
- export { TRACEPARENT_REGEXP, extractTraceparentData, generateSentryTraceHeader, propagationContextFromHeaders, shouldContinueTrace, generateTraceparentHeader, } from './utils/tracing';
151
- export { getSDKSource, isBrowserBundle } from './utils/env';
152
- export { SdkSource } from './utils/env';
153
- export { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope, } from './utils/envelope';
154
- export { createClientReportEnvelope } from './utils/clientreport';
155
- export { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits, } from './utils/ratelimit';
156
- export { RateLimits } from './utils/ratelimit';
157
- export { MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader, parseBaggageHeader, objectToBaggageHeader, } from './utils/baggage';
158
- export { getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment, parseStringToURLObject, getHttpSpanDetailsFromUrlObject, isURLObjectRelative, getSanitizedUrlStringFromUrlObject, stripDataUrlContent, } from './utils/url';
159
- export { eventFromMessage, eventFromUnknownInput, exceptionFromError, parseStackFrames, _enhanceErrorWithSentryInfo as _INTERNAL_enhanceErrorWithSentryInfo, } from './utils/eventbuilder';
160
- export { callFrameToStackFrame, watchdogTimer } from './utils/anr';
161
- export { LRUMap } from './utils/lru';
162
- export { generateTraceId, generateSpanId } from './utils/propagationContext';
163
- export { vercelWaitUntil } from './utils/vercelWaitUntil';
164
- export { flushIfServerless } from './utils/flushIfServerless';
165
- export { SDK_VERSION } from './utils/version';
166
- export { getDebugImagesForResources, getFilenameToDebugIdMap } from './utils/debug-ids';
167
- export { getFilenameToMetadataMap } from './metadata';
168
- export { escapeStringForRegex } from './vendor/escapeStringForRegex';
169
- export { Attachment } from './types-hoist/attachment';
170
- export { Breadcrumb, BreadcrumbHint, FetchBreadcrumbData, XhrBreadcrumbData, FetchBreadcrumbHint, XhrBreadcrumbHint, } from './types-hoist/breadcrumb';
171
- export { ClientReport, Outcome, EventDropReason } from './types-hoist/clientreport';
172
- export { Context, Contexts, DeviceContext, OsContext, AppContext, CultureContext, TraceContext, CloudResourceContext, MissingInstrumentationContext, } from './types-hoist/context';
173
- export { DataCategory } from './types-hoist/datacategory';
174
- export { DsnComponents, DsnLike, DsnProtocol } from './types-hoist/dsn';
175
- export { DebugImage, DebugMeta } from './types-hoist/debugMeta';
176
- export { AttachmentItem, BaseEnvelopeHeaders, BaseEnvelopeItemHeaders, ClientReportEnvelope, ClientReportItem, DynamicSamplingContext, Envelope, EnvelopeItemType, EnvelopeItem, EventEnvelope, EventEnvelopeHeaders, EventItem, ReplayEnvelope, FeedbackItem, SessionEnvelope, SessionItem, UserFeedbackItem, CheckInItem, CheckInEnvelope, RawSecurityEnvelope, RawSecurityItem, ProfileItem, ProfileChunkEnvelope, ProfileChunkItem, SpanEnvelope, StreamedSpanEnvelope, SpanItem, LogEnvelope, MetricEnvelope, } from './types-hoist/envelope';
177
- export { ExtendedError } from './types-hoist/error';
178
- export { Event, EventHint, EventType, ErrorEvent, TransactionEvent } from './types-hoist/event';
179
- export { EventProcessor } from './types-hoist/eventprocessor';
180
- export { Exception } from './types-hoist/exception';
181
- export { Extra, Extras } from './types-hoist/extra';
182
- export { Integration, IntegrationFn } from './types-hoist/integration';
183
- export { Mechanism } from './types-hoist/mechanism';
184
- export { ExtractedNodeRequestData, HttpHeaderValue, Primitive, WorkerLocation } from './types-hoist/misc';
185
- export { ClientOptions, CoreOptions as Options, ServerRuntimeOptions } from './types-hoist/options';
186
- export { Package } from './types-hoist/package';
187
- export { PolymorphicEvent, PolymorphicRequest } from './types-hoist/polymorphics';
188
- export { ThreadId, FrameId, StackId, ThreadCpuSample, ThreadCpuStack, ThreadCpuFrame, ThreadCpuProfile, ContinuousThreadCpuProfile, Profile, ProfileChunk, } from './types-hoist/profiling';
189
- export { ReplayEndEvent, ReplayEvent, ReplayRecordingData, ReplayRecordingMode, ReplayStartEvent, ReplayStopReason, } from './types-hoist/replay';
190
- export { FeedbackErrorCode, FeedbackErrorMessages, FeedbackEvent, FeedbackFormData, FeedbackInternalOptions, FeedbackModalIntegration, FeedbackScreenshotIntegration, SendFeedback, SendFeedbackParams, UserFeedback, } from './types-hoist/feedback';
191
- export { QueryParams, RequestEventData, RequestHookInfo, ResponseHookInfo, SanitizedRequestData, } from './types-hoist/request';
192
- export { Runtime } from './types-hoist/runtime';
193
- export { SdkInfo } from './types-hoist/sdkinfo';
194
- export { SdkMetadata } from './types-hoist/sdkmetadata';
195
- export { SessionAggregates, AggregationCounts, Session, SessionContext, SessionStatus, SerializedSession, } from './types-hoist/session';
196
- export { SeverityLevel } from './types-hoist/severity';
197
- export { Span, SentrySpanArguments, SpanOrigin, SpanAttributeValue, SpanAttributes, SpanTimeInput, SpanJSON, SpanContextData, TraceFlag, SerializedStreamedSpan, SerializedStreamedSpanContainer, StreamedSpanJSON, } from './types-hoist/span';
198
- export { SpanStatus } from './types-hoist/spanStatus';
199
- export { Log, LogSeverityLevel } from './types-hoist/log';
200
- export { SpanLink } from './types-hoist/link';
201
- export { Metric, MetricType, SerializedMetric, SerializedMetricContainer, SerializedMetricAttributeValue, } from './types-hoist/metric';
202
- export { TimedEvent } from './types-hoist/timedEvent';
203
- export { StackFrame } from './types-hoist/stackframe';
204
- export { Stacktrace, StackParser, StackLineParser, StackLineParserFn } from './types-hoist/stacktrace';
205
- export { PropagationContext, TracePropagationTargets, SerializedTraceData } from './types-hoist/tracing';
206
- export { StartSpanOptions } from './types-hoist/startSpanOptions';
207
- export { TraceparentData, TransactionSource } from './types-hoist/transaction';
208
- export { TracesSamplerSamplingContext, CustomSamplingContext, SamplingContext, } from './types-hoist/samplingcontext';
209
- export { DurationUnit, InformationUnit, FractionUnit, MeasurementUnit, NoneUnit, Measurements, } from './types-hoist/measurement';
210
- export { Thread } from './types-hoist/thread';
211
- export { Transport, TransportRequest, TransportMakeRequestResponse, InternalBaseTransportOptions, BaseTransportOptions, TransportRequestExecutor, } from './types-hoist/transport';
212
- export { User } from './types-hoist/user';
213
- export { WebFetchHeaders, WebFetchRequest } from './types-hoist/webfetchapi';
214
- export { WrappedFunction } from './types-hoist/wrappedfunction';
215
- export { HandlerDataFetch, HandlerDataXhr, HandlerDataDom, HandlerDataConsole, HandlerDataHistory, HandlerDataError, HandlerDataUnhandledRejection, ConsoleLevel, SentryXhrData, SentryWrappedXMLHttpRequest, } from './types-hoist/instrument';
216
- export { BrowserClientReplayOptions, BrowserClientProfilingOptions } from './types-hoist/browseroptions';
217
- export { CheckIn, MonitorConfig, FinishedCheckIn, InProgressCheckIn, SerializedCheckIn, } from './types-hoist/checkin';
218
- export { ParameterizedString } from './types-hoist/parameterize';
219
- export { ContinuousProfiler, ProfilingIntegration, Profiler } from './types-hoist/profiling';
220
- export { ViewHierarchyData, ViewHierarchyWindow } from './types-hoist/view-hierarchy';
221
- export { LegacyCSPReport } from './types-hoist/csp';
222
- export { SerializedLog, SerializedLogContainer } from './types-hoist/log';
223
- export { BuildTimeOptionsBase, UnstableVitePluginOptions, UnstableRollupPluginOptions, UnstableWebpackPluginOptions, } from './build-time-plugins/buildTimeOptionsBase';
224
- export { withRandomSafeContext as _INTERNAL_withRandomSafeContext, RandomSafeContextRunner as _INTERNAL_RandomSafeContextRunner, safeMathRandom as _INTERNAL_safeMathRandom, safeDateNow as _INTERNAL_safeDateNow } from './utils/randomSafeContext';
225
- export { safeUnref as _INTERNAL_safeUnref } from './utils/timer';
1
+ export * from './shared-exports';
2
+ export * from './server-exports';
3
+ export * from './browser-exports';
226
4
  //# sourceMappingURL=index.d.ts.map
@@ -7,4 +7,11 @@ import { HandlerDataConsole } from '../types-hoist/instrument';
7
7
  * @hidden
8
8
  */
9
9
  export declare function addConsoleInstrumentationHandler(handler: (data: HandlerDataConsole) => void): () => void;
10
+ /**
11
+ * Add a filter to the console instrumentation to filter out console messages that match the given strings or regular expressions.
12
+ * Returns a function to remove the filter.
13
+ */
14
+ export declare function addConsoleInstrumentationFilter(filter: (string | RegExp)[]): () => void;
15
+ /** Only exported for tests. */
16
+ export declare function _INTERNAL_resetConsoleInstrumentationOptions(): void;
10
17
  //# sourceMappingURL=console.d.ts.map
@@ -11,6 +11,6 @@ interface CaptureConsoleOptions {
11
11
  /**
12
12
  * Send Console API calls as Sentry Events.
13
13
  */
14
- export declare const captureConsoleIntegration: (options?: CaptureConsoleOptions | undefined) => import("../types-hoist/integration").Integration;
14
+ export declare const captureConsoleIntegration: (options?: CaptureConsoleOptions | undefined) => import("..").Integration;
15
15
  export {};
16
16
  //# sourceMappingURL=captureconsole.d.ts.map
@@ -1,6 +1,11 @@
1
1
  import { ConsoleLevel } from '../types-hoist/instrument';
2
2
  interface ConsoleIntegrationOptions {
3
3
  levels: ConsoleLevel[];
4
+ /**
5
+ * Filter out console messages that match the given strings or regular expressions.
6
+ * These will neither be passed to the handler, and they will also not be logged to the user, unless they have debug enabled.
7
+ */
8
+ filter?: (string | RegExp)[];
4
9
  }
5
10
  /**
6
11
  * Captures calls to the `console` API as breadcrumbs in Sentry.
@@ -5,5 +5,5 @@
5
5
  * and applies it to spans when they start. This ensures the conversation ID is
6
6
  * available for all AI-related operations.
7
7
  */
8
- export declare const conversationIdIntegration: () => import("../types-hoist/integration").Integration;
8
+ export declare const conversationIdIntegration: () => import("..").Integration;
9
9
  //# sourceMappingURL=conversationId.d.ts.map
@@ -2,7 +2,7 @@ import { Event } from '../types-hoist/event';
2
2
  /**
3
3
  * Deduplication filter.
4
4
  */
5
- export declare const dedupeIntegration: () => import("../types-hoist/integration").Integration;
5
+ export declare const dedupeIntegration: () => import("..").Integration;
6
6
  /** only exported for tests. */
7
7
  export declare function _shouldDropEvent(currentEvent: Event, previousEvent?: Event): boolean;
8
8
  //# sourceMappingURL=dedupe.d.ts.map
@@ -20,7 +20,7 @@ export interface EventFiltersOptions {
20
20
  *
21
21
  * Events filtered by this integration will not be sent to Sentry.
22
22
  */
23
- export declare const eventFiltersIntegration: (options?: Partial<EventFiltersOptions> | undefined) => import("../types-hoist/integration").Integration;
23
+ export declare const eventFiltersIntegration: (options?: Partial<EventFiltersOptions> | undefined) => import("..").Integration;
24
24
  /**
25
25
  * An integration that filters out events (errors and transactions) based on:
26
26
  *
@@ -37,5 +37,5 @@ export declare const eventFiltersIntegration: (options?: Partial<EventFiltersOpt
37
37
  * @deprecated this integration was renamed and will be removed in a future major version.
38
38
  * Use `eventFiltersIntegration` instead.
39
39
  */
40
- export declare const inboundFiltersIntegration: (options?: Partial<EventFiltersOptions> | undefined) => import("../types-hoist/integration").Integration;
40
+ export declare const inboundFiltersIntegration: (options?: Partial<EventFiltersOptions> | undefined) => import("..").Integration;
41
41
  //# sourceMappingURL=eventFilters.d.ts.map
@@ -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
@@ -10,6 +10,6 @@ interface ExtraErrorDataOptions {
10
10
  */
11
11
  captureErrorCause: boolean;
12
12
  }
13
- export declare const extraErrorDataIntegration: (options?: Partial<ExtraErrorDataOptions> | undefined) => import("../types-hoist/integration").Integration;
13
+ export declare const extraErrorDataIntegration: (options?: Partial<ExtraErrorDataOptions> | undefined) => import("..").Integration;
14
14
  export {};
15
15
  //# sourceMappingURL=extraerrordata.d.ts.map
@@ -9,5 +9,5 @@
9
9
  * });
10
10
  * ```
11
11
  */
12
- export declare const functionToStringIntegration: () => import("../types-hoist/integration").Integration;
12
+ export declare const functionToStringIntegration: () => import("..").Integration;
13
13
  //# sourceMappingURL=functiontostring.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