@sentry/core 10.53.1 → 10.54.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 (1517) hide show
  1. package/build/cjs/api.js +10 -34
  2. package/build/cjs/api.js.map +1 -1
  3. package/build/cjs/asyncContext/index.js +0 -14
  4. package/build/cjs/asyncContext/index.js.map +1 -1
  5. package/build/cjs/asyncContext/stackStrategy.js +16 -47
  6. package/build/cjs/asyncContext/stackStrategy.js.map +1 -1
  7. package/build/cjs/attributes.js +17 -95
  8. package/build/cjs/attributes.js.map +1 -1
  9. package/build/cjs/breadcrumbs.js +2 -22
  10. package/build/cjs/breadcrumbs.js.map +1 -1
  11. package/build/cjs/browser.js +12 -3
  12. package/build/cjs/browser.js.map +1 -1
  13. package/build/cjs/carrier.js +5 -42
  14. package/build/cjs/carrier.js.map +1 -1
  15. package/build/cjs/checkin.js +5 -19
  16. package/build/cjs/checkin.js.map +1 -1
  17. package/build/cjs/client.js +216 -585
  18. package/build/cjs/client.js.map +1 -1
  19. package/build/cjs/constants.js +2 -2
  20. package/build/cjs/currentScopes.js +5 -86
  21. package/build/cjs/currentScopes.js.map +1 -1
  22. package/build/cjs/debug-build.js +0 -5
  23. package/build/cjs/debug-build.js.map +1 -1
  24. package/build/cjs/defaultScopes.js +2 -5
  25. package/build/cjs/defaultScopes.js.map +1 -1
  26. package/build/cjs/envelope.js +32 -103
  27. package/build/cjs/envelope.js.map +1 -1
  28. package/build/cjs/eventProcessors.js +4 -23
  29. package/build/cjs/eventProcessors.js.map +1 -1
  30. package/build/cjs/exports.js +21 -197
  31. package/build/cjs/exports.js.map +1 -1
  32. package/build/cjs/feedback.js +7 -19
  33. package/build/cjs/feedback.js.map +1 -1
  34. package/build/cjs/fetch.js +66 -201
  35. package/build/cjs/fetch.js.map +1 -1
  36. package/build/cjs/index.js +17 -3
  37. package/build/cjs/index.js.map +1 -1
  38. package/build/cjs/instrument/console.js +9 -41
  39. package/build/cjs/instrument/console.js.map +1 -1
  40. package/build/cjs/instrument/fetch.js +47 -156
  41. package/build/cjs/instrument/fetch.js.map +1 -1
  42. package/build/cjs/instrument/globalError.js +4 -25
  43. package/build/cjs/instrument/globalError.js.map +1 -1
  44. package/build/cjs/instrument/globalUnhandledRejection.js +4 -21
  45. package/build/cjs/instrument/globalUnhandledRejection.js.map +1 -1
  46. package/build/cjs/instrument/handlers.js +9 -21
  47. package/build/cjs/instrument/handlers.js.map +1 -1
  48. package/build/cjs/integration.js +13 -77
  49. package/build/cjs/integration.js.map +1 -1
  50. package/build/cjs/integrations/captureconsole.js +16 -40
  51. package/build/cjs/integrations/captureconsole.js.map +1 -1
  52. package/build/cjs/integrations/consola.js +57 -163
  53. package/build/cjs/integrations/consola.js.map +1 -1
  54. package/build/cjs/integrations/console.js +11 -43
  55. package/build/cjs/integrations/console.js.map +1 -1
  56. package/build/cjs/integrations/conversationId.js +5 -22
  57. package/build/cjs/integrations/conversationId.js.map +1 -1
  58. package/build/cjs/integrations/dedupe.js +16 -74
  59. package/build/cjs/integrations/dedupe.js.map +1 -1
  60. package/build/cjs/integrations/eventFilters.js +63 -114
  61. package/build/cjs/integrations/eventFilters.js.map +1 -1
  62. package/build/cjs/integrations/express/index.js +30 -145
  63. package/build/cjs/integrations/express/index.js.map +1 -1
  64. package/build/cjs/integrations/express/patch-layer.js +20 -130
  65. package/build/cjs/integrations/express/patch-layer.js.map +1 -1
  66. package/build/cjs/integrations/express/request-layer-store.js +1 -3
  67. package/build/cjs/integrations/express/request-layer-store.js.map +1 -1
  68. package/build/cjs/integrations/express/set-sdk-processing-metadata.js +0 -2
  69. package/build/cjs/integrations/express/set-sdk-processing-metadata.js.map +1 -1
  70. package/build/cjs/integrations/express/types.js +6 -7
  71. package/build/cjs/integrations/express/types.js.map +1 -1
  72. package/build/cjs/integrations/express/utils.js +37 -145
  73. package/build/cjs/integrations/express/utils.js.map +1 -1
  74. package/build/cjs/integrations/extraerrordata.js +24 -69
  75. package/build/cjs/integrations/extraerrordata.js.map +1 -1
  76. package/build/cjs/integrations/featureFlags/featureFlagsIntegration.js +3 -29
  77. package/build/cjs/integrations/featureFlags/featureFlagsIntegration.js.map +1 -1
  78. package/build/cjs/integrations/featureFlags/growthbook.js +11 -40
  79. package/build/cjs/integrations/featureFlags/growthbook.js.map +1 -1
  80. package/build/cjs/integrations/functiontostring.js +6 -27
  81. package/build/cjs/integrations/functiontostring.js.map +1 -1
  82. package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js +10 -18
  83. package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -1
  84. package/build/cjs/integrations/http/client-patch.js +8 -70
  85. package/build/cjs/integrations/http/client-patch.js.map +1 -1
  86. package/build/cjs/integrations/http/client-subscriptions.js +22 -59
  87. package/build/cjs/integrations/http/client-subscriptions.js.map +1 -1
  88. package/build/cjs/integrations/http/constants.js +3 -3
  89. package/build/cjs/integrations/http/double-wrap-warning.js +10 -18
  90. package/build/cjs/integrations/http/double-wrap-warning.js.map +1 -1
  91. package/build/cjs/integrations/http/get-outgoing-span-data.js +30 -47
  92. package/build/cjs/integrations/http/get-outgoing-span-data.js.map +1 -1
  93. package/build/cjs/integrations/http/get-request-url.js +7 -24
  94. package/build/cjs/integrations/http/get-request-url.js.map +1 -1
  95. package/build/cjs/integrations/http/inject-trace-propagation-headers.js +14 -38
  96. package/build/cjs/integrations/http/inject-trace-propagation-headers.js.map +1 -1
  97. package/build/cjs/integrations/http/patch-request-to-capture-body.js +80 -0
  98. package/build/cjs/integrations/http/patch-request-to-capture-body.js.map +1 -0
  99. package/build/cjs/integrations/http/record-request-session.js +61 -0
  100. package/build/cjs/integrations/http/record-request-session.js.map +1 -0
  101. package/build/cjs/integrations/http/server-subscription.js +289 -0
  102. package/build/cjs/integrations/http/server-subscription.js.map +1 -0
  103. package/build/cjs/integrations/linkederrors.js +6 -11
  104. package/build/cjs/integrations/linkederrors.js.map +1 -1
  105. package/build/cjs/integrations/mcp-server/attributeExtraction.js +26 -69
  106. package/build/cjs/integrations/mcp-server/attributeExtraction.js.map +1 -1
  107. package/build/cjs/integrations/mcp-server/attributes.js +30 -138
  108. package/build/cjs/integrations/mcp-server/attributes.js.map +1 -1
  109. package/build/cjs/integrations/mcp-server/correlation.js +20 -91
  110. package/build/cjs/integrations/mcp-server/correlation.js.map +1 -1
  111. package/build/cjs/integrations/mcp-server/errorCapture.js +6 -25
  112. package/build/cjs/integrations/mcp-server/errorCapture.js.map +1 -1
  113. package/build/cjs/integrations/mcp-server/handlers.js +55 -169
  114. package/build/cjs/integrations/mcp-server/handlers.js.map +1 -1
  115. package/build/cjs/integrations/mcp-server/index.js +7 -60
  116. package/build/cjs/integrations/mcp-server/index.js.map +1 -1
  117. package/build/cjs/integrations/mcp-server/methodConfig.js +21 -59
  118. package/build/cjs/integrations/mcp-server/methodConfig.js.map +1 -1
  119. package/build/cjs/integrations/mcp-server/piiFiltering.js +5 -33
  120. package/build/cjs/integrations/mcp-server/piiFiltering.js.map +1 -1
  121. package/build/cjs/integrations/mcp-server/resultExtraction.js +20 -76
  122. package/build/cjs/integrations/mcp-server/resultExtraction.js.map +1 -1
  123. package/build/cjs/integrations/mcp-server/sessionExtraction.js +30 -121
  124. package/build/cjs/integrations/mcp-server/sessionExtraction.js.map +1 -1
  125. package/build/cjs/integrations/mcp-server/sessionManagement.js +2 -60
  126. package/build/cjs/integrations/mcp-server/sessionManagement.js.map +1 -1
  127. package/build/cjs/integrations/mcp-server/spans.js +20 -107
  128. package/build/cjs/integrations/mcp-server/spans.js.map +1 -1
  129. package/build/cjs/integrations/mcp-server/transport.js +26 -94
  130. package/build/cjs/integrations/mcp-server/transport.js.map +1 -1
  131. package/build/cjs/integrations/mcp-server/validation.js +6 -72
  132. package/build/cjs/integrations/mcp-server/validation.js.map +1 -1
  133. package/build/cjs/integrations/moduleMetadata.js +6 -20
  134. package/build/cjs/integrations/moduleMetadata.js.map +1 -1
  135. package/build/cjs/integrations/postgresjs.js +78 -287
  136. package/build/cjs/integrations/postgresjs.js.map +1 -1
  137. package/build/cjs/integrations/requestdata.js +30 -93
  138. package/build/cjs/integrations/requestdata.js.map +1 -1
  139. package/build/cjs/integrations/rewriteframes.js +14 -45
  140. package/build/cjs/integrations/rewriteframes.js.map +1 -1
  141. package/build/cjs/integrations/spanStreaming.js +9 -15
  142. package/build/cjs/integrations/spanStreaming.js.map +1 -1
  143. package/build/cjs/integrations/supabase.js +224 -333
  144. package/build/cjs/integrations/supabase.js.map +1 -1
  145. package/build/cjs/integrations/third-party-errors-filter.js +60 -85
  146. package/build/cjs/integrations/third-party-errors-filter.js.map +1 -1
  147. package/build/cjs/integrations/zoderrors.js +35 -111
  148. package/build/cjs/integrations/zoderrors.js.map +1 -1
  149. package/build/cjs/logs/console-integration.js +15 -50
  150. package/build/cjs/logs/console-integration.js.map +1 -1
  151. package/build/cjs/logs/constants.js +1 -6
  152. package/build/cjs/logs/constants.js.map +1 -1
  153. package/build/cjs/logs/envelope.js +10 -40
  154. package/build/cjs/logs/envelope.js.map +1 -1
  155. package/build/cjs/logs/internal.js +53 -125
  156. package/build/cjs/logs/internal.js.map +1 -1
  157. package/build/cjs/logs/public-api.js +13 -228
  158. package/build/cjs/logs/public-api.js.map +1 -1
  159. package/build/cjs/logs/utils.js +6 -47
  160. package/build/cjs/logs/utils.js.map +1 -1
  161. package/build/cjs/metadata.js +6 -51
  162. package/build/cjs/metadata.js.map +1 -1
  163. package/build/cjs/metrics/envelope.js +12 -45
  164. package/build/cjs/metrics/envelope.js.map +1 -1
  165. package/build/cjs/metrics/internal.js +31 -144
  166. package/build/cjs/metrics/internal.js.map +1 -1
  167. package/build/cjs/metrics/public-api.js +4 -109
  168. package/build/cjs/metrics/public-api.js.map +1 -1
  169. package/build/cjs/profiling.js +11 -41
  170. package/build/cjs/profiling.js.map +1 -1
  171. package/build/cjs/scope.js +73 -224
  172. package/build/cjs/scope.js.map +1 -1
  173. package/build/cjs/sdk.js +2 -21
  174. package/build/cjs/sdk.js.map +1 -1
  175. package/build/cjs/semanticAttributes.js +30 -116
  176. package/build/cjs/semanticAttributes.js.map +1 -1
  177. package/build/cjs/server-runtime-client.js +32 -87
  178. package/build/cjs/server-runtime-client.js.map +1 -1
  179. package/build/cjs/server.js +17 -3
  180. package/build/cjs/server.js.map +1 -1
  181. package/build/cjs/session.js +14 -67
  182. package/build/cjs/session.js.map +1 -1
  183. package/build/cjs/tracing/ai/gen-ai-attributes.js +45 -249
  184. package/build/cjs/tracing/ai/gen-ai-attributes.js.map +1 -1
  185. package/build/cjs/tracing/ai/mediaStripping.js +21 -116
  186. package/build/cjs/tracing/ai/mediaStripping.js.map +1 -1
  187. package/build/cjs/tracing/ai/messageTruncation.js +26 -212
  188. package/build/cjs/tracing/ai/messageTruncation.js.map +1 -1
  189. package/build/cjs/tracing/ai/utils.js +40 -180
  190. package/build/cjs/tracing/ai/utils.js.map +1 -1
  191. package/build/cjs/tracing/anthropic-ai/constants.js +9 -12
  192. package/build/cjs/tracing/anthropic-ai/constants.js.map +1 -1
  193. package/build/cjs/tracing/anthropic-ai/index.js +67 -172
  194. package/build/cjs/tracing/anthropic-ai/index.js.map +1 -1
  195. package/build/cjs/tracing/anthropic-ai/streaming.js +45 -149
  196. package/build/cjs/tracing/anthropic-ai/streaming.js.map +1 -1
  197. package/build/cjs/tracing/anthropic-ai/utils.js +17 -47
  198. package/build/cjs/tracing/anthropic-ai/utils.js.map +1 -1
  199. package/build/cjs/tracing/dynamicSamplingContext.js +18 -85
  200. package/build/cjs/tracing/dynamicSamplingContext.js.map +1 -1
  201. package/build/cjs/tracing/errors.js +2 -14
  202. package/build/cjs/tracing/errors.js.map +1 -1
  203. package/build/cjs/tracing/google-genai/constants.js +9 -16
  204. package/build/cjs/tracing/google-genai/constants.js.map +1 -1
  205. package/build/cjs/tracing/google-genai/index.js +79 -223
  206. package/build/cjs/tracing/google-genai/index.js.map +1 -1
  207. package/build/cjs/tracing/google-genai/streaming.js +11 -56
  208. package/build/cjs/tracing/google-genai/streaming.js.map +1 -1
  209. package/build/cjs/tracing/google-genai/utils.js +8 -13
  210. package/build/cjs/tracing/google-genai/utils.js.map +1 -1
  211. package/build/cjs/tracing/idleSpan.js +48 -174
  212. package/build/cjs/tracing/idleSpan.js.map +1 -1
  213. package/build/cjs/tracing/langchain/constants.js +8 -9
  214. package/build/cjs/tracing/langchain/constants.js.map +1 -1
  215. package/build/cjs/tracing/langchain/embeddings.js +31 -75
  216. package/build/cjs/tracing/langchain/embeddings.js.map +1 -1
  217. package/build/cjs/tracing/langchain/index.js +64 -161
  218. package/build/cjs/tracing/langchain/index.js.map +1 -1
  219. package/build/cjs/tracing/langchain/utils.js +101 -311
  220. package/build/cjs/tracing/langchain/utils.js.map +1 -1
  221. package/build/cjs/tracing/langgraph/constants.js +2 -2
  222. package/build/cjs/tracing/langgraph/index.js +57 -160
  223. package/build/cjs/tracing/langgraph/index.js.map +1 -1
  224. package/build/cjs/tracing/langgraph/utils.js +53 -170
  225. package/build/cjs/tracing/langgraph/utils.js.map +1 -1
  226. package/build/cjs/tracing/logSpans.js +10 -26
  227. package/build/cjs/tracing/logSpans.js.map +1 -1
  228. package/build/cjs/tracing/measurement.js +6 -18
  229. package/build/cjs/tracing/measurement.js.map +1 -1
  230. package/build/cjs/tracing/openai/constants.js +20 -24
  231. package/build/cjs/tracing/openai/constants.js.map +1 -1
  232. package/build/cjs/tracing/openai/index.js +52 -132
  233. package/build/cjs/tracing/openai/index.js.map +1 -1
  234. package/build/cjs/tracing/openai/streaming.js +24 -102
  235. package/build/cjs/tracing/openai/streaming.js.map +1 -1
  236. package/build/cjs/tracing/openai/utils.js +36 -107
  237. package/build/cjs/tracing/openai/utils.js.map +1 -1
  238. package/build/cjs/tracing/sampling.js +23 -63
  239. package/build/cjs/tracing/sampling.js.map +1 -1
  240. package/build/cjs/tracing/sentryNonRecordingSpan.js +15 -40
  241. package/build/cjs/tracing/sentryNonRecordingSpan.js.map +1 -1
  242. package/build/cjs/tracing/sentrySpan.js +66 -172
  243. package/build/cjs/tracing/sentrySpan.js.map +1 -1
  244. package/build/cjs/tracing/spans/beforeSendSpan.js +4 -32
  245. package/build/cjs/tracing/spans/beforeSendSpan.js.map +1 -1
  246. package/build/cjs/tracing/spans/captureSpan.js +58 -156
  247. package/build/cjs/tracing/spans/captureSpan.js.map +1 -1
  248. package/build/cjs/tracing/spans/envelope.js +12 -24
  249. package/build/cjs/tracing/spans/envelope.js.map +1 -1
  250. package/build/cjs/tracing/spans/estimateSize.js +0 -22
  251. package/build/cjs/tracing/spans/estimateSize.js.map +1 -1
  252. package/build/cjs/tracing/spans/extractGenAiSpans.js +11 -33
  253. package/build/cjs/tracing/spans/extractGenAiSpans.js.map +1 -1
  254. package/build/cjs/tracing/spans/hasSpanStreamingEnabled.js +1 -4
  255. package/build/cjs/tracing/spans/hasSpanStreamingEnabled.js.map +1 -1
  256. package/build/cjs/tracing/spans/scopeContextAttributes.js +58 -0
  257. package/build/cjs/tracing/spans/scopeContextAttributes.js.map +1 -0
  258. package/build/cjs/tracing/spans/spanBuffer.js +21 -71
  259. package/build/cjs/tracing/spans/spanBuffer.js.map +1 -1
  260. package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js +4 -8
  261. package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js.map +1 -1
  262. package/build/cjs/tracing/spanstatus.js +15 -32
  263. package/build/cjs/tracing/spanstatus.js.map +1 -1
  264. package/build/cjs/tracing/trace.js +95 -311
  265. package/build/cjs/tracing/trace.js.map +1 -1
  266. package/build/cjs/tracing/utils.js +4 -14
  267. package/build/cjs/tracing/utils.js.map +1 -1
  268. package/build/cjs/tracing/vercel-ai/constants.js +15 -26
  269. package/build/cjs/tracing/vercel-ai/constants.js.map +1 -1
  270. package/build/cjs/tracing/vercel-ai/index.js +84 -288
  271. package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
  272. package/build/cjs/tracing/vercel-ai/utils.js +30 -128
  273. package/build/cjs/tracing/vercel-ai/utils.js.map +1 -1
  274. package/build/cjs/tracing/vercel-ai/vercel-ai-attributes.js +22 -229
  275. package/build/cjs/tracing/vercel-ai/vercel-ai-attributes.js.map +1 -1
  276. package/build/cjs/transports/base.js +32 -67
  277. package/build/cjs/transports/base.js.map +1 -1
  278. package/build/cjs/transports/multiplexed.js +38 -103
  279. package/build/cjs/transports/multiplexed.js.map +1 -1
  280. package/build/cjs/transports/offline.js +31 -72
  281. package/build/cjs/transports/offline.js.map +1 -1
  282. package/build/cjs/transports/userAgent.js +4 -13
  283. package/build/cjs/transports/userAgent.js.map +1 -1
  284. package/build/cjs/trpc.js +19 -39
  285. package/build/cjs/trpc.js.map +1 -1
  286. package/build/cjs/utils/aggregate-errors.js +18 -62
  287. package/build/cjs/utils/aggregate-errors.js.map +1 -1
  288. package/build/cjs/utils/ai/providerSkip.js +3 -50
  289. package/build/cjs/utils/ai/providerSkip.js.map +1 -1
  290. package/build/cjs/utils/anr.js +7 -36
  291. package/build/cjs/utils/anr.js.map +1 -1
  292. package/build/cjs/utils/baggage.js +37 -146
  293. package/build/cjs/utils/baggage.js.map +1 -1
  294. package/build/cjs/utils/breadcrumb-log-level.js +5 -9
  295. package/build/cjs/utils/breadcrumb-log-level.js.map +1 -1
  296. package/build/cjs/utils/browser.js +24 -86
  297. package/build/cjs/utils/browser.js.map +1 -1
  298. package/build/cjs/utils/chain-and-copy-promiselike.js +10 -27
  299. package/build/cjs/utils/chain-and-copy-promiselike.js.map +1 -1
  300. package/build/cjs/utils/clientreport.js +4 -13
  301. package/build/cjs/utils/clientreport.js.map +1 -1
  302. package/build/cjs/utils/cookie.js +6 -53
  303. package/build/cjs/utils/cookie.js.map +1 -1
  304. package/build/cjs/utils/data-collection/defaultPiiToCollectionOptions.js +28 -0
  305. package/build/cjs/utils/data-collection/defaultPiiToCollectionOptions.js.map +1 -0
  306. package/build/cjs/utils/data-collection/filterCookies.js +23 -0
  307. package/build/cjs/utils/data-collection/filterCookies.js.map +1 -0
  308. package/build/cjs/utils/data-collection/filterKeyValueData.js +43 -0
  309. package/build/cjs/utils/data-collection/filterKeyValueData.js.map +1 -0
  310. package/build/cjs/utils/data-collection/filterQueryParams.js +26 -0
  311. package/build/cjs/utils/data-collection/filterQueryParams.js.map +1 -0
  312. package/build/cjs/utils/data-collection/filtering-snippets.js +61 -0
  313. package/build/cjs/utils/data-collection/filtering-snippets.js.map +1 -0
  314. package/build/cjs/utils/data-collection/resolveDataCollectionOptions.js +37 -0
  315. package/build/cjs/utils/data-collection/resolveDataCollectionOptions.js.map +1 -0
  316. package/build/cjs/utils/debounce.js +5 -32
  317. package/build/cjs/utils/debounce.js.map +1 -1
  318. package/build/cjs/utils/debug-ids.js +4 -42
  319. package/build/cjs/utils/debug-ids.js.map +1 -1
  320. package/build/cjs/utils/debug-logger.js +23 -56
  321. package/build/cjs/utils/debug-logger.js.map +1 -1
  322. package/build/cjs/utils/dsn.js +18 -81
  323. package/build/cjs/utils/dsn.js.map +1 -1
  324. package/build/cjs/utils/env.js +3 -27
  325. package/build/cjs/utils/env.js.map +1 -1
  326. package/build/cjs/utils/envToBool.js +2 -15
  327. package/build/cjs/utils/envToBool.js.map +1 -1
  328. package/build/cjs/utils/envelope.js +39 -133
  329. package/build/cjs/utils/envelope.js.map +1 -1
  330. package/build/cjs/utils/error.js +3 -10
  331. package/build/cjs/utils/error.js.map +1 -1
  332. package/build/cjs/utils/eventUtils.js +0 -8
  333. package/build/cjs/utils/eventUtils.js.map +1 -1
  334. package/build/cjs/utils/eventbuilder.js +30 -114
  335. package/build/cjs/utils/eventbuilder.js.map +1 -1
  336. package/build/cjs/utils/exports.js +5 -24
  337. package/build/cjs/utils/exports.js.map +1 -1
  338. package/build/cjs/utils/featureFlags.js +10 -96
  339. package/build/cjs/utils/featureFlags.js.map +1 -1
  340. package/build/cjs/utils/flushIfServerless.js +14 -48
  341. package/build/cjs/utils/flushIfServerless.js.map +1 -1
  342. package/build/cjs/utils/get-default-export.js +1 -25
  343. package/build/cjs/utils/get-default-export.js.map +1 -1
  344. package/build/cjs/utils/handleCallbackErrors.js +10 -48
  345. package/build/cjs/utils/handleCallbackErrors.js.map +1 -1
  346. package/build/cjs/utils/hasSpansEnabled.js +4 -28
  347. package/build/cjs/utils/hasSpansEnabled.js.map +1 -1
  348. package/build/cjs/utils/ipAddress.js +7 -19
  349. package/build/cjs/utils/ipAddress.js.map +1 -1
  350. package/build/cjs/utils/is.js +18 -163
  351. package/build/cjs/utils/is.js.map +1 -1
  352. package/build/cjs/utils/isBrowser.js +3 -9
  353. package/build/cjs/utils/isBrowser.js.map +1 -1
  354. package/build/cjs/utils/isSentryRequestUrl.js +2 -19
  355. package/build/cjs/utils/isSentryRequestUrl.js.map +1 -1
  356. package/build/cjs/utils/lru.js +13 -24
  357. package/build/cjs/utils/lru.js.map +1 -1
  358. package/build/cjs/utils/merge.js +1 -17
  359. package/build/cjs/utils/merge.js.map +1 -1
  360. package/build/cjs/utils/meta.js +1 -24
  361. package/build/cjs/utils/meta.js.map +1 -1
  362. package/build/cjs/utils/misc.js +31 -134
  363. package/build/cjs/utils/misc.js.map +1 -1
  364. package/build/cjs/utils/node-stack-trace.js +22 -61
  365. package/build/cjs/utils/node-stack-trace.js.map +1 -1
  366. package/build/cjs/utils/node.js +3 -48
  367. package/build/cjs/utils/node.js.map +1 -1
  368. package/build/cjs/utils/normalizationHints.js +5 -18
  369. package/build/cjs/utils/normalizationHints.js.map +1 -1
  370. package/build/cjs/utils/normalize.js +39 -205
  371. package/build/cjs/utils/normalize.js.map +1 -1
  372. package/build/cjs/utils/object.js +33 -168
  373. package/build/cjs/utils/object.js.map +1 -1
  374. package/build/cjs/utils/parameterize.js +2 -21
  375. package/build/cjs/utils/parameterize.js.map +1 -1
  376. package/build/cjs/utils/parseSampleRate.js +4 -13
  377. package/build/cjs/utils/parseSampleRate.js.map +1 -1
  378. package/build/cjs/utils/path.js +28 -115
  379. package/build/cjs/utils/path.js.map +1 -1
  380. package/build/cjs/utils/prepareEvent.js +53 -191
  381. package/build/cjs/utils/prepareEvent.js.map +1 -1
  382. package/build/cjs/utils/promisebuffer.js +5 -47
  383. package/build/cjs/utils/promisebuffer.js.map +1 -1
  384. package/build/cjs/utils/propagationContext.js +0 -7
  385. package/build/cjs/utils/propagationContext.js.map +1 -1
  386. package/build/cjs/utils/randomSafeContext.js +3 -22
  387. package/build/cjs/utils/randomSafeContext.js.map +1 -1
  388. package/build/cjs/utils/ratelimit.js +13 -66
  389. package/build/cjs/utils/ratelimit.js.map +1 -1
  390. package/build/cjs/utils/request.js +62 -269
  391. package/build/cjs/utils/request.js.map +1 -1
  392. package/build/cjs/utils/scopeData.js +15 -79
  393. package/build/cjs/utils/scopeData.js.map +1 -1
  394. package/build/cjs/utils/sdkMetadata.js +5 -19
  395. package/build/cjs/utils/sdkMetadata.js.map +1 -1
  396. package/build/cjs/utils/severity.js +1 -9
  397. package/build/cjs/utils/severity.js.map +1 -1
  398. package/build/cjs/utils/should-ignore-span.js +6 -38
  399. package/build/cjs/utils/should-ignore-span.js.map +1 -1
  400. package/build/cjs/utils/spanOnScope.js +3 -14
  401. package/build/cjs/utils/spanOnScope.js.map +1 -1
  402. package/build/cjs/utils/spanUtils.js +42 -222
  403. package/build/cjs/utils/spanUtils.js.map +1 -1
  404. package/build/cjs/utils/stacktrace.js +19 -106
  405. package/build/cjs/utils/stacktrace.js.map +1 -1
  406. package/build/cjs/utils/string.js +7 -75
  407. package/build/cjs/utils/string.js.map +1 -1
  408. package/build/cjs/utils/supports.js +14 -99
  409. package/build/cjs/utils/supports.js.map +1 -1
  410. package/build/cjs/utils/syncpromise.js +19 -68
  411. package/build/cjs/utils/syncpromise.js.map +1 -1
  412. package/build/cjs/utils/time.js +7 -84
  413. package/build/cjs/utils/time.js.map +1 -1
  414. package/build/cjs/utils/timer.js +1 -10
  415. package/build/cjs/utils/timer.js.map +1 -1
  416. package/build/cjs/utils/timestampSequence.js +5 -21
  417. package/build/cjs/utils/timestampSequence.js.map +1 -1
  418. package/build/cjs/utils/trace-info.js +3 -10
  419. package/build/cjs/utils/trace-info.js.map +1 -1
  420. package/build/cjs/utils/traceData.js +4 -39
  421. package/build/cjs/utils/traceData.js.map +1 -1
  422. package/build/cjs/utils/tracePropagationTargets.js +4 -18
  423. package/build/cjs/utils/tracePropagationTargets.js.map +1 -1
  424. package/build/cjs/utils/tracing.js +32 -106
  425. package/build/cjs/utils/tracing.js.map +1 -1
  426. package/build/cjs/utils/transactionEvent.js +11 -19
  427. package/build/cjs/utils/transactionEvent.js.map +1 -1
  428. package/build/cjs/utils/tunnel.js +12 -33
  429. package/build/cjs/utils/tunnel.js.map +1 -1
  430. package/build/cjs/utils/url.js +42 -176
  431. package/build/cjs/utils/url.js.map +1 -1
  432. package/build/cjs/utils/vercelWaitUntil.js +4 -12
  433. package/build/cjs/utils/vercelWaitUntil.js.map +1 -1
  434. package/build/cjs/utils/version.js +1 -3
  435. package/build/cjs/utils/version.js.map +1 -1
  436. package/build/cjs/utils/weakRef.js +5 -36
  437. package/build/cjs/utils/weakRef.js.map +1 -1
  438. package/build/cjs/utils/worldwide.js +1 -4
  439. package/build/cjs/utils/worldwide.js.map +1 -1
  440. package/build/cjs/vendor/escapeStringForRegex.js +1 -32
  441. package/build/cjs/vendor/escapeStringForRegex.js.map +1 -1
  442. package/build/cjs/vendor/getIpAddress.js +19 -99
  443. package/build/cjs/vendor/getIpAddress.js.map +1 -1
  444. package/build/esm/api.js +10 -34
  445. package/build/esm/api.js.map +1 -1
  446. package/build/esm/asyncContext/index.js +0 -14
  447. package/build/esm/asyncContext/index.js.map +1 -1
  448. package/build/esm/asyncContext/stackStrategy.js +16 -47
  449. package/build/esm/asyncContext/stackStrategy.js.map +1 -1
  450. package/build/esm/attributes.js +17 -95
  451. package/build/esm/attributes.js.map +1 -1
  452. package/build/esm/breadcrumbs.js +2 -22
  453. package/build/esm/breadcrumbs.js.map +1 -1
  454. package/build/esm/browser.js +5 -1
  455. package/build/esm/browser.js.map +1 -1
  456. package/build/esm/carrier.js +5 -42
  457. package/build/esm/carrier.js.map +1 -1
  458. package/build/esm/checkin.js +5 -19
  459. package/build/esm/checkin.js.map +1 -1
  460. package/build/esm/client.js +216 -585
  461. package/build/esm/client.js.map +1 -1
  462. package/build/esm/constants.js +2 -2
  463. package/build/esm/currentScopes.js +5 -86
  464. package/build/esm/currentScopes.js.map +1 -1
  465. package/build/esm/debug-build.js +0 -5
  466. package/build/esm/debug-build.js.map +1 -1
  467. package/build/esm/defaultScopes.js +2 -5
  468. package/build/esm/defaultScopes.js.map +1 -1
  469. package/build/esm/envelope.js +32 -103
  470. package/build/esm/envelope.js.map +1 -1
  471. package/build/esm/eventProcessors.js +4 -23
  472. package/build/esm/eventProcessors.js.map +1 -1
  473. package/build/esm/exports.js +21 -197
  474. package/build/esm/exports.js.map +1 -1
  475. package/build/esm/feedback.js +7 -19
  476. package/build/esm/feedback.js.map +1 -1
  477. package/build/esm/fetch.js +66 -201
  478. package/build/esm/fetch.js.map +1 -1
  479. package/build/esm/index.js +7 -1
  480. package/build/esm/index.js.map +1 -1
  481. package/build/esm/instrument/console.js +9 -41
  482. package/build/esm/instrument/console.js.map +1 -1
  483. package/build/esm/instrument/fetch.js +47 -156
  484. package/build/esm/instrument/fetch.js.map +1 -1
  485. package/build/esm/instrument/globalError.js +4 -25
  486. package/build/esm/instrument/globalError.js.map +1 -1
  487. package/build/esm/instrument/globalUnhandledRejection.js +4 -21
  488. package/build/esm/instrument/globalUnhandledRejection.js.map +1 -1
  489. package/build/esm/instrument/handlers.js +9 -21
  490. package/build/esm/instrument/handlers.js.map +1 -1
  491. package/build/esm/integration.js +13 -77
  492. package/build/esm/integration.js.map +1 -1
  493. package/build/esm/integrations/captureconsole.js +16 -40
  494. package/build/esm/integrations/captureconsole.js.map +1 -1
  495. package/build/esm/integrations/consola.js +57 -163
  496. package/build/esm/integrations/consola.js.map +1 -1
  497. package/build/esm/integrations/console.js +11 -43
  498. package/build/esm/integrations/console.js.map +1 -1
  499. package/build/esm/integrations/conversationId.js +5 -22
  500. package/build/esm/integrations/conversationId.js.map +1 -1
  501. package/build/esm/integrations/dedupe.js +16 -74
  502. package/build/esm/integrations/dedupe.js.map +1 -1
  503. package/build/esm/integrations/eventFilters.js +63 -114
  504. package/build/esm/integrations/eventFilters.js.map +1 -1
  505. package/build/esm/integrations/express/index.js +30 -145
  506. package/build/esm/integrations/express/index.js.map +1 -1
  507. package/build/esm/integrations/express/patch-layer.js +20 -130
  508. package/build/esm/integrations/express/patch-layer.js.map +1 -1
  509. package/build/esm/integrations/express/request-layer-store.js +1 -3
  510. package/build/esm/integrations/express/request-layer-store.js.map +1 -1
  511. package/build/esm/integrations/express/set-sdk-processing-metadata.js +0 -2
  512. package/build/esm/integrations/express/set-sdk-processing-metadata.js.map +1 -1
  513. package/build/esm/integrations/express/types.js +6 -7
  514. package/build/esm/integrations/express/types.js.map +1 -1
  515. package/build/esm/integrations/express/utils.js +37 -145
  516. package/build/esm/integrations/express/utils.js.map +1 -1
  517. package/build/esm/integrations/extraerrordata.js +24 -69
  518. package/build/esm/integrations/extraerrordata.js.map +1 -1
  519. package/build/esm/integrations/featureFlags/featureFlagsIntegration.js +3 -29
  520. package/build/esm/integrations/featureFlags/featureFlagsIntegration.js.map +1 -1
  521. package/build/esm/integrations/featureFlags/growthbook.js +11 -40
  522. package/build/esm/integrations/featureFlags/growthbook.js.map +1 -1
  523. package/build/esm/integrations/functiontostring.js +6 -27
  524. package/build/esm/integrations/functiontostring.js.map +1 -1
  525. package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js +10 -18
  526. package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -1
  527. package/build/esm/integrations/http/client-patch.js +8 -70
  528. package/build/esm/integrations/http/client-patch.js.map +1 -1
  529. package/build/esm/integrations/http/client-subscriptions.js +22 -59
  530. package/build/esm/integrations/http/client-subscriptions.js.map +1 -1
  531. package/build/esm/integrations/http/constants.js +3 -3
  532. package/build/esm/integrations/http/double-wrap-warning.js +10 -18
  533. package/build/esm/integrations/http/double-wrap-warning.js.map +1 -1
  534. package/build/esm/integrations/http/get-outgoing-span-data.js +30 -47
  535. package/build/esm/integrations/http/get-outgoing-span-data.js.map +1 -1
  536. package/build/esm/integrations/http/get-request-url.js +7 -24
  537. package/build/esm/integrations/http/get-request-url.js.map +1 -1
  538. package/build/esm/integrations/http/inject-trace-propagation-headers.js +14 -38
  539. package/build/esm/integrations/http/inject-trace-propagation-headers.js.map +1 -1
  540. package/build/esm/integrations/http/patch-request-to-capture-body.js +78 -0
  541. package/build/esm/integrations/http/patch-request-to-capture-body.js.map +1 -0
  542. package/build/esm/integrations/http/record-request-session.js +59 -0
  543. package/build/esm/integrations/http/record-request-session.js.map +1 -0
  544. package/build/esm/integrations/http/server-subscription.js +285 -0
  545. package/build/esm/integrations/http/server-subscription.js.map +1 -0
  546. package/build/esm/integrations/linkederrors.js +6 -11
  547. package/build/esm/integrations/linkederrors.js.map +1 -1
  548. package/build/esm/integrations/mcp-server/attributeExtraction.js +26 -69
  549. package/build/esm/integrations/mcp-server/attributeExtraction.js.map +1 -1
  550. package/build/esm/integrations/mcp-server/attributes.js +30 -138
  551. package/build/esm/integrations/mcp-server/attributes.js.map +1 -1
  552. package/build/esm/integrations/mcp-server/correlation.js +20 -91
  553. package/build/esm/integrations/mcp-server/correlation.js.map +1 -1
  554. package/build/esm/integrations/mcp-server/errorCapture.js +6 -25
  555. package/build/esm/integrations/mcp-server/errorCapture.js.map +1 -1
  556. package/build/esm/integrations/mcp-server/handlers.js +55 -169
  557. package/build/esm/integrations/mcp-server/handlers.js.map +1 -1
  558. package/build/esm/integrations/mcp-server/index.js +7 -60
  559. package/build/esm/integrations/mcp-server/index.js.map +1 -1
  560. package/build/esm/integrations/mcp-server/methodConfig.js +21 -59
  561. package/build/esm/integrations/mcp-server/methodConfig.js.map +1 -1
  562. package/build/esm/integrations/mcp-server/piiFiltering.js +5 -33
  563. package/build/esm/integrations/mcp-server/piiFiltering.js.map +1 -1
  564. package/build/esm/integrations/mcp-server/resultExtraction.js +20 -76
  565. package/build/esm/integrations/mcp-server/resultExtraction.js.map +1 -1
  566. package/build/esm/integrations/mcp-server/sessionExtraction.js +30 -121
  567. package/build/esm/integrations/mcp-server/sessionExtraction.js.map +1 -1
  568. package/build/esm/integrations/mcp-server/sessionManagement.js +2 -60
  569. package/build/esm/integrations/mcp-server/sessionManagement.js.map +1 -1
  570. package/build/esm/integrations/mcp-server/spans.js +20 -107
  571. package/build/esm/integrations/mcp-server/spans.js.map +1 -1
  572. package/build/esm/integrations/mcp-server/transport.js +26 -94
  573. package/build/esm/integrations/mcp-server/transport.js.map +1 -1
  574. package/build/esm/integrations/mcp-server/validation.js +6 -72
  575. package/build/esm/integrations/mcp-server/validation.js.map +1 -1
  576. package/build/esm/integrations/moduleMetadata.js +6 -20
  577. package/build/esm/integrations/moduleMetadata.js.map +1 -1
  578. package/build/esm/integrations/postgresjs.js +78 -287
  579. package/build/esm/integrations/postgresjs.js.map +1 -1
  580. package/build/esm/integrations/requestdata.js +30 -93
  581. package/build/esm/integrations/requestdata.js.map +1 -1
  582. package/build/esm/integrations/rewriteframes.js +14 -45
  583. package/build/esm/integrations/rewriteframes.js.map +1 -1
  584. package/build/esm/integrations/spanStreaming.js +9 -15
  585. package/build/esm/integrations/spanStreaming.js.map +1 -1
  586. package/build/esm/integrations/supabase.js +224 -333
  587. package/build/esm/integrations/supabase.js.map +1 -1
  588. package/build/esm/integrations/third-party-errors-filter.js +60 -85
  589. package/build/esm/integrations/third-party-errors-filter.js.map +1 -1
  590. package/build/esm/integrations/zoderrors.js +35 -111
  591. package/build/esm/integrations/zoderrors.js.map +1 -1
  592. package/build/esm/logs/console-integration.js +15 -50
  593. package/build/esm/logs/console-integration.js.map +1 -1
  594. package/build/esm/logs/constants.js +1 -6
  595. package/build/esm/logs/constants.js.map +1 -1
  596. package/build/esm/logs/envelope.js +10 -40
  597. package/build/esm/logs/envelope.js.map +1 -1
  598. package/build/esm/logs/internal.js +53 -126
  599. package/build/esm/logs/internal.js.map +1 -1
  600. package/build/esm/logs/public-api.js +13 -228
  601. package/build/esm/logs/public-api.js.map +1 -1
  602. package/build/esm/logs/utils.js +6 -47
  603. package/build/esm/logs/utils.js.map +1 -1
  604. package/build/esm/metadata.js +6 -51
  605. package/build/esm/metadata.js.map +1 -1
  606. package/build/esm/metrics/envelope.js +12 -45
  607. package/build/esm/metrics/envelope.js.map +1 -1
  608. package/build/esm/metrics/internal.js +31 -144
  609. package/build/esm/metrics/internal.js.map +1 -1
  610. package/build/esm/metrics/public-api.js +4 -109
  611. package/build/esm/metrics/public-api.js.map +1 -1
  612. package/build/esm/package.json +1 -1
  613. package/build/esm/profiling.js +11 -41
  614. package/build/esm/profiling.js.map +1 -1
  615. package/build/esm/scope.js +73 -224
  616. package/build/esm/scope.js.map +1 -1
  617. package/build/esm/sdk.js +2 -21
  618. package/build/esm/sdk.js.map +1 -1
  619. package/build/esm/semanticAttributes.js +31 -118
  620. package/build/esm/semanticAttributes.js.map +1 -1
  621. package/build/esm/server-runtime-client.js +32 -87
  622. package/build/esm/server-runtime-client.js.map +1 -1
  623. package/build/esm/server.js +7 -1
  624. package/build/esm/server.js.map +1 -1
  625. package/build/esm/session.js +14 -67
  626. package/build/esm/session.js.map +1 -1
  627. package/build/esm/tracing/ai/gen-ai-attributes.js +45 -249
  628. package/build/esm/tracing/ai/gen-ai-attributes.js.map +1 -1
  629. package/build/esm/tracing/ai/mediaStripping.js +21 -116
  630. package/build/esm/tracing/ai/mediaStripping.js.map +1 -1
  631. package/build/esm/tracing/ai/messageTruncation.js +26 -212
  632. package/build/esm/tracing/ai/messageTruncation.js.map +1 -1
  633. package/build/esm/tracing/ai/utils.js +40 -180
  634. package/build/esm/tracing/ai/utils.js.map +1 -1
  635. package/build/esm/tracing/anthropic-ai/constants.js +9 -12
  636. package/build/esm/tracing/anthropic-ai/constants.js.map +1 -1
  637. package/build/esm/tracing/anthropic-ai/index.js +67 -172
  638. package/build/esm/tracing/anthropic-ai/index.js.map +1 -1
  639. package/build/esm/tracing/anthropic-ai/streaming.js +45 -149
  640. package/build/esm/tracing/anthropic-ai/streaming.js.map +1 -1
  641. package/build/esm/tracing/anthropic-ai/utils.js +17 -47
  642. package/build/esm/tracing/anthropic-ai/utils.js.map +1 -1
  643. package/build/esm/tracing/dynamicSamplingContext.js +18 -85
  644. package/build/esm/tracing/dynamicSamplingContext.js.map +1 -1
  645. package/build/esm/tracing/errors.js +2 -14
  646. package/build/esm/tracing/errors.js.map +1 -1
  647. package/build/esm/tracing/google-genai/constants.js +9 -16
  648. package/build/esm/tracing/google-genai/constants.js.map +1 -1
  649. package/build/esm/tracing/google-genai/index.js +79 -223
  650. package/build/esm/tracing/google-genai/index.js.map +1 -1
  651. package/build/esm/tracing/google-genai/streaming.js +11 -56
  652. package/build/esm/tracing/google-genai/streaming.js.map +1 -1
  653. package/build/esm/tracing/google-genai/utils.js +8 -13
  654. package/build/esm/tracing/google-genai/utils.js.map +1 -1
  655. package/build/esm/tracing/idleSpan.js +48 -174
  656. package/build/esm/tracing/idleSpan.js.map +1 -1
  657. package/build/esm/tracing/langchain/constants.js +8 -9
  658. package/build/esm/tracing/langchain/constants.js.map +1 -1
  659. package/build/esm/tracing/langchain/embeddings.js +31 -75
  660. package/build/esm/tracing/langchain/embeddings.js.map +1 -1
  661. package/build/esm/tracing/langchain/index.js +64 -161
  662. package/build/esm/tracing/langchain/index.js.map +1 -1
  663. package/build/esm/tracing/langchain/utils.js +101 -312
  664. package/build/esm/tracing/langchain/utils.js.map +1 -1
  665. package/build/esm/tracing/langgraph/constants.js +2 -2
  666. package/build/esm/tracing/langgraph/index.js +59 -162
  667. package/build/esm/tracing/langgraph/index.js.map +1 -1
  668. package/build/esm/tracing/langgraph/utils.js +54 -170
  669. package/build/esm/tracing/langgraph/utils.js.map +1 -1
  670. package/build/esm/tracing/logSpans.js +10 -26
  671. package/build/esm/tracing/logSpans.js.map +1 -1
  672. package/build/esm/tracing/measurement.js +6 -18
  673. package/build/esm/tracing/measurement.js.map +1 -1
  674. package/build/esm/tracing/openai/constants.js +20 -24
  675. package/build/esm/tracing/openai/constants.js.map +1 -1
  676. package/build/esm/tracing/openai/index.js +52 -132
  677. package/build/esm/tracing/openai/index.js.map +1 -1
  678. package/build/esm/tracing/openai/streaming.js +24 -102
  679. package/build/esm/tracing/openai/streaming.js.map +1 -1
  680. package/build/esm/tracing/openai/utils.js +36 -107
  681. package/build/esm/tracing/openai/utils.js.map +1 -1
  682. package/build/esm/tracing/sampling.js +23 -63
  683. package/build/esm/tracing/sampling.js.map +1 -1
  684. package/build/esm/tracing/sentryNonRecordingSpan.js +15 -40
  685. package/build/esm/tracing/sentryNonRecordingSpan.js.map +1 -1
  686. package/build/esm/tracing/sentrySpan.js +66 -172
  687. package/build/esm/tracing/sentrySpan.js.map +1 -1
  688. package/build/esm/tracing/spans/beforeSendSpan.js +4 -32
  689. package/build/esm/tracing/spans/beforeSendSpan.js.map +1 -1
  690. package/build/esm/tracing/spans/captureSpan.js +59 -157
  691. package/build/esm/tracing/spans/captureSpan.js.map +1 -1
  692. package/build/esm/tracing/spans/envelope.js +12 -24
  693. package/build/esm/tracing/spans/envelope.js.map +1 -1
  694. package/build/esm/tracing/spans/estimateSize.js +0 -22
  695. package/build/esm/tracing/spans/estimateSize.js.map +1 -1
  696. package/build/esm/tracing/spans/extractGenAiSpans.js +11 -33
  697. package/build/esm/tracing/spans/extractGenAiSpans.js.map +1 -1
  698. package/build/esm/tracing/spans/hasSpanStreamingEnabled.js +1 -4
  699. package/build/esm/tracing/spans/hasSpanStreamingEnabled.js.map +1 -1
  700. package/build/esm/tracing/spans/scopeContextAttributes.js +56 -0
  701. package/build/esm/tracing/spans/scopeContextAttributes.js.map +1 -0
  702. package/build/esm/tracing/spans/spanBuffer.js +21 -71
  703. package/build/esm/tracing/spans/spanBuffer.js.map +1 -1
  704. package/build/esm/tracing/spans/spanJsonToStreamedSpan.js +4 -8
  705. package/build/esm/tracing/spans/spanJsonToStreamedSpan.js.map +1 -1
  706. package/build/esm/tracing/spanstatus.js +15 -32
  707. package/build/esm/tracing/spanstatus.js.map +1 -1
  708. package/build/esm/tracing/trace.js +95 -311
  709. package/build/esm/tracing/trace.js.map +1 -1
  710. package/build/esm/tracing/utils.js +4 -14
  711. package/build/esm/tracing/utils.js.map +1 -1
  712. package/build/esm/tracing/vercel-ai/constants.js +15 -26
  713. package/build/esm/tracing/vercel-ai/constants.js.map +1 -1
  714. package/build/esm/tracing/vercel-ai/index.js +84 -288
  715. package/build/esm/tracing/vercel-ai/index.js.map +1 -1
  716. package/build/esm/tracing/vercel-ai/utils.js +30 -128
  717. package/build/esm/tracing/vercel-ai/utils.js.map +1 -1
  718. package/build/esm/tracing/vercel-ai/vercel-ai-attributes.js +22 -229
  719. package/build/esm/tracing/vercel-ai/vercel-ai-attributes.js.map +1 -1
  720. package/build/esm/transports/base.js +32 -67
  721. package/build/esm/transports/base.js.map +1 -1
  722. package/build/esm/transports/multiplexed.js +38 -103
  723. package/build/esm/transports/multiplexed.js.map +1 -1
  724. package/build/esm/transports/offline.js +31 -72
  725. package/build/esm/transports/offline.js.map +1 -1
  726. package/build/esm/transports/userAgent.js +4 -13
  727. package/build/esm/transports/userAgent.js.map +1 -1
  728. package/build/esm/trpc.js +19 -39
  729. package/build/esm/trpc.js.map +1 -1
  730. package/build/esm/utils/aggregate-errors.js +18 -62
  731. package/build/esm/utils/aggregate-errors.js.map +1 -1
  732. package/build/esm/utils/ai/providerSkip.js +3 -50
  733. package/build/esm/utils/ai/providerSkip.js.map +1 -1
  734. package/build/esm/utils/anr.js +7 -36
  735. package/build/esm/utils/anr.js.map +1 -1
  736. package/build/esm/utils/baggage.js +37 -146
  737. package/build/esm/utils/baggage.js.map +1 -1
  738. package/build/esm/utils/breadcrumb-log-level.js +5 -9
  739. package/build/esm/utils/breadcrumb-log-level.js.map +1 -1
  740. package/build/esm/utils/browser.js +24 -86
  741. package/build/esm/utils/browser.js.map +1 -1
  742. package/build/esm/utils/chain-and-copy-promiselike.js +10 -27
  743. package/build/esm/utils/chain-and-copy-promiselike.js.map +1 -1
  744. package/build/esm/utils/clientreport.js +4 -13
  745. package/build/esm/utils/clientreport.js.map +1 -1
  746. package/build/esm/utils/cookie.js +6 -53
  747. package/build/esm/utils/cookie.js.map +1 -1
  748. package/build/esm/utils/data-collection/defaultPiiToCollectionOptions.js +26 -0
  749. package/build/esm/utils/data-collection/defaultPiiToCollectionOptions.js.map +1 -0
  750. package/build/esm/utils/data-collection/filterCookies.js +21 -0
  751. package/build/esm/utils/data-collection/filterCookies.js.map +1 -0
  752. package/build/esm/utils/data-collection/filterKeyValueData.js +41 -0
  753. package/build/esm/utils/data-collection/filterKeyValueData.js.map +1 -0
  754. package/build/esm/utils/data-collection/filterQueryParams.js +24 -0
  755. package/build/esm/utils/data-collection/filterQueryParams.js.map +1 -0
  756. package/build/esm/utils/data-collection/filtering-snippets.js +56 -0
  757. package/build/esm/utils/data-collection/filtering-snippets.js.map +1 -0
  758. package/build/esm/utils/data-collection/resolveDataCollectionOptions.js +35 -0
  759. package/build/esm/utils/data-collection/resolveDataCollectionOptions.js.map +1 -0
  760. package/build/esm/utils/debounce.js +5 -32
  761. package/build/esm/utils/debounce.js.map +1 -1
  762. package/build/esm/utils/debug-ids.js +4 -42
  763. package/build/esm/utils/debug-ids.js.map +1 -1
  764. package/build/esm/utils/debug-logger.js +23 -56
  765. package/build/esm/utils/debug-logger.js.map +1 -1
  766. package/build/esm/utils/dsn.js +18 -81
  767. package/build/esm/utils/dsn.js.map +1 -1
  768. package/build/esm/utils/env.js +3 -27
  769. package/build/esm/utils/env.js.map +1 -1
  770. package/build/esm/utils/envToBool.js +2 -15
  771. package/build/esm/utils/envToBool.js.map +1 -1
  772. package/build/esm/utils/envelope.js +39 -133
  773. package/build/esm/utils/envelope.js.map +1 -1
  774. package/build/esm/utils/error.js +3 -10
  775. package/build/esm/utils/error.js.map +1 -1
  776. package/build/esm/utils/eventUtils.js +0 -8
  777. package/build/esm/utils/eventUtils.js.map +1 -1
  778. package/build/esm/utils/eventbuilder.js +30 -114
  779. package/build/esm/utils/eventbuilder.js.map +1 -1
  780. package/build/esm/utils/exports.js +5 -24
  781. package/build/esm/utils/exports.js.map +1 -1
  782. package/build/esm/utils/featureFlags.js +10 -96
  783. package/build/esm/utils/featureFlags.js.map +1 -1
  784. package/build/esm/utils/flushIfServerless.js +14 -48
  785. package/build/esm/utils/flushIfServerless.js.map +1 -1
  786. package/build/esm/utils/get-default-export.js +1 -25
  787. package/build/esm/utils/get-default-export.js.map +1 -1
  788. package/build/esm/utils/handleCallbackErrors.js +10 -48
  789. package/build/esm/utils/handleCallbackErrors.js.map +1 -1
  790. package/build/esm/utils/hasSpansEnabled.js +4 -28
  791. package/build/esm/utils/hasSpansEnabled.js.map +1 -1
  792. package/build/esm/utils/ipAddress.js +7 -19
  793. package/build/esm/utils/ipAddress.js.map +1 -1
  794. package/build/esm/utils/is.js +18 -163
  795. package/build/esm/utils/is.js.map +1 -1
  796. package/build/esm/utils/isBrowser.js +3 -9
  797. package/build/esm/utils/isBrowser.js.map +1 -1
  798. package/build/esm/utils/isSentryRequestUrl.js +2 -19
  799. package/build/esm/utils/isSentryRequestUrl.js.map +1 -1
  800. package/build/esm/utils/lru.js +13 -24
  801. package/build/esm/utils/lru.js.map +1 -1
  802. package/build/esm/utils/merge.js +1 -17
  803. package/build/esm/utils/merge.js.map +1 -1
  804. package/build/esm/utils/meta.js +1 -24
  805. package/build/esm/utils/meta.js.map +1 -1
  806. package/build/esm/utils/misc.js +31 -134
  807. package/build/esm/utils/misc.js.map +1 -1
  808. package/build/esm/utils/node-stack-trace.js +22 -61
  809. package/build/esm/utils/node-stack-trace.js.map +1 -1
  810. package/build/esm/utils/node.js +3 -48
  811. package/build/esm/utils/node.js.map +1 -1
  812. package/build/esm/utils/normalizationHints.js +5 -18
  813. package/build/esm/utils/normalizationHints.js.map +1 -1
  814. package/build/esm/utils/normalize.js +39 -205
  815. package/build/esm/utils/normalize.js.map +1 -1
  816. package/build/esm/utils/object.js +33 -168
  817. package/build/esm/utils/object.js.map +1 -1
  818. package/build/esm/utils/parameterize.js +2 -21
  819. package/build/esm/utils/parameterize.js.map +1 -1
  820. package/build/esm/utils/parseSampleRate.js +4 -13
  821. package/build/esm/utils/parseSampleRate.js.map +1 -1
  822. package/build/esm/utils/path.js +28 -115
  823. package/build/esm/utils/path.js.map +1 -1
  824. package/build/esm/utils/prepareEvent.js +53 -191
  825. package/build/esm/utils/prepareEvent.js.map +1 -1
  826. package/build/esm/utils/promisebuffer.js +5 -47
  827. package/build/esm/utils/promisebuffer.js.map +1 -1
  828. package/build/esm/utils/propagationContext.js +0 -7
  829. package/build/esm/utils/propagationContext.js.map +1 -1
  830. package/build/esm/utils/randomSafeContext.js +3 -22
  831. package/build/esm/utils/randomSafeContext.js.map +1 -1
  832. package/build/esm/utils/ratelimit.js +13 -66
  833. package/build/esm/utils/ratelimit.js.map +1 -1
  834. package/build/esm/utils/request.js +62 -269
  835. package/build/esm/utils/request.js.map +1 -1
  836. package/build/esm/utils/scopeData.js +15 -79
  837. package/build/esm/utils/scopeData.js.map +1 -1
  838. package/build/esm/utils/sdkMetadata.js +5 -19
  839. package/build/esm/utils/sdkMetadata.js.map +1 -1
  840. package/build/esm/utils/severity.js +1 -9
  841. package/build/esm/utils/severity.js.map +1 -1
  842. package/build/esm/utils/should-ignore-span.js +6 -38
  843. package/build/esm/utils/should-ignore-span.js.map +1 -1
  844. package/build/esm/utils/spanOnScope.js +3 -14
  845. package/build/esm/utils/spanOnScope.js.map +1 -1
  846. package/build/esm/utils/spanUtils.js +42 -222
  847. package/build/esm/utils/spanUtils.js.map +1 -1
  848. package/build/esm/utils/stacktrace.js +19 -106
  849. package/build/esm/utils/stacktrace.js.map +1 -1
  850. package/build/esm/utils/string.js +7 -75
  851. package/build/esm/utils/string.js.map +1 -1
  852. package/build/esm/utils/supports.js +14 -99
  853. package/build/esm/utils/supports.js.map +1 -1
  854. package/build/esm/utils/syncpromise.js +19 -68
  855. package/build/esm/utils/syncpromise.js.map +1 -1
  856. package/build/esm/utils/time.js +7 -84
  857. package/build/esm/utils/time.js.map +1 -1
  858. package/build/esm/utils/timer.js +1 -10
  859. package/build/esm/utils/timer.js.map +1 -1
  860. package/build/esm/utils/timestampSequence.js +5 -21
  861. package/build/esm/utils/timestampSequence.js.map +1 -1
  862. package/build/esm/utils/trace-info.js +3 -10
  863. package/build/esm/utils/trace-info.js.map +1 -1
  864. package/build/esm/utils/traceData.js +4 -39
  865. package/build/esm/utils/traceData.js.map +1 -1
  866. package/build/esm/utils/tracePropagationTargets.js +4 -18
  867. package/build/esm/utils/tracePropagationTargets.js.map +1 -1
  868. package/build/esm/utils/tracing.js +32 -106
  869. package/build/esm/utils/tracing.js.map +1 -1
  870. package/build/esm/utils/transactionEvent.js +11 -19
  871. package/build/esm/utils/transactionEvent.js.map +1 -1
  872. package/build/esm/utils/tunnel.js +12 -33
  873. package/build/esm/utils/tunnel.js.map +1 -1
  874. package/build/esm/utils/url.js +42 -176
  875. package/build/esm/utils/url.js.map +1 -1
  876. package/build/esm/utils/vercelWaitUntil.js +4 -12
  877. package/build/esm/utils/vercelWaitUntil.js.map +1 -1
  878. package/build/esm/utils/version.js +1 -3
  879. package/build/esm/utils/version.js.map +1 -1
  880. package/build/esm/utils/weakRef.js +5 -36
  881. package/build/esm/utils/weakRef.js.map +1 -1
  882. package/build/esm/utils/worldwide.js +1 -4
  883. package/build/esm/utils/worldwide.js.map +1 -1
  884. package/build/esm/vendor/escapeStringForRegex.js +1 -32
  885. package/build/esm/vendor/escapeStringForRegex.js.map +1 -1
  886. package/build/esm/vendor/getIpAddress.js +19 -99
  887. package/build/esm/vendor/getIpAddress.js.map +1 -1
  888. package/build/types/api.d.ts +2 -2
  889. package/build/types/api.d.ts.map +1 -1
  890. package/build/types/attributes.d.ts +5 -8
  891. package/build/types/attributes.d.ts.map +1 -1
  892. package/build/types/breadcrumbs.d.ts +1 -1
  893. package/build/types/breadcrumbs.d.ts.map +1 -1
  894. package/build/types/browser-exports.d.ts +3 -3
  895. package/build/types/browser-exports.d.ts.map +1 -1
  896. package/build/types/carrier.d.ts +2 -2
  897. package/build/types/carrier.d.ts.map +1 -1
  898. package/build/types/checkin.d.ts +4 -4
  899. package/build/types/checkin.d.ts.map +1 -1
  900. package/build/types/client.d.ts +32 -22
  901. package/build/types/client.d.ts.map +1 -1
  902. package/build/types/currentScopes.d.ts +1 -1
  903. package/build/types/currentScopes.d.ts.map +1 -1
  904. package/build/types/envelope.d.ts +7 -7
  905. package/build/types/envelope.d.ts.map +1 -1
  906. package/build/types/eventProcessors.d.ts +2 -2
  907. package/build/types/eventProcessors.d.ts.map +1 -1
  908. package/build/types/exports.d.ts +8 -8
  909. package/build/types/exports.d.ts.map +1 -1
  910. package/build/types/feedback.d.ts +2 -2
  911. package/build/types/feedback.d.ts.map +1 -1
  912. package/build/types/fetch.d.ts +3 -3
  913. package/build/types/fetch.d.ts.map +1 -1
  914. package/build/types/instrument/console.d.ts +1 -1
  915. package/build/types/instrument/console.d.ts.map +1 -1
  916. package/build/types/instrument/fetch.d.ts +1 -1
  917. package/build/types/instrument/fetch.d.ts.map +1 -1
  918. package/build/types/instrument/globalError.d.ts +1 -1
  919. package/build/types/instrument/globalError.d.ts.map +1 -1
  920. package/build/types/instrument/globalUnhandledRejection.d.ts +1 -1
  921. package/build/types/instrument/globalUnhandledRejection.d.ts.map +1 -1
  922. package/build/types/integration.d.ts +2 -2
  923. package/build/types/integration.d.ts.map +1 -1
  924. package/build/types/integrations/consola.d.ts +1 -1
  925. package/build/types/integrations/consola.d.ts.map +1 -1
  926. package/build/types/integrations/console.d.ts +1 -1
  927. package/build/types/integrations/console.d.ts.map +1 -1
  928. package/build/types/integrations/dedupe.d.ts +1 -1
  929. package/build/types/integrations/dedupe.d.ts.map +1 -1
  930. package/build/types/integrations/express/types.d.ts +2 -2
  931. package/build/types/integrations/express/types.d.ts.map +1 -1
  932. package/build/types/integrations/express/utils.d.ts +1 -1
  933. package/build/types/integrations/express/utils.d.ts.map +1 -1
  934. package/build/types/integrations/featureFlags/featureFlagsIntegration.d.ts +1 -1
  935. package/build/types/integrations/featureFlags/featureFlagsIntegration.d.ts.map +1 -1
  936. package/build/types/integrations/featureFlags/growthbook.d.ts +1 -1
  937. package/build/types/integrations/featureFlags/growthbook.d.ts.map +1 -1
  938. package/build/types/integrations/http/double-wrap-warning.d.ts +1 -1
  939. package/build/types/integrations/http/double-wrap-warning.d.ts.map +1 -1
  940. package/build/types/integrations/http/get-outgoing-span-data.d.ts +2 -2
  941. package/build/types/integrations/http/get-outgoing-span-data.d.ts.map +1 -1
  942. package/build/types/integrations/http/patch-request-to-capture-body.d.ts +12 -0
  943. package/build/types/integrations/http/patch-request-to-capture-body.d.ts.map +1 -0
  944. package/build/types/integrations/http/record-request-session.d.ts +18 -0
  945. package/build/types/integrations/http/record-request-session.d.ts.map +1 -0
  946. package/build/types/integrations/http/server-subscription.d.ts +26 -0
  947. package/build/types/integrations/http/server-subscription.d.ts.map +1 -0
  948. package/build/types/integrations/http/types.d.ts +12 -6
  949. package/build/types/integrations/http/types.d.ts.map +1 -1
  950. package/build/types/integrations/mcp-server/correlation.d.ts +1 -1
  951. package/build/types/integrations/mcp-server/correlation.d.ts.map +1 -1
  952. package/build/types/integrations/mcp-server/piiFiltering.d.ts +1 -1
  953. package/build/types/integrations/mcp-server/piiFiltering.d.ts.map +1 -1
  954. package/build/types/integrations/mcp-server/types.d.ts +1 -1
  955. package/build/types/integrations/mcp-server/types.d.ts.map +1 -1
  956. package/build/types/integrations/postgresjs.d.ts +1 -1
  957. package/build/types/integrations/postgresjs.d.ts.map +1 -1
  958. package/build/types/integrations/rewriteframes.d.ts +1 -1
  959. package/build/types/integrations/rewriteframes.d.ts.map +1 -1
  960. package/build/types/integrations/supabase.d.ts +14 -3
  961. package/build/types/integrations/supabase.d.ts.map +1 -1
  962. package/build/types/integrations/third-party-errors-filter.d.ts.map +1 -1
  963. package/build/types/integrations/zoderrors.d.ts +1 -1
  964. package/build/types/integrations/zoderrors.d.ts.map +1 -1
  965. package/build/types/logs/console-integration.d.ts +1 -1
  966. package/build/types/logs/console-integration.d.ts.map +1 -1
  967. package/build/types/logs/constants.d.ts +1 -1
  968. package/build/types/logs/constants.d.ts.map +1 -1
  969. package/build/types/logs/envelope.d.ts +4 -4
  970. package/build/types/logs/envelope.d.ts.map +1 -1
  971. package/build/types/logs/internal.d.ts +16 -1
  972. package/build/types/logs/internal.d.ts.map +1 -1
  973. package/build/types/logs/public-api.d.ts +2 -2
  974. package/build/types/logs/public-api.d.ts.map +1 -1
  975. package/build/types/metadata.d.ts +2 -2
  976. package/build/types/metadata.d.ts.map +1 -1
  977. package/build/types/metrics/envelope.d.ts +4 -4
  978. package/build/types/metrics/envelope.d.ts.map +1 -1
  979. package/build/types/metrics/internal.d.ts +1 -1
  980. package/build/types/metrics/internal.d.ts.map +1 -1
  981. package/build/types/metrics/public-api.d.ts +1 -1
  982. package/build/types/metrics/public-api.d.ts.map +1 -1
  983. package/build/types/profiling.d.ts +1 -1
  984. package/build/types/profiling.d.ts.map +1 -1
  985. package/build/types/report-dialog.d.ts +1 -1
  986. package/build/types/report-dialog.d.ts.map +1 -1
  987. package/build/types/scope.d.ts +14 -14
  988. package/build/types/scope.d.ts.map +1 -1
  989. package/build/types/sdk.d.ts +1 -1
  990. package/build/types/sdk.d.ts.map +1 -1
  991. package/build/types/semanticAttributes.d.ts +2 -0
  992. package/build/types/semanticAttributes.d.ts.map +1 -1
  993. package/build/types/server-exports.d.ts +3 -1
  994. package/build/types/server-exports.d.ts.map +1 -1
  995. package/build/types/server-runtime-client.d.ts +6 -6
  996. package/build/types/server-runtime-client.d.ts.map +1 -1
  997. package/build/types/session.d.ts +1 -1
  998. package/build/types/session.d.ts.map +1 -1
  999. package/build/types/shared-exports.d.ts +58 -53
  1000. package/build/types/shared-exports.d.ts.map +1 -1
  1001. package/build/types/tracing/ai/utils.d.ts +1 -1
  1002. package/build/types/tracing/ai/utils.d.ts.map +1 -1
  1003. package/build/types/tracing/anthropic-ai/streaming.d.ts +1 -1
  1004. package/build/types/tracing/anthropic-ai/streaming.d.ts.map +1 -1
  1005. package/build/types/tracing/anthropic-ai/utils.d.ts +2 -2
  1006. package/build/types/tracing/anthropic-ai/utils.d.ts.map +1 -1
  1007. package/build/types/tracing/dynamicSamplingContext.d.ts +2 -2
  1008. package/build/types/tracing/dynamicSamplingContext.d.ts.map +1 -1
  1009. package/build/types/tracing/google-genai/streaming.d.ts +1 -1
  1010. package/build/types/tracing/google-genai/streaming.d.ts.map +1 -1
  1011. package/build/types/tracing/idleSpan.d.ts +2 -2
  1012. package/build/types/tracing/idleSpan.d.ts.map +1 -1
  1013. package/build/types/tracing/langchain/utils.d.ts +6 -1
  1014. package/build/types/tracing/langchain/utils.d.ts.map +1 -1
  1015. package/build/types/tracing/langgraph/index.d.ts.map +1 -1
  1016. package/build/types/tracing/langgraph/utils.d.ts +1 -3
  1017. package/build/types/tracing/langgraph/utils.d.ts.map +1 -1
  1018. package/build/types/tracing/logSpans.d.ts +1 -1
  1019. package/build/types/tracing/logSpans.d.ts.map +1 -1
  1020. package/build/types/tracing/measurement.d.ts +2 -2
  1021. package/build/types/tracing/measurement.d.ts.map +1 -1
  1022. package/build/types/tracing/openai/streaming.d.ts +1 -1
  1023. package/build/types/tracing/openai/streaming.d.ts.map +1 -1
  1024. package/build/types/tracing/openai/utils.d.ts +1 -1
  1025. package/build/types/tracing/openai/utils.d.ts.map +1 -1
  1026. package/build/types/tracing/sampling.d.ts +2 -2
  1027. package/build/types/tracing/sampling.d.ts.map +1 -1
  1028. package/build/types/tracing/sentryNonRecordingSpan.d.ts +3 -3
  1029. package/build/types/tracing/sentryNonRecordingSpan.d.ts.map +1 -1
  1030. package/build/types/tracing/sentrySpan.d.ts +4 -4
  1031. package/build/types/tracing/sentrySpan.d.ts.map +1 -1
  1032. package/build/types/tracing/spans/beforeSendSpan.d.ts +3 -3
  1033. package/build/types/tracing/spans/beforeSendSpan.d.ts.map +1 -1
  1034. package/build/types/tracing/spans/captureSpan.d.ts +1 -1
  1035. package/build/types/tracing/spans/captureSpan.d.ts.map +1 -1
  1036. package/build/types/tracing/spans/envelope.d.ts +2 -2
  1037. package/build/types/tracing/spans/envelope.d.ts.map +1 -1
  1038. package/build/types/tracing/spans/estimateSize.d.ts +1 -1
  1039. package/build/types/tracing/spans/estimateSize.d.ts.map +1 -1
  1040. package/build/types/tracing/spans/extractGenAiSpans.d.ts +2 -2
  1041. package/build/types/tracing/spans/extractGenAiSpans.d.ts.map +1 -1
  1042. package/build/types/tracing/spans/scopeContextAttributes.d.ts +9 -0
  1043. package/build/types/tracing/spans/scopeContextAttributes.d.ts.map +1 -0
  1044. package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts +1 -1
  1045. package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts.map +1 -1
  1046. package/build/types/tracing/spanstatus.d.ts +2 -2
  1047. package/build/types/tracing/spanstatus.d.ts.map +1 -1
  1048. package/build/types/tracing/trace.d.ts +2 -2
  1049. package/build/types/tracing/trace.d.ts.map +1 -1
  1050. package/build/types/tracing/utils.d.ts +1 -1
  1051. package/build/types/tracing/utils.d.ts.map +1 -1
  1052. package/build/types/tracing/vercel-ai/utils.d.ts +2 -2
  1053. package/build/types/tracing/vercel-ai/utils.d.ts.map +1 -1
  1054. package/build/types/transports/base.d.ts +1 -1
  1055. package/build/types/transports/base.d.ts.map +1 -1
  1056. package/build/types/transports/multiplexed.d.ts +3 -3
  1057. package/build/types/transports/multiplexed.d.ts.map +1 -1
  1058. package/build/types/transports/offline.d.ts +2 -2
  1059. package/build/types/transports/offline.d.ts.map +1 -1
  1060. package/build/types/transports/userAgent.d.ts +1 -1
  1061. package/build/types/transports/userAgent.d.ts.map +1 -1
  1062. package/build/types/trpc.d.ts.map +1 -1
  1063. package/build/types/types/attachment.d.ts.map +1 -0
  1064. package/build/types/types/breadcrumb.d.ts.map +1 -0
  1065. package/build/types/types/browseroptions.d.ts.map +1 -0
  1066. package/build/types/types/checkin.d.ts.map +1 -0
  1067. package/build/types/types/clientreport.d.ts.map +1 -0
  1068. package/build/types/types/context.d.ts.map +1 -0
  1069. package/build/types/types/csp.d.ts.map +1 -0
  1070. package/build/types/types/datacategory.d.ts.map +1 -0
  1071. package/build/types/types/datacollection.d.ts +75 -0
  1072. package/build/types/types/datacollection.d.ts.map +1 -0
  1073. package/build/types/types/debugMeta.d.ts.map +1 -0
  1074. package/build/types/types/dsn.d.ts.map +1 -0
  1075. package/build/types/types/envelope.d.ts.map +1 -0
  1076. package/build/types/types/error.d.ts.map +1 -0
  1077. package/build/types/types/event.d.ts.map +1 -0
  1078. package/build/types/types/eventprocessor.d.ts.map +1 -0
  1079. package/build/types/types/exception.d.ts.map +1 -0
  1080. package/build/types/types/extra.d.ts.map +1 -0
  1081. package/build/types/types/feedback/config.d.ts.map +1 -0
  1082. package/build/types/types/feedback/form.d.ts.map +1 -0
  1083. package/build/types/types/feedback/index.d.ts.map +1 -0
  1084. package/build/types/types/feedback/sendFeedback.d.ts.map +1 -0
  1085. package/build/types/types/feedback/theme.d.ts.map +1 -0
  1086. package/build/types/types/instrument.d.ts.map +1 -0
  1087. package/build/types/types/integration.d.ts.map +1 -0
  1088. package/build/types/types/link.d.ts.map +1 -0
  1089. package/build/types/types/log.d.ts.map +1 -0
  1090. package/build/types/types/measurement.d.ts.map +1 -0
  1091. package/build/types/types/mechanism.d.ts.map +1 -0
  1092. package/build/types/types/metric.d.ts.map +1 -0
  1093. package/build/types/types/misc.d.ts.map +1 -0
  1094. package/build/types/types/opentelemetry.d.ts.map +1 -0
  1095. package/build/types/{types-hoist → types}/options.d.ts +17 -0
  1096. package/build/types/types/options.d.ts.map +1 -0
  1097. package/build/types/types/package.d.ts.map +1 -0
  1098. package/build/types/types/parameterize.d.ts.map +1 -0
  1099. package/build/types/types/polymorphics.d.ts.map +1 -0
  1100. package/build/types/types/profiling.d.ts.map +1 -0
  1101. package/build/types/types/replay.d.ts.map +1 -0
  1102. package/build/types/types/request.d.ts.map +1 -0
  1103. package/build/types/types/runtime.d.ts.map +1 -0
  1104. package/build/types/{types-hoist → types}/samplingcontext.d.ts +1 -1
  1105. package/build/types/types/samplingcontext.d.ts.map +1 -0
  1106. package/build/types/types/sdkinfo.d.ts.map +1 -0
  1107. package/build/types/types/sdkmetadata.d.ts.map +1 -0
  1108. package/build/types/types/session.d.ts.map +1 -0
  1109. package/build/types/types/severity.d.ts.map +1 -0
  1110. package/build/types/types/span.d.ts.map +1 -0
  1111. package/build/types/types/spanStatus.d.ts.map +1 -0
  1112. package/build/types/types/stackframe.d.ts.map +1 -0
  1113. package/build/types/types/stacktrace.d.ts.map +1 -0
  1114. package/build/types/{types-hoist → types}/startSpanOptions.d.ts +13 -0
  1115. package/build/types/types/startSpanOptions.d.ts.map +1 -0
  1116. package/build/types/types/thread.d.ts.map +1 -0
  1117. package/build/types/types/timedEvent.d.ts.map +1 -0
  1118. package/build/types/types/tracing.d.ts.map +1 -0
  1119. package/build/types/types/transaction.d.ts.map +1 -0
  1120. package/build/types/types/transport.d.ts.map +1 -0
  1121. package/build/types/types/user.d.ts.map +1 -0
  1122. package/build/types/types/view-hierarchy.d.ts.map +1 -0
  1123. package/build/types/types/vue.d.ts.map +1 -0
  1124. package/build/types/types/webfetchapi.d.ts.map +1 -0
  1125. package/build/types/types/wrappedfunction.d.ts.map +1 -0
  1126. package/build/types/utils/aggregate-errors.d.ts +3 -3
  1127. package/build/types/utils/aggregate-errors.d.ts.map +1 -1
  1128. package/build/types/utils/anr.d.ts +1 -1
  1129. package/build/types/utils/anr.d.ts.map +1 -1
  1130. package/build/types/utils/baggage.d.ts +1 -1
  1131. package/build/types/utils/baggage.d.ts.map +1 -1
  1132. package/build/types/utils/breadcrumb-log-level.d.ts +1 -1
  1133. package/build/types/utils/breadcrumb-log-level.d.ts.map +1 -1
  1134. package/build/types/utils/clientreport.d.ts +2 -2
  1135. package/build/types/utils/clientreport.d.ts.map +1 -1
  1136. package/build/types/utils/data-collection/defaultPiiToCollectionOptions.d.ts +6 -0
  1137. package/build/types/utils/data-collection/defaultPiiToCollectionOptions.d.ts.map +1 -0
  1138. package/build/types/utils/data-collection/filterCookies.d.ts +9 -0
  1139. package/build/types/utils/data-collection/filterCookies.d.ts.map +1 -0
  1140. package/build/types/utils/data-collection/filterKeyValueData.d.ts +11 -0
  1141. package/build/types/utils/data-collection/filterKeyValueData.d.ts.map +1 -0
  1142. package/build/types/utils/data-collection/filterQueryParams.d.ts +9 -0
  1143. package/build/types/utils/data-collection/filterQueryParams.d.ts.map +1 -0
  1144. package/build/types/utils/data-collection/filtering-snippets.d.ts +14 -0
  1145. package/build/types/utils/data-collection/filtering-snippets.d.ts.map +1 -0
  1146. package/build/types/utils/data-collection/resolveDataCollectionOptions.d.ts +14 -0
  1147. package/build/types/utils/data-collection/resolveDataCollectionOptions.d.ts.map +1 -0
  1148. package/build/types/utils/debug-ids.d.ts +2 -2
  1149. package/build/types/utils/debug-ids.d.ts.map +1 -1
  1150. package/build/types/utils/debug-logger.d.ts +1 -1
  1151. package/build/types/utils/debug-logger.d.ts.map +1 -1
  1152. package/build/types/utils/dsn.d.ts +1 -1
  1153. package/build/types/utils/dsn.d.ts.map +1 -1
  1154. package/build/types/utils/env.d.ts.map +1 -1
  1155. package/build/types/utils/envelope.d.ts +8 -8
  1156. package/build/types/utils/envelope.d.ts.map +1 -1
  1157. package/build/types/utils/error.d.ts +1 -1
  1158. package/build/types/utils/error.d.ts.map +1 -1
  1159. package/build/types/utils/eventUtils.d.ts +1 -1
  1160. package/build/types/utils/eventUtils.d.ts.map +1 -1
  1161. package/build/types/utils/eventbuilder.d.ts +6 -6
  1162. package/build/types/utils/eventbuilder.d.ts.map +1 -1
  1163. package/build/types/utils/featureFlags.d.ts +1 -1
  1164. package/build/types/utils/featureFlags.d.ts.map +1 -1
  1165. package/build/types/utils/hasSpansEnabled.d.ts +1 -1
  1166. package/build/types/utils/hasSpansEnabled.d.ts.map +1 -1
  1167. package/build/types/utils/ipAddress.d.ts +2 -2
  1168. package/build/types/utils/ipAddress.d.ts.map +1 -1
  1169. package/build/types/utils/is.d.ts +4 -4
  1170. package/build/types/utils/is.d.ts.map +1 -1
  1171. package/build/types/utils/meta.d.ts +1 -1
  1172. package/build/types/utils/meta.d.ts.map +1 -1
  1173. package/build/types/utils/misc.d.ts +3 -3
  1174. package/build/types/utils/misc.d.ts.map +1 -1
  1175. package/build/types/utils/node-stack-trace.d.ts +1 -1
  1176. package/build/types/utils/node-stack-trace.d.ts.map +1 -1
  1177. package/build/types/utils/object.d.ts +1 -1
  1178. package/build/types/utils/object.d.ts.map +1 -1
  1179. package/build/types/utils/parameterize.d.ts +1 -1
  1180. package/build/types/utils/parameterize.d.ts.map +1 -1
  1181. package/build/types/utils/prepareEvent.d.ts +3 -3
  1182. package/build/types/utils/prepareEvent.d.ts.map +1 -1
  1183. package/build/types/utils/ratelimit.d.ts +2 -2
  1184. package/build/types/utils/ratelimit.d.ts.map +1 -1
  1185. package/build/types/utils/request.d.ts +3 -3
  1186. package/build/types/utils/request.d.ts.map +1 -1
  1187. package/build/types/utils/scopeData.d.ts +1 -1
  1188. package/build/types/utils/scopeData.d.ts.map +1 -1
  1189. package/build/types/utils/sdkMetadata.d.ts +1 -1
  1190. package/build/types/utils/sdkMetadata.d.ts.map +1 -1
  1191. package/build/types/utils/severity.d.ts +1 -1
  1192. package/build/types/utils/severity.d.ts.map +1 -1
  1193. package/build/types/utils/should-ignore-span.d.ts +2 -2
  1194. package/build/types/utils/should-ignore-span.d.ts.map +1 -1
  1195. package/build/types/utils/spanOnScope.d.ts +1 -1
  1196. package/build/types/utils/spanOnScope.d.ts.map +1 -1
  1197. package/build/types/utils/spanUtils.d.ts +4 -4
  1198. package/build/types/utils/spanUtils.d.ts.map +1 -1
  1199. package/build/types/utils/stacktrace.d.ts +4 -4
  1200. package/build/types/utils/stacktrace.d.ts.map +1 -1
  1201. package/build/types/utils/trace-info.d.ts +2 -2
  1202. package/build/types/utils/trace-info.d.ts.map +1 -1
  1203. package/build/types/utils/traceData.d.ts +2 -2
  1204. package/build/types/utils/traceData.d.ts.map +1 -1
  1205. package/build/types/utils/tracePropagationTargets.d.ts +1 -1
  1206. package/build/types/utils/tracePropagationTargets.d.ts.map +1 -1
  1207. package/build/types/utils/tracing.d.ts +2 -2
  1208. package/build/types/utils/tracing.d.ts.map +1 -1
  1209. package/build/types/utils/transactionEvent.d.ts +2 -2
  1210. package/build/types/utils/transactionEvent.d.ts.map +1 -1
  1211. package/build/types/utils/url.d.ts +1 -1
  1212. package/build/types/utils/url.d.ts.map +1 -1
  1213. package/build/types/utils/worldwide.d.ts +1 -0
  1214. package/build/types/utils/worldwide.d.ts.map +1 -1
  1215. package/build/types-ts3.8/api.d.ts +2 -2
  1216. package/build/types-ts3.8/attributes.d.ts +5 -8
  1217. package/build/types-ts3.8/breadcrumbs.d.ts +1 -1
  1218. package/build/types-ts3.8/browser-exports.d.ts +3 -3
  1219. package/build/types-ts3.8/carrier.d.ts +2 -2
  1220. package/build/types-ts3.8/checkin.d.ts +4 -4
  1221. package/build/types-ts3.8/client.d.ts +32 -22
  1222. package/build/types-ts3.8/currentScopes.d.ts +1 -1
  1223. package/build/types-ts3.8/envelope.d.ts +7 -7
  1224. package/build/types-ts3.8/eventProcessors.d.ts +2 -2
  1225. package/build/types-ts3.8/exports.d.ts +8 -8
  1226. package/build/types-ts3.8/feedback.d.ts +2 -2
  1227. package/build/types-ts3.8/fetch.d.ts +3 -3
  1228. package/build/types-ts3.8/instrument/console.d.ts +1 -1
  1229. package/build/types-ts3.8/instrument/fetch.d.ts +1 -1
  1230. package/build/types-ts3.8/instrument/globalError.d.ts +1 -1
  1231. package/build/types-ts3.8/instrument/globalUnhandledRejection.d.ts +1 -1
  1232. package/build/types-ts3.8/integration.d.ts +2 -2
  1233. package/build/types-ts3.8/integrations/consola.d.ts +1 -1
  1234. package/build/types-ts3.8/integrations/console.d.ts +1 -1
  1235. package/build/types-ts3.8/integrations/dedupe.d.ts +1 -1
  1236. package/build/types-ts3.8/integrations/express/types.d.ts +2 -2
  1237. package/build/types-ts3.8/integrations/express/utils.d.ts +1 -1
  1238. package/build/types-ts3.8/integrations/featureFlags/featureFlagsIntegration.d.ts +1 -1
  1239. package/build/types-ts3.8/integrations/featureFlags/growthbook.d.ts +1 -1
  1240. package/build/types-ts3.8/integrations/http/double-wrap-warning.d.ts +1 -1
  1241. package/build/types-ts3.8/integrations/http/get-outgoing-span-data.d.ts +2 -2
  1242. package/build/types-ts3.8/integrations/http/patch-request-to-capture-body.d.ts +12 -0
  1243. package/build/types-ts3.8/integrations/http/record-request-session.d.ts +18 -0
  1244. package/build/types-ts3.8/integrations/http/server-subscription.d.ts +26 -0
  1245. package/build/types-ts3.8/integrations/http/types.d.ts +12 -6
  1246. package/build/types-ts3.8/integrations/mcp-server/correlation.d.ts +1 -1
  1247. package/build/types-ts3.8/integrations/mcp-server/piiFiltering.d.ts +1 -1
  1248. package/build/types-ts3.8/integrations/mcp-server/types.d.ts +1 -1
  1249. package/build/types-ts3.8/integrations/postgresjs.d.ts +1 -1
  1250. package/build/types-ts3.8/integrations/rewriteframes.d.ts +1 -1
  1251. package/build/types-ts3.8/integrations/supabase.d.ts +14 -3
  1252. package/build/types-ts3.8/integrations/zoderrors.d.ts +1 -1
  1253. package/build/types-ts3.8/logs/console-integration.d.ts +1 -1
  1254. package/build/types-ts3.8/logs/constants.d.ts +1 -1
  1255. package/build/types-ts3.8/logs/envelope.d.ts +4 -4
  1256. package/build/types-ts3.8/logs/internal.d.ts +16 -1
  1257. package/build/types-ts3.8/logs/public-api.d.ts +2 -2
  1258. package/build/types-ts3.8/metadata.d.ts +2 -2
  1259. package/build/types-ts3.8/metrics/envelope.d.ts +4 -4
  1260. package/build/types-ts3.8/metrics/internal.d.ts +1 -1
  1261. package/build/types-ts3.8/metrics/public-api.d.ts +1 -1
  1262. package/build/types-ts3.8/profiling.d.ts +1 -1
  1263. package/build/types-ts3.8/report-dialog.d.ts +1 -1
  1264. package/build/types-ts3.8/scope.d.ts +14 -14
  1265. package/build/types-ts3.8/sdk.d.ts +1 -1
  1266. package/build/types-ts3.8/semanticAttributes.d.ts +2 -0
  1267. package/build/types-ts3.8/server-exports.d.ts +3 -1
  1268. package/build/types-ts3.8/server-runtime-client.d.ts +6 -6
  1269. package/build/types-ts3.8/session.d.ts +1 -1
  1270. package/build/types-ts3.8/shared-exports.d.ts +58 -53
  1271. package/build/types-ts3.8/tracing/ai/utils.d.ts +1 -1
  1272. package/build/types-ts3.8/tracing/anthropic-ai/streaming.d.ts +1 -1
  1273. package/build/types-ts3.8/tracing/anthropic-ai/utils.d.ts +2 -2
  1274. package/build/types-ts3.8/tracing/dynamicSamplingContext.d.ts +2 -2
  1275. package/build/types-ts3.8/tracing/google-genai/streaming.d.ts +1 -1
  1276. package/build/types-ts3.8/tracing/idleSpan.d.ts +2 -2
  1277. package/build/types-ts3.8/tracing/langchain/utils.d.ts +6 -1
  1278. package/build/types-ts3.8/tracing/langgraph/utils.d.ts +1 -3
  1279. package/build/types-ts3.8/tracing/logSpans.d.ts +1 -1
  1280. package/build/types-ts3.8/tracing/measurement.d.ts +2 -2
  1281. package/build/types-ts3.8/tracing/openai/streaming.d.ts +1 -1
  1282. package/build/types-ts3.8/tracing/openai/utils.d.ts +1 -1
  1283. package/build/types-ts3.8/tracing/sampling.d.ts +2 -2
  1284. package/build/types-ts3.8/tracing/sentryNonRecordingSpan.d.ts +3 -3
  1285. package/build/types-ts3.8/tracing/sentrySpan.d.ts +4 -4
  1286. package/build/types-ts3.8/tracing/spans/beforeSendSpan.d.ts +3 -3
  1287. package/build/types-ts3.8/tracing/spans/captureSpan.d.ts +1 -1
  1288. package/build/types-ts3.8/tracing/spans/envelope.d.ts +2 -2
  1289. package/build/types-ts3.8/tracing/spans/estimateSize.d.ts +1 -1
  1290. package/build/types-ts3.8/tracing/spans/extractGenAiSpans.d.ts +2 -2
  1291. package/build/types-ts3.8/tracing/spans/scopeContextAttributes.d.ts +9 -0
  1292. package/build/types-ts3.8/tracing/spans/spanJsonToStreamedSpan.d.ts +1 -1
  1293. package/build/types-ts3.8/tracing/spanstatus.d.ts +2 -2
  1294. package/build/types-ts3.8/tracing/trace.d.ts +2 -2
  1295. package/build/types-ts3.8/tracing/utils.d.ts +1 -1
  1296. package/build/types-ts3.8/tracing/vercel-ai/utils.d.ts +2 -2
  1297. package/build/types-ts3.8/transports/base.d.ts +1 -1
  1298. package/build/types-ts3.8/transports/multiplexed.d.ts +3 -3
  1299. package/build/types-ts3.8/transports/offline.d.ts +2 -2
  1300. package/build/types-ts3.8/transports/userAgent.d.ts +1 -1
  1301. package/build/types-ts3.8/types/datacollection.d.ts +75 -0
  1302. package/build/types-ts3.8/{types-hoist → types}/options.d.ts +17 -0
  1303. package/build/types-ts3.8/{types-hoist → types}/samplingcontext.d.ts +1 -1
  1304. package/build/types-ts3.8/{types-hoist → types}/startSpanOptions.d.ts +13 -0
  1305. package/build/types-ts3.8/utils/aggregate-errors.d.ts +3 -3
  1306. package/build/types-ts3.8/utils/anr.d.ts +1 -1
  1307. package/build/types-ts3.8/utils/baggage.d.ts +1 -1
  1308. package/build/types-ts3.8/utils/breadcrumb-log-level.d.ts +1 -1
  1309. package/build/types-ts3.8/utils/clientreport.d.ts +2 -2
  1310. package/build/types-ts3.8/utils/data-collection/defaultPiiToCollectionOptions.d.ts +6 -0
  1311. package/build/types-ts3.8/utils/data-collection/filterCookies.d.ts +9 -0
  1312. package/build/types-ts3.8/utils/data-collection/filterKeyValueData.d.ts +11 -0
  1313. package/build/types-ts3.8/utils/data-collection/filterQueryParams.d.ts +9 -0
  1314. package/build/types-ts3.8/utils/data-collection/filtering-snippets.d.ts +14 -0
  1315. package/build/types-ts3.8/utils/data-collection/resolveDataCollectionOptions.d.ts +14 -0
  1316. package/build/types-ts3.8/utils/debug-ids.d.ts +2 -2
  1317. package/build/types-ts3.8/utils/debug-logger.d.ts +1 -1
  1318. package/build/types-ts3.8/utils/dsn.d.ts +1 -1
  1319. package/build/types-ts3.8/utils/envelope.d.ts +8 -8
  1320. package/build/types-ts3.8/utils/error.d.ts +1 -1
  1321. package/build/types-ts3.8/utils/eventUtils.d.ts +1 -1
  1322. package/build/types-ts3.8/utils/eventbuilder.d.ts +6 -6
  1323. package/build/types-ts3.8/utils/featureFlags.d.ts +1 -1
  1324. package/build/types-ts3.8/utils/hasSpansEnabled.d.ts +1 -1
  1325. package/build/types-ts3.8/utils/ipAddress.d.ts +2 -2
  1326. package/build/types-ts3.8/utils/is.d.ts +4 -4
  1327. package/build/types-ts3.8/utils/meta.d.ts +1 -1
  1328. package/build/types-ts3.8/utils/misc.d.ts +3 -3
  1329. package/build/types-ts3.8/utils/node-stack-trace.d.ts +1 -1
  1330. package/build/types-ts3.8/utils/object.d.ts +1 -1
  1331. package/build/types-ts3.8/utils/parameterize.d.ts +1 -1
  1332. package/build/types-ts3.8/utils/prepareEvent.d.ts +3 -3
  1333. package/build/types-ts3.8/utils/ratelimit.d.ts +2 -2
  1334. package/build/types-ts3.8/utils/request.d.ts +3 -3
  1335. package/build/types-ts3.8/utils/scopeData.d.ts +1 -1
  1336. package/build/types-ts3.8/utils/sdkMetadata.d.ts +1 -1
  1337. package/build/types-ts3.8/utils/severity.d.ts +1 -1
  1338. package/build/types-ts3.8/utils/should-ignore-span.d.ts +2 -2
  1339. package/build/types-ts3.8/utils/spanOnScope.d.ts +1 -1
  1340. package/build/types-ts3.8/utils/spanUtils.d.ts +4 -4
  1341. package/build/types-ts3.8/utils/stacktrace.d.ts +4 -4
  1342. package/build/types-ts3.8/utils/trace-info.d.ts +2 -2
  1343. package/build/types-ts3.8/utils/traceData.d.ts +2 -2
  1344. package/build/types-ts3.8/utils/tracePropagationTargets.d.ts +1 -1
  1345. package/build/types-ts3.8/utils/tracing.d.ts +2 -2
  1346. package/build/types-ts3.8/utils/transactionEvent.d.ts +2 -2
  1347. package/build/types-ts3.8/utils/url.d.ts +1 -1
  1348. package/build/types-ts3.8/utils/worldwide.d.ts +1 -0
  1349. package/package.json +1 -1
  1350. package/build/types/types-hoist/attachment.d.ts.map +0 -1
  1351. package/build/types/types-hoist/breadcrumb.d.ts.map +0 -1
  1352. package/build/types/types-hoist/browseroptions.d.ts.map +0 -1
  1353. package/build/types/types-hoist/checkin.d.ts.map +0 -1
  1354. package/build/types/types-hoist/clientreport.d.ts.map +0 -1
  1355. package/build/types/types-hoist/context.d.ts.map +0 -1
  1356. package/build/types/types-hoist/csp.d.ts.map +0 -1
  1357. package/build/types/types-hoist/datacategory.d.ts.map +0 -1
  1358. package/build/types/types-hoist/debugMeta.d.ts.map +0 -1
  1359. package/build/types/types-hoist/dsn.d.ts.map +0 -1
  1360. package/build/types/types-hoist/envelope.d.ts.map +0 -1
  1361. package/build/types/types-hoist/error.d.ts.map +0 -1
  1362. package/build/types/types-hoist/event.d.ts.map +0 -1
  1363. package/build/types/types-hoist/eventprocessor.d.ts.map +0 -1
  1364. package/build/types/types-hoist/exception.d.ts.map +0 -1
  1365. package/build/types/types-hoist/extra.d.ts.map +0 -1
  1366. package/build/types/types-hoist/feedback/config.d.ts.map +0 -1
  1367. package/build/types/types-hoist/feedback/form.d.ts.map +0 -1
  1368. package/build/types/types-hoist/feedback/index.d.ts.map +0 -1
  1369. package/build/types/types-hoist/feedback/sendFeedback.d.ts.map +0 -1
  1370. package/build/types/types-hoist/feedback/theme.d.ts.map +0 -1
  1371. package/build/types/types-hoist/instrument.d.ts.map +0 -1
  1372. package/build/types/types-hoist/integration.d.ts.map +0 -1
  1373. package/build/types/types-hoist/link.d.ts.map +0 -1
  1374. package/build/types/types-hoist/log.d.ts.map +0 -1
  1375. package/build/types/types-hoist/measurement.d.ts.map +0 -1
  1376. package/build/types/types-hoist/mechanism.d.ts.map +0 -1
  1377. package/build/types/types-hoist/metric.d.ts.map +0 -1
  1378. package/build/types/types-hoist/misc.d.ts.map +0 -1
  1379. package/build/types/types-hoist/opentelemetry.d.ts.map +0 -1
  1380. package/build/types/types-hoist/options.d.ts.map +0 -1
  1381. package/build/types/types-hoist/package.d.ts.map +0 -1
  1382. package/build/types/types-hoist/parameterize.d.ts.map +0 -1
  1383. package/build/types/types-hoist/polymorphics.d.ts.map +0 -1
  1384. package/build/types/types-hoist/profiling.d.ts.map +0 -1
  1385. package/build/types/types-hoist/replay.d.ts.map +0 -1
  1386. package/build/types/types-hoist/request.d.ts.map +0 -1
  1387. package/build/types/types-hoist/runtime.d.ts.map +0 -1
  1388. package/build/types/types-hoist/samplingcontext.d.ts.map +0 -1
  1389. package/build/types/types-hoist/sdkinfo.d.ts.map +0 -1
  1390. package/build/types/types-hoist/sdkmetadata.d.ts.map +0 -1
  1391. package/build/types/types-hoist/session.d.ts.map +0 -1
  1392. package/build/types/types-hoist/severity.d.ts.map +0 -1
  1393. package/build/types/types-hoist/span.d.ts.map +0 -1
  1394. package/build/types/types-hoist/spanStatus.d.ts.map +0 -1
  1395. package/build/types/types-hoist/stackframe.d.ts.map +0 -1
  1396. package/build/types/types-hoist/stacktrace.d.ts.map +0 -1
  1397. package/build/types/types-hoist/startSpanOptions.d.ts.map +0 -1
  1398. package/build/types/types-hoist/thread.d.ts.map +0 -1
  1399. package/build/types/types-hoist/timedEvent.d.ts.map +0 -1
  1400. package/build/types/types-hoist/tracing.d.ts.map +0 -1
  1401. package/build/types/types-hoist/transaction.d.ts.map +0 -1
  1402. package/build/types/types-hoist/transport.d.ts.map +0 -1
  1403. package/build/types/types-hoist/user.d.ts.map +0 -1
  1404. package/build/types/types-hoist/view-hierarchy.d.ts.map +0 -1
  1405. package/build/types/types-hoist/vue.d.ts.map +0 -1
  1406. package/build/types/types-hoist/webfetchapi.d.ts.map +0 -1
  1407. package/build/types/types-hoist/wrappedfunction.d.ts.map +0 -1
  1408. /package/build/types/{types-hoist → types}/attachment.d.ts +0 -0
  1409. /package/build/types/{types-hoist → types}/breadcrumb.d.ts +0 -0
  1410. /package/build/types/{types-hoist → types}/browseroptions.d.ts +0 -0
  1411. /package/build/types/{types-hoist → types}/checkin.d.ts +0 -0
  1412. /package/build/types/{types-hoist → types}/clientreport.d.ts +0 -0
  1413. /package/build/types/{types-hoist → types}/context.d.ts +0 -0
  1414. /package/build/types/{types-hoist → types}/csp.d.ts +0 -0
  1415. /package/build/types/{types-hoist → types}/datacategory.d.ts +0 -0
  1416. /package/build/types/{types-hoist → types}/debugMeta.d.ts +0 -0
  1417. /package/build/types/{types-hoist → types}/dsn.d.ts +0 -0
  1418. /package/build/types/{types-hoist → types}/envelope.d.ts +0 -0
  1419. /package/build/types/{types-hoist → types}/error.d.ts +0 -0
  1420. /package/build/types/{types-hoist → types}/event.d.ts +0 -0
  1421. /package/build/types/{types-hoist → types}/eventprocessor.d.ts +0 -0
  1422. /package/build/types/{types-hoist → types}/exception.d.ts +0 -0
  1423. /package/build/types/{types-hoist → types}/extra.d.ts +0 -0
  1424. /package/build/types/{types-hoist → types}/feedback/config.d.ts +0 -0
  1425. /package/build/types/{types-hoist → types}/feedback/form.d.ts +0 -0
  1426. /package/build/types/{types-hoist → types}/feedback/index.d.ts +0 -0
  1427. /package/build/types/{types-hoist → types}/feedback/sendFeedback.d.ts +0 -0
  1428. /package/build/types/{types-hoist → types}/feedback/theme.d.ts +0 -0
  1429. /package/build/types/{types-hoist → types}/instrument.d.ts +0 -0
  1430. /package/build/types/{types-hoist → types}/integration.d.ts +0 -0
  1431. /package/build/types/{types-hoist → types}/link.d.ts +0 -0
  1432. /package/build/types/{types-hoist → types}/log.d.ts +0 -0
  1433. /package/build/types/{types-hoist → types}/measurement.d.ts +0 -0
  1434. /package/build/types/{types-hoist → types}/mechanism.d.ts +0 -0
  1435. /package/build/types/{types-hoist → types}/metric.d.ts +0 -0
  1436. /package/build/types/{types-hoist → types}/misc.d.ts +0 -0
  1437. /package/build/types/{types-hoist → types}/opentelemetry.d.ts +0 -0
  1438. /package/build/types/{types-hoist → types}/package.d.ts +0 -0
  1439. /package/build/types/{types-hoist → types}/parameterize.d.ts +0 -0
  1440. /package/build/types/{types-hoist → types}/polymorphics.d.ts +0 -0
  1441. /package/build/types/{types-hoist → types}/profiling.d.ts +0 -0
  1442. /package/build/types/{types-hoist → types}/replay.d.ts +0 -0
  1443. /package/build/types/{types-hoist → types}/request.d.ts +0 -0
  1444. /package/build/types/{types-hoist → types}/runtime.d.ts +0 -0
  1445. /package/build/types/{types-hoist → types}/sdkinfo.d.ts +0 -0
  1446. /package/build/types/{types-hoist → types}/sdkmetadata.d.ts +0 -0
  1447. /package/build/types/{types-hoist → types}/session.d.ts +0 -0
  1448. /package/build/types/{types-hoist → types}/severity.d.ts +0 -0
  1449. /package/build/types/{types-hoist → types}/span.d.ts +0 -0
  1450. /package/build/types/{types-hoist → types}/spanStatus.d.ts +0 -0
  1451. /package/build/types/{types-hoist → types}/stackframe.d.ts +0 -0
  1452. /package/build/types/{types-hoist → types}/stacktrace.d.ts +0 -0
  1453. /package/build/types/{types-hoist → types}/thread.d.ts +0 -0
  1454. /package/build/types/{types-hoist → types}/timedEvent.d.ts +0 -0
  1455. /package/build/types/{types-hoist → types}/tracing.d.ts +0 -0
  1456. /package/build/types/{types-hoist → types}/transaction.d.ts +0 -0
  1457. /package/build/types/{types-hoist → types}/transport.d.ts +0 -0
  1458. /package/build/types/{types-hoist → types}/user.d.ts +0 -0
  1459. /package/build/types/{types-hoist → types}/view-hierarchy.d.ts +0 -0
  1460. /package/build/types/{types-hoist → types}/vue.d.ts +0 -0
  1461. /package/build/types/{types-hoist → types}/webfetchapi.d.ts +0 -0
  1462. /package/build/types/{types-hoist → types}/wrappedfunction.d.ts +0 -0
  1463. /package/build/types-ts3.8/{types-hoist → types}/attachment.d.ts +0 -0
  1464. /package/build/types-ts3.8/{types-hoist → types}/breadcrumb.d.ts +0 -0
  1465. /package/build/types-ts3.8/{types-hoist → types}/browseroptions.d.ts +0 -0
  1466. /package/build/types-ts3.8/{types-hoist → types}/checkin.d.ts +0 -0
  1467. /package/build/types-ts3.8/{types-hoist → types}/clientreport.d.ts +0 -0
  1468. /package/build/types-ts3.8/{types-hoist → types}/context.d.ts +0 -0
  1469. /package/build/types-ts3.8/{types-hoist → types}/csp.d.ts +0 -0
  1470. /package/build/types-ts3.8/{types-hoist → types}/datacategory.d.ts +0 -0
  1471. /package/build/types-ts3.8/{types-hoist → types}/debugMeta.d.ts +0 -0
  1472. /package/build/types-ts3.8/{types-hoist → types}/dsn.d.ts +0 -0
  1473. /package/build/types-ts3.8/{types-hoist → types}/envelope.d.ts +0 -0
  1474. /package/build/types-ts3.8/{types-hoist → types}/error.d.ts +0 -0
  1475. /package/build/types-ts3.8/{types-hoist → types}/event.d.ts +0 -0
  1476. /package/build/types-ts3.8/{types-hoist → types}/eventprocessor.d.ts +0 -0
  1477. /package/build/types-ts3.8/{types-hoist → types}/exception.d.ts +0 -0
  1478. /package/build/types-ts3.8/{types-hoist → types}/extra.d.ts +0 -0
  1479. /package/build/types-ts3.8/{types-hoist → types}/feedback/config.d.ts +0 -0
  1480. /package/build/types-ts3.8/{types-hoist → types}/feedback/form.d.ts +0 -0
  1481. /package/build/types-ts3.8/{types-hoist → types}/feedback/index.d.ts +0 -0
  1482. /package/build/types-ts3.8/{types-hoist → types}/feedback/sendFeedback.d.ts +0 -0
  1483. /package/build/types-ts3.8/{types-hoist → types}/feedback/theme.d.ts +0 -0
  1484. /package/build/types-ts3.8/{types-hoist → types}/instrument.d.ts +0 -0
  1485. /package/build/types-ts3.8/{types-hoist → types}/integration.d.ts +0 -0
  1486. /package/build/types-ts3.8/{types-hoist → types}/link.d.ts +0 -0
  1487. /package/build/types-ts3.8/{types-hoist → types}/log.d.ts +0 -0
  1488. /package/build/types-ts3.8/{types-hoist → types}/measurement.d.ts +0 -0
  1489. /package/build/types-ts3.8/{types-hoist → types}/mechanism.d.ts +0 -0
  1490. /package/build/types-ts3.8/{types-hoist → types}/metric.d.ts +0 -0
  1491. /package/build/types-ts3.8/{types-hoist → types}/misc.d.ts +0 -0
  1492. /package/build/types-ts3.8/{types-hoist → types}/opentelemetry.d.ts +0 -0
  1493. /package/build/types-ts3.8/{types-hoist → types}/package.d.ts +0 -0
  1494. /package/build/types-ts3.8/{types-hoist → types}/parameterize.d.ts +0 -0
  1495. /package/build/types-ts3.8/{types-hoist → types}/polymorphics.d.ts +0 -0
  1496. /package/build/types-ts3.8/{types-hoist → types}/profiling.d.ts +0 -0
  1497. /package/build/types-ts3.8/{types-hoist → types}/replay.d.ts +0 -0
  1498. /package/build/types-ts3.8/{types-hoist → types}/request.d.ts +0 -0
  1499. /package/build/types-ts3.8/{types-hoist → types}/runtime.d.ts +0 -0
  1500. /package/build/types-ts3.8/{types-hoist → types}/sdkinfo.d.ts +0 -0
  1501. /package/build/types-ts3.8/{types-hoist → types}/sdkmetadata.d.ts +0 -0
  1502. /package/build/types-ts3.8/{types-hoist → types}/session.d.ts +0 -0
  1503. /package/build/types-ts3.8/{types-hoist → types}/severity.d.ts +0 -0
  1504. /package/build/types-ts3.8/{types-hoist → types}/span.d.ts +0 -0
  1505. /package/build/types-ts3.8/{types-hoist → types}/spanStatus.d.ts +0 -0
  1506. /package/build/types-ts3.8/{types-hoist → types}/stackframe.d.ts +0 -0
  1507. /package/build/types-ts3.8/{types-hoist → types}/stacktrace.d.ts +0 -0
  1508. /package/build/types-ts3.8/{types-hoist → types}/thread.d.ts +0 -0
  1509. /package/build/types-ts3.8/{types-hoist → types}/timedEvent.d.ts +0 -0
  1510. /package/build/types-ts3.8/{types-hoist → types}/tracing.d.ts +0 -0
  1511. /package/build/types-ts3.8/{types-hoist → types}/transaction.d.ts +0 -0
  1512. /package/build/types-ts3.8/{types-hoist → types}/transport.d.ts +0 -0
  1513. /package/build/types-ts3.8/{types-hoist → types}/user.d.ts +0 -0
  1514. /package/build/types-ts3.8/{types-hoist → types}/view-hierarchy.d.ts +0 -0
  1515. /package/build/types-ts3.8/{types-hoist → types}/vue.d.ts +0 -0
  1516. /package/build/types-ts3.8/{types-hoist → types}/webfetchapi.d.ts +0 -0
  1517. /package/build/types-ts3.8/{types-hoist → types}/wrappedfunction.d.ts +0 -0
@@ -5,61 +5,37 @@ let parsedStackResults;
5
5
  let lastSentryKeysCount;
6
6
  let lastNativeKeysCount;
7
7
  let cachedFilenameDebugIds;
8
-
9
- /**
10
- * Returns a map of filenames to debug identifiers.
11
- * Supports both proprietary _sentryDebugIds and native _debugIds (e.g., from Vercel) formats.
12
- */
13
8
  function getFilenameToDebugIdMap(stackParser) {
14
9
  const sentryDebugIdMap = GLOBAL_OBJ._sentryDebugIds;
15
10
  const nativeDebugIdMap = GLOBAL_OBJ._debugIds;
16
-
17
11
  if (!sentryDebugIdMap && !nativeDebugIdMap) {
18
12
  return {};
19
13
  }
20
-
21
14
  const sentryDebugIdKeys = sentryDebugIdMap ? Object.keys(sentryDebugIdMap) : [];
22
15
  const nativeDebugIdKeys = nativeDebugIdMap ? Object.keys(nativeDebugIdMap) : [];
23
-
24
- // If the count of registered globals hasn't changed since the last call, we
25
- // can just return the cached result.
26
- if (
27
- cachedFilenameDebugIds &&
28
- sentryDebugIdKeys.length === lastSentryKeysCount &&
29
- nativeDebugIdKeys.length === lastNativeKeysCount
30
- ) {
16
+ if (cachedFilenameDebugIds && sentryDebugIdKeys.length === lastSentryKeysCount && nativeDebugIdKeys.length === lastNativeKeysCount) {
31
17
  return cachedFilenameDebugIds;
32
18
  }
33
-
34
19
  lastSentryKeysCount = sentryDebugIdKeys.length;
35
20
  lastNativeKeysCount = nativeDebugIdKeys.length;
36
-
37
- // Build a map of filename -> debug_id from both sources
38
21
  cachedFilenameDebugIds = {};
39
-
40
22
  if (!parsedStackResults) {
41
23
  parsedStackResults = {};
42
24
  }
43
-
44
25
  const processDebugIds = (debugIdKeys, debugIdMap) => {
45
26
  for (const key of debugIdKeys) {
46
27
  const debugId = debugIdMap[key];
47
28
  const result = parsedStackResults?.[key];
48
-
49
29
  if (result && cachedFilenameDebugIds && debugId) {
50
- // Use cached filename but update with current debug ID
51
30
  cachedFilenameDebugIds[result[0]] = debugId;
52
- // Update cached result with new debug ID
53
31
  if (parsedStackResults) {
54
32
  parsedStackResults[key] = [result[0], debugId];
55
33
  }
56
34
  } else if (debugId) {
57
35
  const parsedStack = stackParser(key);
58
-
59
36
  for (let i = parsedStack.length - 1; i >= 0; i--) {
60
37
  const stackFrame = parsedStack[i];
61
38
  const filename = stackFrame?.filename;
62
-
63
39
  if (filename && cachedFilenameDebugIds && parsedStackResults) {
64
40
  cachedFilenameDebugIds[filename] = debugId;
65
41
  parsedStackResults[key] = [filename, debugId];
@@ -69,44 +45,30 @@ function getFilenameToDebugIdMap(stackParser) {
69
45
  }
70
46
  }
71
47
  };
72
-
73
48
  if (sentryDebugIdMap) {
74
49
  processDebugIds(sentryDebugIdKeys, sentryDebugIdMap);
75
50
  }
76
-
77
- // Native _debugIds will override _sentryDebugIds if same file
78
51
  if (nativeDebugIdMap) {
79
52
  processDebugIds(nativeDebugIdKeys, nativeDebugIdMap);
80
53
  }
81
-
82
54
  return cachedFilenameDebugIds;
83
55
  }
84
-
85
- /**
86
- * Returns a list of debug images for the given resources.
87
- */
88
- function getDebugImagesForResources(
89
- stackParser,
90
- resource_paths,
91
- ) {
56
+ function getDebugImagesForResources(stackParser, resource_paths) {
92
57
  const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);
93
-
94
58
  if (!filenameDebugIdMap) {
95
59
  return [];
96
60
  }
97
-
98
61
  const images = [];
99
62
  for (const path of resource_paths) {
100
63
  const normalizedPath = normalizeStackTracePath(path);
101
64
  if (normalizedPath && filenameDebugIdMap[normalizedPath]) {
102
65
  images.push({
103
- type: 'sourcemap',
66
+ type: "sourcemap",
104
67
  code_file: path,
105
- debug_id: filenameDebugIdMap[normalizedPath],
68
+ debug_id: filenameDebugIdMap[normalizedPath]
106
69
  });
107
70
  }
108
71
  }
109
-
110
72
  return images;
111
73
  }
112
74
 
@@ -1 +1 @@
1
- {"version":3,"file":"debug-ids.js","sources":["../../../src/utils/debug-ids.ts"],"sourcesContent":["import type { DebugImage } from '../types-hoist/debugMeta';\nimport type { StackParser } from '../types-hoist/stacktrace';\nimport { normalizeStackTracePath } from './stacktrace';\nimport { GLOBAL_OBJ } from './worldwide';\n\ntype StackString = string;\ntype CachedResult = [string, string];\n\nlet parsedStackResults: Record<StackString, CachedResult> | undefined;\nlet lastSentryKeysCount: number | undefined;\nlet lastNativeKeysCount: number | undefined;\nlet cachedFilenameDebugIds: Record<string, string> | undefined;\n\n/**\n * Clears the cached debug ID mappings.\n * Useful for testing or when the global debug ID state changes.\n */\nexport function clearDebugIdCache(): void {\n parsedStackResults = undefined;\n lastSentryKeysCount = undefined;\n lastNativeKeysCount = undefined;\n cachedFilenameDebugIds = undefined;\n}\n\n/**\n * Returns a map of filenames to debug identifiers.\n * Supports both proprietary _sentryDebugIds and native _debugIds (e.g., from Vercel) formats.\n */\nexport function getFilenameToDebugIdMap(stackParser: StackParser): Record<string, string> {\n const sentryDebugIdMap = GLOBAL_OBJ._sentryDebugIds;\n const nativeDebugIdMap = GLOBAL_OBJ._debugIds;\n\n if (!sentryDebugIdMap && !nativeDebugIdMap) {\n return {};\n }\n\n const sentryDebugIdKeys = sentryDebugIdMap ? Object.keys(sentryDebugIdMap) : [];\n const nativeDebugIdKeys = nativeDebugIdMap ? Object.keys(nativeDebugIdMap) : [];\n\n // If the count of registered globals hasn't changed since the last call, we\n // can just return the cached result.\n if (\n cachedFilenameDebugIds &&\n sentryDebugIdKeys.length === lastSentryKeysCount &&\n nativeDebugIdKeys.length === lastNativeKeysCount\n ) {\n return cachedFilenameDebugIds;\n }\n\n lastSentryKeysCount = sentryDebugIdKeys.length;\n lastNativeKeysCount = nativeDebugIdKeys.length;\n\n // Build a map of filename -> debug_id from both sources\n cachedFilenameDebugIds = {};\n\n if (!parsedStackResults) {\n parsedStackResults = {};\n }\n\n const processDebugIds = (debugIdKeys: string[], debugIdMap: Record<string, string>): void => {\n for (const key of debugIdKeys) {\n const debugId = debugIdMap[key];\n const result = parsedStackResults?.[key];\n\n if (result && cachedFilenameDebugIds && debugId) {\n // Use cached filename but update with current debug ID\n cachedFilenameDebugIds[result[0]] = debugId;\n // Update cached result with new debug ID\n if (parsedStackResults) {\n parsedStackResults[key] = [result[0], debugId];\n }\n } else if (debugId) {\n const parsedStack = stackParser(key);\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n const filename = stackFrame?.filename;\n\n if (filename && cachedFilenameDebugIds && parsedStackResults) {\n cachedFilenameDebugIds[filename] = debugId;\n parsedStackResults[key] = [filename, debugId];\n break;\n }\n }\n }\n }\n };\n\n if (sentryDebugIdMap) {\n processDebugIds(sentryDebugIdKeys, sentryDebugIdMap);\n }\n\n // Native _debugIds will override _sentryDebugIds if same file\n if (nativeDebugIdMap) {\n processDebugIds(nativeDebugIdKeys, nativeDebugIdMap);\n }\n\n return cachedFilenameDebugIds;\n}\n\n/**\n * Returns a list of debug images for the given resources.\n */\nexport function getDebugImagesForResources(\n stackParser: StackParser,\n resource_paths: ReadonlyArray<string>,\n): DebugImage[] {\n const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n if (!filenameDebugIdMap) {\n return [];\n }\n\n const images: DebugImage[] = [];\n for (const path of resource_paths) {\n const normalizedPath = normalizeStackTracePath(path);\n if (normalizedPath && filenameDebugIdMap[normalizedPath]) {\n images.push({\n type: 'sourcemap',\n code_file: path,\n debug_id: filenameDebugIdMap[normalizedPath],\n });\n }\n }\n\n return images;\n}\n"],"names":[],"mappings":";;;AAQA,IAAI,kBAAkB;AACtB,IAAI,mBAAmB;AACvB,IAAI,mBAAmB;AACvB,IAAI,sBAAsB;;AAa1B;AACA;AACA;AACA;AACO,SAAS,uBAAuB,CAAC,WAAW,EAAuC;AAC1F,EAAE,MAAM,gBAAA,GAAmB,UAAU,CAAC,eAAe;AACrD,EAAE,MAAM,gBAAA,GAAmB,UAAU,CAAC,SAAS;;AAE/C,EAAE,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,EAAE;AAC9C,IAAI,OAAO,EAAE;AACb,EAAE;;AAEF,EAAE,MAAM,iBAAA,GAAoB,gBAAA,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ACpD,OAAO,CAAC;AACR,IAAI;AACJ,EAAE;;AAEF,EAAE,OAAO,MAAM;AACf;;;;"}
1
+ {"version":3,"file":"debug-ids.js","sources":["../../../src/utils/debug-ids.ts"],"sourcesContent":["import type { DebugImage } from '../types/debugMeta';\nimport type { StackParser } from '../types/stacktrace';\nimport { normalizeStackTracePath } from './stacktrace';\nimport { GLOBAL_OBJ } from './worldwide';\n\ntype StackString = string;\ntype CachedResult = [string, string];\n\nlet parsedStackResults: Record<StackString, CachedResult> | undefined;\nlet lastSentryKeysCount: number | undefined;\nlet lastNativeKeysCount: number | undefined;\nlet cachedFilenameDebugIds: Record<string, string> | undefined;\n\n/**\n * Clears the cached debug ID mappings.\n * Useful for testing or when the global debug ID state changes.\n */\nexport function clearDebugIdCache(): void {\n parsedStackResults = undefined;\n lastSentryKeysCount = undefined;\n lastNativeKeysCount = undefined;\n cachedFilenameDebugIds = undefined;\n}\n\n/**\n * Returns a map of filenames to debug identifiers.\n * Supports both proprietary _sentryDebugIds and native _debugIds (e.g., from Vercel) formats.\n */\nexport function getFilenameToDebugIdMap(stackParser: StackParser): Record<string, string> {\n const sentryDebugIdMap = GLOBAL_OBJ._sentryDebugIds;\n const nativeDebugIdMap = GLOBAL_OBJ._debugIds;\n\n if (!sentryDebugIdMap && !nativeDebugIdMap) {\n return {};\n }\n\n const sentryDebugIdKeys = sentryDebugIdMap ? Object.keys(sentryDebugIdMap) : [];\n const nativeDebugIdKeys = nativeDebugIdMap ? Object.keys(nativeDebugIdMap) : [];\n\n // If the count of registered globals hasn't changed since the last call, we\n // can just return the cached result.\n if (\n cachedFilenameDebugIds &&\n sentryDebugIdKeys.length === lastSentryKeysCount &&\n nativeDebugIdKeys.length === lastNativeKeysCount\n ) {\n return cachedFilenameDebugIds;\n }\n\n lastSentryKeysCount = sentryDebugIdKeys.length;\n lastNativeKeysCount = nativeDebugIdKeys.length;\n\n // Build a map of filename -> debug_id from both sources\n cachedFilenameDebugIds = {};\n\n if (!parsedStackResults) {\n parsedStackResults = {};\n }\n\n const processDebugIds = (debugIdKeys: string[], debugIdMap: Record<string, string>): void => {\n for (const key of debugIdKeys) {\n const debugId = debugIdMap[key];\n const result = parsedStackResults?.[key];\n\n if (result && cachedFilenameDebugIds && debugId) {\n // Use cached filename but update with current debug ID\n cachedFilenameDebugIds[result[0]] = debugId;\n // Update cached result with new debug ID\n if (parsedStackResults) {\n parsedStackResults[key] = [result[0], debugId];\n }\n } else if (debugId) {\n const parsedStack = stackParser(key);\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n const filename = stackFrame?.filename;\n\n if (filename && cachedFilenameDebugIds && parsedStackResults) {\n cachedFilenameDebugIds[filename] = debugId;\n parsedStackResults[key] = [filename, debugId];\n break;\n }\n }\n }\n }\n };\n\n if (sentryDebugIdMap) {\n processDebugIds(sentryDebugIdKeys, sentryDebugIdMap);\n }\n\n // Native _debugIds will override _sentryDebugIds if same file\n if (nativeDebugIdMap) {\n processDebugIds(nativeDebugIdKeys, nativeDebugIdMap);\n }\n\n return cachedFilenameDebugIds;\n}\n\n/**\n * Returns a list of debug images for the given resources.\n */\nexport function getDebugImagesForResources(\n stackParser: StackParser,\n resource_paths: ReadonlyArray<string>,\n): DebugImage[] {\n const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n if (!filenameDebugIdMap) {\n return [];\n }\n\n const images: DebugImage[] = [];\n for (const path of resource_paths) {\n const normalizedPath = normalizeStackTracePath(path);\n if (normalizedPath && filenameDebugIdMap[normalizedPath]) {\n images.push({\n type: 'sourcemap',\n code_file: path,\n debug_id: filenameDebugIdMap[normalizedPath],\n });\n }\n }\n\n return images;\n}\n"],"names":[],"mappings":";;;AAQA,IAAI,kBAAA;AACJ,IAAI,mBAAA;AACJ,IAAI,mBAAA;AACJ,IAAI,sBAAA;AAiBG,SAAS,wBAAwB,WAAA,EAAkD;AACxF,EAAA,MAAM,mBAAmB,UAAA,CAAW,eAAA;AACpC,EAAA,MAAM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3
  import { GLOBAL_OBJ } from './worldwide.js';
4
4
 
5
5
  const CONSOLE_LEVELS = [
6
- 'debug',
7
- 'info',
8
- 'warn',
9
- 'error',
10
- 'log',
11
- 'assert',
12
- 'trace',
13
- ] ;
14
-
15
- /** Prefix for logging strings */
16
- const PREFIX = 'Sentry Logger ';
17
-
18
- /** This may be mutated by the console instrumentation. */
19
- const originalConsoleMethods
20
-
21
- = {};
22
-
23
- /**
24
- * Temporarily disable sentry console instrumentations.
25
- *
26
- * @param callback The function to run against the original `console` messages
27
- * @returns The results of the callback
28
- */
6
+ "debug",
7
+ "info",
8
+ "warn",
9
+ "error",
10
+ "log",
11
+ "assert",
12
+ "trace"
13
+ ];
14
+ const PREFIX = "Sentry Logger ";
15
+ const originalConsoleMethods = {};
29
16
  function consoleSandbox(callback) {
30
- if (!('console' in GLOBAL_OBJ)) {
17
+ if (!("console" in GLOBAL_OBJ)) {
31
18
  return callback();
32
19
  }
33
-
34
20
  const console = GLOBAL_OBJ.console;
35
21
  const wrappedFuncs = {};
36
-
37
- const wrappedLevels = Object.keys(originalConsoleMethods) ;
38
-
39
- // Restore all wrapped console methods
40
- wrappedLevels.forEach(level => {
22
+ const wrappedLevels = Object.keys(originalConsoleMethods);
23
+ wrappedLevels.forEach((level) => {
41
24
  const originalConsoleMethod = originalConsoleMethods[level];
42
- wrappedFuncs[level] = console[level] ;
43
- console[level] = originalConsoleMethod ;
25
+ wrappedFuncs[level] = console[level];
26
+ console[level] = originalConsoleMethod;
44
27
  });
45
-
46
28
  try {
47
29
  return callback();
48
30
  } finally {
49
- // Revert restoration to wrapped state
50
- wrappedLevels.forEach(level => {
51
- console[level] = wrappedFuncs[level] ;
31
+ wrappedLevels.forEach((level) => {
32
+ console[level] = wrappedFuncs[level];
52
33
  });
53
34
  }
54
35
  }
55
-
56
36
  function enable() {
57
37
  _getLoggerSettings().enabled = true;
58
38
  }
59
-
60
39
  function disable() {
61
40
  _getLoggerSettings().enabled = false;
62
41
  }
63
-
64
42
  function isEnabled() {
65
43
  return _getLoggerSettings().enabled;
66
44
  }
67
-
68
45
  function log(...args) {
69
- _maybeLog('log', ...args);
46
+ _maybeLog("log", ...args);
70
47
  }
71
-
72
48
  function warn(...args) {
73
- _maybeLog('warn', ...args);
49
+ _maybeLog("warn", ...args);
74
50
  }
75
-
76
51
  function error(...args) {
77
- _maybeLog('error', ...args);
52
+ _maybeLog("error", ...args);
78
53
  }
79
-
80
54
  function _maybeLog(level, ...args) {
81
55
  if (!DEBUG_BUILD) {
82
56
  return;
83
57
  }
84
-
85
58
  if (isEnabled()) {
86
59
  consoleSandbox(() => {
87
60
  GLOBAL_OBJ.console[level](`${PREFIX}[${level}]:`, ...args);
88
61
  });
89
62
  }
90
63
  }
91
-
92
64
  function _getLoggerSettings() {
93
65
  if (!DEBUG_BUILD) {
94
66
  return { enabled: false };
95
67
  }
96
-
97
- return getGlobalSingleton('loggerSettings', () => ({ enabled: false }));
68
+ return getGlobalSingleton("loggerSettings", () => ({ enabled: false }));
98
69
  }
99
-
100
- /**
101
- * This is a logger singleton which either logs things or no-ops if logging is not enabled.
102
- */
103
70
  const debug = {
104
71
  /** Enable logging. */
105
72
  enable,
@@ -112,8 +79,8 @@ const debug = {
112
79
  /** Log a warning. */
113
80
  warn,
114
81
  /** Log an error. */
115
- error,
116
- } ;
82
+ error
83
+ };
117
84
 
118
85
  export { CONSOLE_LEVELS, consoleSandbox, debug, originalConsoleMethods };
119
86
  //# sourceMappingURL=debug-logger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"debug-logger.js","sources":["../../../src/utils/debug-logger.ts"],"sourcesContent":["import { getGlobalSingleton } from '../carrier';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { ConsoleLevel } from '../types-hoist/instrument';\nimport { GLOBAL_OBJ } from './worldwide';\n\nexport interface SentryDebugLogger {\n disable(): void;\n enable(): void;\n isEnabled(): boolean;\n log(...args: Parameters<typeof console.log>): void;\n warn(...args: Parameters<typeof console.warn>): void;\n error(...args: Parameters<typeof console.error>): void;\n}\n\nexport const CONSOLE_LEVELS: readonly ConsoleLevel[] = [\n 'debug',\n 'info',\n 'warn',\n 'error',\n 'log',\n 'assert',\n 'trace',\n] as const;\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\n/** This may be mutated by the console instrumentation. */\nexport const originalConsoleMethods: Partial<{\n log(...args: Parameters<typeof console.log>): void;\n info(...args: Parameters<typeof console.info>): void;\n warn(...args: Parameters<typeof console.warn>): void;\n error(...args: Parameters<typeof console.error>): void;\n debug(...args: Parameters<typeof console.debug>): void;\n assert(...args: Parameters<typeof console.assert>): void;\n trace(...args: Parameters<typeof console.trace>): void;\n}> = {};\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nexport function consoleSandbox<T>(callback: () => T): T {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const console = GLOBAL_OBJ.console;\n const wrappedFuncs: Partial<Record<ConsoleLevel, (...args: unknown[]) => void>> = {};\n\n const wrappedLevels = Object.keys(originalConsoleMethods) as ConsoleLevel[];\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level];\n wrappedFuncs[level] = console[level] as (...args: unknown[]) => void;\n console[level] = originalConsoleMethod as (...args: unknown[]) => void;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] as (...args: unknown[]) => void;\n });\n }\n}\n\nfunction enable(): void {\n _getLoggerSettings().enabled = true;\n}\n\nfunction disable(): void {\n _getLoggerSettings().enabled = false;\n}\n\nfunction isEnabled(): boolean {\n return _getLoggerSettings().enabled;\n}\n\nfunction log(...args: Parameters<typeof console.log>): void {\n _maybeLog('log', ...args);\n}\n\nfunction warn(...args: Parameters<typeof console.warn>): void {\n _maybeLog('warn', ...args);\n}\n\nfunction error(...args: Parameters<typeof console.error>): void {\n _maybeLog('error', ...args);\n}\n\nfunction _maybeLog(level: ConsoleLevel, ...args: Parameters<(typeof console)[typeof level]>): void {\n if (!DEBUG_BUILD) {\n return;\n }\n\n if (isEnabled()) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[level](`${PREFIX}[${level}]:`, ...args);\n });\n }\n}\n\nfunction _getLoggerSettings(): { enabled: boolean } {\n if (!DEBUG_BUILD) {\n return { enabled: false };\n }\n\n return getGlobalSingleton('loggerSettings', () => ({ enabled: false }));\n}\n\n/**\n * This is a logger singleton which either logs things or no-ops if logging is not enabled.\n */\nexport const debug = {\n /** Enable logging. */\n enable,\n /** Disable logging. */\n disable,\n /** Check if logging is enabled. */\n isEnabled,\n /** Log a message. */\n log,\n /** Log a warning. */\n warn,\n /** Log an error. */\n error,\n} satisfies SentryDebugLogger;\n"],"names":[],"mappings":";;;;AAcO,MAAM,cAAc,GAA4B;AACvD,EAAE,OAAO;AACT,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,OAAO;AACT,EAAE,KAAK;AACP,EAAE,QAAQ;AACV,EAAE,OAAO;AACT,CAAA;;AAEA;AACA,MAAM,MAAA,GAAS,gBAAgB;;AAE/B;MACa;;AAQb,GAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,CAAI,QAAQ,EAAc;AACxD,EAAE,IAAI,EAAE,aAAa,UAAU,CAAC,EAAE;AAClC,IAAI,OAAO,QAAQ,EAAE;AACrB,EAAE;;AAEF,EAAE,MAAM,OAAA,GAAU,UAAU,CAAC,OAAO;AACpC,EAAE,MAAM,YAAY,GAAgE,EAAE;;AAEtF,EAAE,MAAM,gBAAgB,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAA;;AAE1D;AACA,EAAE,aAAa,CAAC,OAAO,CAAC,SAAS;AACjC,IAAI,MAAM,qBAAA,GAAwB,sBAAsB,CAAC,KAAK,CAAC;AAC/D,IAAI,YAAY,CAAC,KAAK,CAAA,GAAI,OAAO,CAAC,KAAK,CA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A,kBAAA,GAAA;AACA,EAAA,IAAA,CAAA,WAAA,EAAA;AACA,IAAA,OAAA,EAAA,OAAA,EAAA,KAAA,EAAA;AACA,EAAA;;AAEA,EAAA,OAAA,kBAAA,CAAA,gBAAA,EAAA,OAAA,EAAA,OAAA,EAAA,KAAA,EAAA,CAAA,CAAA;AACA;;AAEA;AACA;AACA;AACA,MAAA,KAAA,GAAA;AACA;AACA,EAAA,MAAA;AACA;AACA,EAAA,OAAA;AACA;AACA,EAAA,SAAA;AACA;AACA,EAAA,GAAA;AACA;AACA,EAAA,IAAA;AACA;AACA,EAAA,KAAA;AACA,CAAA;;;;"}
1
+ {"version":3,"file":"debug-logger.js","sources":["../../../src/utils/debug-logger.ts"],"sourcesContent":["import { getGlobalSingleton } from '../carrier';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { ConsoleLevel } from '../types/instrument';\nimport { GLOBAL_OBJ } from './worldwide';\n\nexport interface SentryDebugLogger {\n disable(): void;\n enable(): void;\n isEnabled(): boolean;\n log(...args: Parameters<typeof console.log>): void;\n warn(...args: Parameters<typeof console.warn>): void;\n error(...args: Parameters<typeof console.error>): void;\n}\n\nexport const CONSOLE_LEVELS: readonly ConsoleLevel[] = [\n 'debug',\n 'info',\n 'warn',\n 'error',\n 'log',\n 'assert',\n 'trace',\n] as const;\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\n/** This may be mutated by the console instrumentation. */\nexport const originalConsoleMethods: Partial<{\n log(...args: Parameters<typeof console.log>): void;\n info(...args: Parameters<typeof console.info>): void;\n warn(...args: Parameters<typeof console.warn>): void;\n error(...args: Parameters<typeof console.error>): void;\n debug(...args: Parameters<typeof console.debug>): void;\n assert(...args: Parameters<typeof console.assert>): void;\n trace(...args: Parameters<typeof console.trace>): void;\n}> = {};\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nexport function consoleSandbox<T>(callback: () => T): T {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const console = GLOBAL_OBJ.console;\n const wrappedFuncs: Partial<Record<ConsoleLevel, (...args: unknown[]) => void>> = {};\n\n const wrappedLevels = Object.keys(originalConsoleMethods) as ConsoleLevel[];\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level];\n wrappedFuncs[level] = console[level] as (...args: unknown[]) => void;\n console[level] = originalConsoleMethod as (...args: unknown[]) => void;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] as (...args: unknown[]) => void;\n });\n }\n}\n\nfunction enable(): void {\n _getLoggerSettings().enabled = true;\n}\n\nfunction disable(): void {\n _getLoggerSettings().enabled = false;\n}\n\nfunction isEnabled(): boolean {\n return _getLoggerSettings().enabled;\n}\n\nfunction log(...args: Parameters<typeof console.log>): void {\n _maybeLog('log', ...args);\n}\n\nfunction warn(...args: Parameters<typeof console.warn>): void {\n _maybeLog('warn', ...args);\n}\n\nfunction error(...args: Parameters<typeof console.error>): void {\n _maybeLog('error', ...args);\n}\n\nfunction _maybeLog(level: ConsoleLevel, ...args: Parameters<(typeof console)[typeof level]>): void {\n if (!DEBUG_BUILD) {\n return;\n }\n\n if (isEnabled()) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[level](`${PREFIX}[${level}]:`, ...args);\n });\n }\n}\n\nfunction _getLoggerSettings(): { enabled: boolean } {\n if (!DEBUG_BUILD) {\n return { enabled: false };\n }\n\n return getGlobalSingleton('loggerSettings', () => ({ enabled: false }));\n}\n\n/**\n * This is a logger singleton which either logs things or no-ops if logging is not enabled.\n */\nexport const debug = {\n /** Enable logging. */\n enable,\n /** Disable logging. */\n disable,\n /** Check if logging is enabled. */\n isEnabled,\n /** Log a message. */\n log,\n /** Log a warning. */\n warn,\n /** Log an error. */\n error,\n} satisfies SentryDebugLogger;\n"],"names":[],"mappings":";;;;AAcO,MAAM,cAAA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AC1B;AAEA,SAAS,QAAQ,IAAA,EAA6C;AAC5D,EAAA,SAAA,CAAU,MAAA,EAAQ,GAAG,IAAI,CAAA;AAC3B;AAEA,SAAS,SAAS,IAAA,EAA8C;AAC9D,EAAA,SAAA,CAAU,OAAA,EAAS,GAAG,IAAI,CAAA;AAC5B;AAEA,SAAS,SAAA,CAAU,UAAwB,IAAA,EAAwD;AACjG,EAAA,IAAI,CAAC,WAAA,EAAa;AAChB,IAAA;AAAA,EACF;AAEA,EAAA,IAAI,WAAU,EAAG;AACf,IAAA,cAAA,CAAe,MAAM;AACnB,MAAA,UAAA,CAAW,OAAA,CAAQ,KAAK,CAAA,CAAE,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,KAAK,CAAA,EAAA,CAAA,EAAM,GAAG,IAAI,CAAA;AAAA,IAC3D,CAAC,CAAA;AAAA,EACH;AACF;AAEA,SAAS,kBAAA,GAA2C;AAClD,EAAA,IAAI,CAAC,WAAA,EAAa;AAChB,IAAA,OAAO,EAAE,SAAS,KAAA,EAAM;AAAA,EAC1B;AAEA,EAAA,OAAO,mBAAmB,gBAAA,EAAkB,OAAO,EAAE,OAAA,EAAS,OAAM,CAAE,CAAA;AACxE;AAKO,MAAM,KAAA,GAAQ;AAAA;AAAA,EAEnB,MAAA;AAAA;AAAA,EAEA,OAAA;AAAA;AAAA,EAEA,SAAA;AAAA;AAAA,EAEA,GAAA;AAAA;AAAA,EAEA,IAAA;AAAA;AAAA,EAEA;AACF;;;;"}
@@ -1,162 +1,99 @@
1
1
  import { DEBUG_BUILD } from '../debug-build.js';
2
2
  import { consoleSandbox, debug } from './debug-logger.js';
3
3
 
4
- /** Regular expression used to extract org ID from a DSN host. */
5
4
  const ORG_ID_REGEX = /^o(\d+)\./;
6
-
7
- /** Regular expression used to parse a Dsn. */
8
5
  const DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;
9
-
10
6
  function isValidProtocol(protocol) {
11
- return protocol === 'http' || protocol === 'https';
7
+ return protocol === "http" || protocol === "https";
12
8
  }
13
-
14
- /**
15
- * Renders the string representation of this Dsn.
16
- *
17
- * By default, this will render the public representation without the password
18
- * component. To get the deprecated private representation, set `withPassword`
19
- * to true.
20
- *
21
- * @param withPassword When set to true, the password will be included.
22
- */
23
9
  function dsnToString(dsn, withPassword = false) {
24
10
  const { host, path, pass, port, projectId, protocol, publicKey } = dsn;
25
- return (
26
- `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +
27
- `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`
28
- );
11
+ return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${path ? `${path}/` : path}${projectId}`;
29
12
  }
30
-
31
- /**
32
- * Parses a Dsn from a given string.
33
- *
34
- * @param str A Dsn as string
35
- * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string
36
- */
37
13
  function dsnFromString(str) {
38
14
  const match = DSN_REGEX.exec(str);
39
-
40
15
  if (!match) {
41
- // This should be logged to the console
42
16
  consoleSandbox(() => {
43
- // eslint-disable-next-line no-console
44
17
  console.error(`Invalid Sentry Dsn: ${str}`);
45
18
  });
46
- return undefined;
19
+ return void 0;
47
20
  }
48
-
49
- const [protocol, publicKey, pass = '', host = '', port = '', lastPath = ''] = match.slice(1);
50
- let path = '';
21
+ const [protocol, publicKey, pass = "", host = "", port = "", lastPath = ""] = match.slice(1);
22
+ let path = "";
51
23
  let projectId = lastPath;
52
-
53
- const split = projectId.split('/');
24
+ const split = projectId.split("/");
54
25
  if (split.length > 1) {
55
- path = split.slice(0, -1).join('/');
56
- projectId = split.pop() ;
26
+ path = split.slice(0, -1).join("/");
27
+ projectId = split.pop();
57
28
  }
58
-
59
29
  if (projectId) {
60
30
  const projectMatch = projectId.match(/^\d+/);
61
31
  if (projectMatch) {
62
32
  projectId = projectMatch[0];
63
33
  }
64
34
  }
65
-
66
- return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });
35
+ return dsnFromComponents({ host, pass, path, projectId, port, protocol, publicKey });
67
36
  }
68
-
69
37
  function dsnFromComponents(components) {
70
38
  return {
71
39
  protocol: components.protocol,
72
- publicKey: components.publicKey || '',
73
- pass: components.pass || '',
40
+ publicKey: components.publicKey || "",
41
+ pass: components.pass || "",
74
42
  host: components.host,
75
- port: components.port || '',
76
- path: components.path || '',
77
- projectId: components.projectId,
43
+ port: components.port || "",
44
+ path: components.path || "",
45
+ projectId: components.projectId
78
46
  };
79
47
  }
80
-
81
48
  function validateDsn(dsn) {
82
49
  if (!DEBUG_BUILD) {
83
50
  return true;
84
51
  }
85
-
86
52
  const { port, projectId, protocol } = dsn;
87
-
88
- const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];
89
- const hasMissingRequiredComponent = requiredComponents.find(component => {
53
+ const requiredComponents = ["protocol", "publicKey", "host", "projectId"];
54
+ const hasMissingRequiredComponent = requiredComponents.find((component) => {
90
55
  if (!dsn[component]) {
91
56
  debug.error(`Invalid Sentry Dsn: ${component} missing`);
92
57
  return true;
93
58
  }
94
59
  return false;
95
60
  });
96
-
97
61
  if (hasMissingRequiredComponent) {
98
62
  return false;
99
63
  }
100
-
101
64
  if (!projectId.match(/^\d+$/)) {
102
65
  debug.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);
103
66
  return false;
104
67
  }
105
-
106
68
  if (!isValidProtocol(protocol)) {
107
69
  debug.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);
108
70
  return false;
109
71
  }
110
-
111
72
  if (port && isNaN(parseInt(port, 10))) {
112
73
  debug.error(`Invalid Sentry Dsn: Invalid port ${port}`);
113
74
  return false;
114
75
  }
115
-
116
76
  return true;
117
77
  }
118
-
119
- /**
120
- * Extract the org ID from a DSN host.
121
- *
122
- * @param host The host from a DSN
123
- * @returns The org ID if found, undefined otherwise
124
- */
125
78
  function extractOrgIdFromDsnHost(host) {
126
79
  const match = host.match(ORG_ID_REGEX);
127
-
128
80
  return match?.[1];
129
81
  }
130
-
131
- /**
132
- * Returns the organization ID of the client.
133
- *
134
- * The organization ID is extracted from the DSN. If the client options include a `orgId`, this will always take precedence.
135
- */
136
82
  function extractOrgIdFromClient(client) {
137
83
  const options = client.getOptions();
138
-
139
84
  const { host } = client.getDsn() || {};
140
-
141
85
  let org_id;
142
-
143
86
  if (options.orgId) {
144
87
  org_id = String(options.orgId);
145
88
  } else if (host) {
146
89
  org_id = extractOrgIdFromDsnHost(host);
147
90
  }
148
-
149
91
  return org_id;
150
92
  }
151
-
152
- /**
153
- * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.
154
- * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source
155
- */
156
93
  function makeDsn(from) {
157
- const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);
94
+ const components = typeof from === "string" ? dsnFromString(from) : dsnFromComponents(from);
158
95
  if (!components || !validateDsn(components)) {
159
- return undefined;
96
+ return void 0;
160
97
  }
161
98
  return components;
162
99
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dsn.js","sources":["../../../src/utils/dsn.ts"],"sourcesContent":["import type { Client } from '../client';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { DsnComponents, DsnLike, DsnProtocol } from '../types-hoist/dsn';\nimport { consoleSandbox, debug } from './debug-logger';\n\n/** Regular expression used to extract org ID from a DSN host. */\nconst ORG_ID_REGEX = /^o(\\d+)\\./;\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)((?:\\[[:.%\\w]+\\]|[\\w.-]+))(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol?: string): protocol is DsnProtocol {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn: DsnComponents, withPassword: boolean = false): string {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nexport function dsnFromString(str: string): DsnComponents | undefined {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host = '', port = '', lastPath = ''] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n}\n\nfunction dsnFromComponents(components: DsnComponents): DsnComponents {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn: DsnComponents): boolean {\n if (!DEBUG_BUILD) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents: ReadonlyArray<keyof DsnComponents> = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n debug.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n debug.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n debug.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n debug.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Extract the org ID from a DSN host.\n *\n * @param host The host from a DSN\n * @returns The org ID if found, undefined otherwise\n */\nexport function extractOrgIdFromDsnHost(host: string): string | undefined {\n const match = host.match(ORG_ID_REGEX);\n\n return match?.[1];\n}\n\n/**\n * Returns the organization ID of the client.\n *\n * The organization ID is extracted from the DSN. If the client options include a `orgId`, this will always take precedence.\n */\nexport function extractOrgIdFromClient(client: Client): string | undefined {\n const options = client.getOptions();\n\n const { host } = client.getDsn() || {};\n\n let org_id: string | undefined;\n\n if (options.orgId) {\n org_id = String(options.orgId);\n } else if (host) {\n org_id = extractOrgIdFromDsnHost(host);\n }\n\n return org_id;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nexport function makeDsn(from: DsnLike): DsnComponents | undefined {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n"],"names":[],"mappings":";;;AAKA;AACA,MAAM,YAAA,GAAe,WAAW;;AAEhC;AACA,MAAM,SAAA,GAAY,kFAAkF;;AAEpG,SAAS,eAAe,CAAC,QAAQ,EAAoC;AACrE,EAAE,OAAO,QAAA,KAAa,UAAU,QAAA,KAAa,OAAO;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,WAAW,CAAC,GAAG,EAAiB,YAAY,GAAY,KAAK,EAAU;AACvF,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAA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AA,GAAA,MAAA,CAAA,OAAA,CAAA,KAAA,CAAA;AACA,EAAA,CAAA,MAAA,IAAA,IAAA,EAAA;AACA,IAAA,MAAA,GAAA,uBAAA,CAAA,IAAA,CAAA;AACA,EAAA;;AAEA,EAAA,OAAA,MAAA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAA,OAAA,CAAA,IAAA,EAAA;AACA,EAAA,MAAA,UAAA,GAAA,OAAA,IAAA,KAAA,QAAA,GAAA,aAAA,CAAA,IAAA,CAAA,GAAA,iBAAA,CAAA,IAAA,CAAA;AACA,EAAA,IAAA,CAAA,UAAA,IAAA,CAAA,WAAA,CAAA,UAAA,CAAA,EAAA;AACA,IAAA,OAAA,SAAA;AACA,EAAA;AACA,EAAA,OAAA,UAAA;AACA;;;;"}
1
+ {"version":3,"file":"dsn.js","sources":["../../../src/utils/dsn.ts"],"sourcesContent":["import type { Client } from '../client';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { DsnComponents, DsnLike, DsnProtocol } from '../types/dsn';\nimport { consoleSandbox, debug } from './debug-logger';\n\n/** Regular expression used to extract org ID from a DSN host. */\nconst ORG_ID_REGEX = /^o(\\d+)\\./;\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)((?:\\[[:.%\\w]+\\]|[\\w.-]+))(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol?: string): protocol is DsnProtocol {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nexport function dsnToString(dsn: DsnComponents, withPassword: boolean = false): string {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nexport function dsnFromString(str: string): DsnComponents | undefined {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n });\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host = '', port = '', lastPath = ''] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() as string;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol as DsnProtocol, publicKey });\n}\n\nfunction dsnFromComponents(components: DsnComponents): DsnComponents {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn: DsnComponents): boolean {\n if (!DEBUG_BUILD) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents: ReadonlyArray<keyof DsnComponents> = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n debug.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n debug.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n debug.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n debug.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Extract the org ID from a DSN host.\n *\n * @param host The host from a DSN\n * @returns The org ID if found, undefined otherwise\n */\nexport function extractOrgIdFromDsnHost(host: string): string | undefined {\n const match = host.match(ORG_ID_REGEX);\n\n return match?.[1];\n}\n\n/**\n * Returns the organization ID of the client.\n *\n * The organization ID is extracted from the DSN. If the client options include a `orgId`, this will always take precedence.\n */\nexport function extractOrgIdFromClient(client: Client): string | undefined {\n const options = client.getOptions();\n\n const { host } = client.getDsn() || {};\n\n let org_id: string | undefined;\n\n if (options.orgId) {\n org_id = String(options.orgId);\n } else if (host) {\n org_id = extractOrgIdFromDsnHost(host);\n }\n\n return org_id;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nexport function makeDsn(from: DsnLike): DsnComponents | undefined {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n"],"names":[],"mappings":";;;AAMA,MAAM,YAAA,GAAe,WAAA;AAGrB,MAAM,SAAA,GAAY,kFAAA;AAElB,SAAS,gBAAgB,QAAA,EAA4C;AACnE,EAAA,OAAO,QAAA,KAAa,UAAU,QAAA,KAAa,OAAA;AAC7C;AAWO,SAAS,WAAA,CAAY,GAAA,EAAoB,YAAA,GAAwB,KAAA,EAAe;AACrF,EAAA,MAAM,EAAE,MAAM,IAAA,EAAM,IAAA,EAAM,MAAM,SAAA,EAAW,QAAA,EAAU,WAAU,GAAI,GAAA;AACnE,EAAA,OACE,CAAA,EAAG,QAAQ,CAAA,GAAA,EAAM,SAAS,CAAA,EAAG,YAAA,IAAgB,IAAA,GAAO,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA,GAAK,EAAE,CAAA,CAAA,EAC/D,IAAI,GAAG,IAAA,GAAO,CAAA,CAAA,EAAI,IAAI,CAAA,CAAA,GAAK,EAAE,CAAA,CAAA,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
3
- * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these
4
- * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will
5
- * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to
6
- * `debug` and preventing node-related code from appearing in browser bundles.
7
- *
8
- * Attention:
9
- * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by
10
- * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)
11
- * having issues tree-shaking these constants across package boundaries.
12
- * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want
13
- * users to be able to shake away expressions that it guards.
14
- */
15
-
16
- /**
17
- * Figures out if we're building a browser bundle.
18
- *
19
- * @returns true if this is a browser bundle build.
20
- */
21
1
  function isBrowserBundle() {
22
- return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;
2
+ return typeof __SENTRY_BROWSER_BUNDLE__ !== "undefined" && !!__SENTRY_BROWSER_BUNDLE__;
23
3
  }
24
-
25
- /**
26
- * Get source of SDK.
27
- */
28
4
  function getSDKSource() {
29
- // This comment is used to identify this line in the CDN bundle build step and replace this with "return 'cdn';"
30
- /* __SENTRY_SDK_SOURCE__ */ return 'npm';
5
+ /*! __SENTRY_SDK_SOURCE__ */
6
+ return "npm";
31
7
  }
32
8
 
33
9
  export { getSDKSource, isBrowserBundle };
@@ -1 +1 @@
1
- {"version":3,"file":"env.js","sources":["../../../src/utils/env.ts"],"sourcesContent":["/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `debug` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\ndeclare const __SENTRY_BROWSER_BUNDLE__: boolean | undefined;\n\nexport type SdkSource = 'npm' | 'cdn' | 'loader' | 'aws-lambda-layer';\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nexport function isBrowserBundle(): boolean {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nexport function getSDKSource(): SdkSource {\n // This comment is used to identify this line in the CDN bundle build step and replace this with \"return 'cdn';\"\n /* __SENTRY_SDK_SOURCE__ */ return 'npm';\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACO,SAAS,eAAe,GAAY;AAC3C,EAAE,OAAO,OAAO,yBAAA,KAA8B,eAAe,CAAC,CAAC,yBAAyB;AACxF;;AAEA;AACA;AACA;AACO,SAAS,YAAY,GAAc;AAC1C;AACA,8BAA8B,OAAO,KAAK;AAC1C;;;;"}
1
+ {"version":3,"file":"env.js","sources":["../../../src/utils/env.ts"],"sourcesContent":["/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `debug` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\ndeclare const __SENTRY_BROWSER_BUNDLE__: boolean | undefined;\n\nexport type SdkSource = 'npm' | 'cdn' | 'loader' | 'aws-lambda-layer';\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nexport function isBrowserBundle(): boolean {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nexport function getSDKSource(): SdkSource {\n // The `/*! ... */` marker is replaced by our CDN bundle build step with `return 'cdn';`.\n // It uses the `/*!` legal-comment syntax specifically so it survives esbuild's transpile\n // (which strips ordinary `/* ... */` block comments).\n /*! __SENTRY_SDK_SOURCE__ */ return 'npm';\n}\n"],"names":[],"mappings":"AAwBO,SAAS,eAAA,GAA2B;AACzC,EAAA,OAAO,OAAO,yBAAA,KAA8B,WAAA,IAAe,CAAC,CAAC,yBAAA;AAC/D;AAKO,SAAS,YAAA,GAA0B;AAAA;AAIX,EAAA,OAAO,KAAA;AACtC;;;;"}