@sentry/core 10.53.0 → 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 (1519) hide show
  1. package/browser.d.ts +4 -0
  2. package/build/cjs/api.js +10 -34
  3. package/build/cjs/api.js.map +1 -1
  4. package/build/cjs/asyncContext/index.js +0 -14
  5. package/build/cjs/asyncContext/index.js.map +1 -1
  6. package/build/cjs/asyncContext/stackStrategy.js +16 -47
  7. package/build/cjs/asyncContext/stackStrategy.js.map +1 -1
  8. package/build/cjs/attributes.js +17 -95
  9. package/build/cjs/attributes.js.map +1 -1
  10. package/build/cjs/breadcrumbs.js +2 -22
  11. package/build/cjs/breadcrumbs.js.map +1 -1
  12. package/build/cjs/browser.js +12 -3
  13. package/build/cjs/browser.js.map +1 -1
  14. package/build/cjs/carrier.js +5 -42
  15. package/build/cjs/carrier.js.map +1 -1
  16. package/build/cjs/checkin.js +5 -19
  17. package/build/cjs/checkin.js.map +1 -1
  18. package/build/cjs/client.js +216 -585
  19. package/build/cjs/client.js.map +1 -1
  20. package/build/cjs/constants.js +2 -2
  21. package/build/cjs/currentScopes.js +5 -86
  22. package/build/cjs/currentScopes.js.map +1 -1
  23. package/build/cjs/debug-build.js +0 -5
  24. package/build/cjs/debug-build.js.map +1 -1
  25. package/build/cjs/defaultScopes.js +2 -5
  26. package/build/cjs/defaultScopes.js.map +1 -1
  27. package/build/cjs/envelope.js +32 -103
  28. package/build/cjs/envelope.js.map +1 -1
  29. package/build/cjs/eventProcessors.js +4 -23
  30. package/build/cjs/eventProcessors.js.map +1 -1
  31. package/build/cjs/exports.js +21 -197
  32. package/build/cjs/exports.js.map +1 -1
  33. package/build/cjs/feedback.js +7 -19
  34. package/build/cjs/feedback.js.map +1 -1
  35. package/build/cjs/fetch.js +66 -201
  36. package/build/cjs/fetch.js.map +1 -1
  37. package/build/cjs/index.js +17 -3
  38. package/build/cjs/index.js.map +1 -1
  39. package/build/cjs/instrument/console.js +9 -41
  40. package/build/cjs/instrument/console.js.map +1 -1
  41. package/build/cjs/instrument/fetch.js +47 -156
  42. package/build/cjs/instrument/fetch.js.map +1 -1
  43. package/build/cjs/instrument/globalError.js +4 -25
  44. package/build/cjs/instrument/globalError.js.map +1 -1
  45. package/build/cjs/instrument/globalUnhandledRejection.js +4 -21
  46. package/build/cjs/instrument/globalUnhandledRejection.js.map +1 -1
  47. package/build/cjs/instrument/handlers.js +9 -21
  48. package/build/cjs/instrument/handlers.js.map +1 -1
  49. package/build/cjs/integration.js +13 -77
  50. package/build/cjs/integration.js.map +1 -1
  51. package/build/cjs/integrations/captureconsole.js +16 -40
  52. package/build/cjs/integrations/captureconsole.js.map +1 -1
  53. package/build/cjs/integrations/consola.js +57 -163
  54. package/build/cjs/integrations/consola.js.map +1 -1
  55. package/build/cjs/integrations/console.js +11 -43
  56. package/build/cjs/integrations/console.js.map +1 -1
  57. package/build/cjs/integrations/conversationId.js +5 -22
  58. package/build/cjs/integrations/conversationId.js.map +1 -1
  59. package/build/cjs/integrations/dedupe.js +16 -74
  60. package/build/cjs/integrations/dedupe.js.map +1 -1
  61. package/build/cjs/integrations/eventFilters.js +63 -114
  62. package/build/cjs/integrations/eventFilters.js.map +1 -1
  63. package/build/cjs/integrations/express/index.js +30 -145
  64. package/build/cjs/integrations/express/index.js.map +1 -1
  65. package/build/cjs/integrations/express/patch-layer.js +20 -130
  66. package/build/cjs/integrations/express/patch-layer.js.map +1 -1
  67. package/build/cjs/integrations/express/request-layer-store.js +1 -3
  68. package/build/cjs/integrations/express/request-layer-store.js.map +1 -1
  69. package/build/cjs/integrations/express/set-sdk-processing-metadata.js +0 -2
  70. package/build/cjs/integrations/express/set-sdk-processing-metadata.js.map +1 -1
  71. package/build/cjs/integrations/express/types.js +6 -7
  72. package/build/cjs/integrations/express/types.js.map +1 -1
  73. package/build/cjs/integrations/express/utils.js +37 -145
  74. package/build/cjs/integrations/express/utils.js.map +1 -1
  75. package/build/cjs/integrations/extraerrordata.js +24 -69
  76. package/build/cjs/integrations/extraerrordata.js.map +1 -1
  77. package/build/cjs/integrations/featureFlags/featureFlagsIntegration.js +3 -29
  78. package/build/cjs/integrations/featureFlags/featureFlagsIntegration.js.map +1 -1
  79. package/build/cjs/integrations/featureFlags/growthbook.js +11 -40
  80. package/build/cjs/integrations/featureFlags/growthbook.js.map +1 -1
  81. package/build/cjs/integrations/functiontostring.js +6 -27
  82. package/build/cjs/integrations/functiontostring.js.map +1 -1
  83. package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js +10 -18
  84. package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -1
  85. package/build/cjs/integrations/http/client-patch.js +8 -70
  86. package/build/cjs/integrations/http/client-patch.js.map +1 -1
  87. package/build/cjs/integrations/http/client-subscriptions.js +22 -59
  88. package/build/cjs/integrations/http/client-subscriptions.js.map +1 -1
  89. package/build/cjs/integrations/http/constants.js +3 -3
  90. package/build/cjs/integrations/http/double-wrap-warning.js +10 -18
  91. package/build/cjs/integrations/http/double-wrap-warning.js.map +1 -1
  92. package/build/cjs/integrations/http/get-outgoing-span-data.js +30 -47
  93. package/build/cjs/integrations/http/get-outgoing-span-data.js.map +1 -1
  94. package/build/cjs/integrations/http/get-request-url.js +7 -24
  95. package/build/cjs/integrations/http/get-request-url.js.map +1 -1
  96. package/build/cjs/integrations/http/inject-trace-propagation-headers.js +14 -38
  97. package/build/cjs/integrations/http/inject-trace-propagation-headers.js.map +1 -1
  98. package/build/cjs/integrations/http/patch-request-to-capture-body.js +80 -0
  99. package/build/cjs/integrations/http/patch-request-to-capture-body.js.map +1 -0
  100. package/build/cjs/integrations/http/record-request-session.js +61 -0
  101. package/build/cjs/integrations/http/record-request-session.js.map +1 -0
  102. package/build/cjs/integrations/http/server-subscription.js +289 -0
  103. package/build/cjs/integrations/http/server-subscription.js.map +1 -0
  104. package/build/cjs/integrations/linkederrors.js +6 -11
  105. package/build/cjs/integrations/linkederrors.js.map +1 -1
  106. package/build/cjs/integrations/mcp-server/attributeExtraction.js +26 -69
  107. package/build/cjs/integrations/mcp-server/attributeExtraction.js.map +1 -1
  108. package/build/cjs/integrations/mcp-server/attributes.js +30 -138
  109. package/build/cjs/integrations/mcp-server/attributes.js.map +1 -1
  110. package/build/cjs/integrations/mcp-server/correlation.js +20 -91
  111. package/build/cjs/integrations/mcp-server/correlation.js.map +1 -1
  112. package/build/cjs/integrations/mcp-server/errorCapture.js +6 -25
  113. package/build/cjs/integrations/mcp-server/errorCapture.js.map +1 -1
  114. package/build/cjs/integrations/mcp-server/handlers.js +55 -169
  115. package/build/cjs/integrations/mcp-server/handlers.js.map +1 -1
  116. package/build/cjs/integrations/mcp-server/index.js +7 -60
  117. package/build/cjs/integrations/mcp-server/index.js.map +1 -1
  118. package/build/cjs/integrations/mcp-server/methodConfig.js +21 -59
  119. package/build/cjs/integrations/mcp-server/methodConfig.js.map +1 -1
  120. package/build/cjs/integrations/mcp-server/piiFiltering.js +5 -33
  121. package/build/cjs/integrations/mcp-server/piiFiltering.js.map +1 -1
  122. package/build/cjs/integrations/mcp-server/resultExtraction.js +20 -76
  123. package/build/cjs/integrations/mcp-server/resultExtraction.js.map +1 -1
  124. package/build/cjs/integrations/mcp-server/sessionExtraction.js +30 -121
  125. package/build/cjs/integrations/mcp-server/sessionExtraction.js.map +1 -1
  126. package/build/cjs/integrations/mcp-server/sessionManagement.js +2 -60
  127. package/build/cjs/integrations/mcp-server/sessionManagement.js.map +1 -1
  128. package/build/cjs/integrations/mcp-server/spans.js +20 -107
  129. package/build/cjs/integrations/mcp-server/spans.js.map +1 -1
  130. package/build/cjs/integrations/mcp-server/transport.js +26 -94
  131. package/build/cjs/integrations/mcp-server/transport.js.map +1 -1
  132. package/build/cjs/integrations/mcp-server/validation.js +6 -72
  133. package/build/cjs/integrations/mcp-server/validation.js.map +1 -1
  134. package/build/cjs/integrations/moduleMetadata.js +6 -20
  135. package/build/cjs/integrations/moduleMetadata.js.map +1 -1
  136. package/build/cjs/integrations/postgresjs.js +78 -287
  137. package/build/cjs/integrations/postgresjs.js.map +1 -1
  138. package/build/cjs/integrations/requestdata.js +30 -93
  139. package/build/cjs/integrations/requestdata.js.map +1 -1
  140. package/build/cjs/integrations/rewriteframes.js +14 -45
  141. package/build/cjs/integrations/rewriteframes.js.map +1 -1
  142. package/build/cjs/integrations/spanStreaming.js +9 -15
  143. package/build/cjs/integrations/spanStreaming.js.map +1 -1
  144. package/build/cjs/integrations/supabase.js +224 -333
  145. package/build/cjs/integrations/supabase.js.map +1 -1
  146. package/build/cjs/integrations/third-party-errors-filter.js +60 -85
  147. package/build/cjs/integrations/third-party-errors-filter.js.map +1 -1
  148. package/build/cjs/integrations/zoderrors.js +35 -111
  149. package/build/cjs/integrations/zoderrors.js.map +1 -1
  150. package/build/cjs/logs/console-integration.js +15 -50
  151. package/build/cjs/logs/console-integration.js.map +1 -1
  152. package/build/cjs/logs/constants.js +1 -6
  153. package/build/cjs/logs/constants.js.map +1 -1
  154. package/build/cjs/logs/envelope.js +10 -40
  155. package/build/cjs/logs/envelope.js.map +1 -1
  156. package/build/cjs/logs/internal.js +53 -125
  157. package/build/cjs/logs/internal.js.map +1 -1
  158. package/build/cjs/logs/public-api.js +13 -228
  159. package/build/cjs/logs/public-api.js.map +1 -1
  160. package/build/cjs/logs/utils.js +6 -47
  161. package/build/cjs/logs/utils.js.map +1 -1
  162. package/build/cjs/metadata.js +6 -51
  163. package/build/cjs/metadata.js.map +1 -1
  164. package/build/cjs/metrics/envelope.js +12 -45
  165. package/build/cjs/metrics/envelope.js.map +1 -1
  166. package/build/cjs/metrics/internal.js +31 -144
  167. package/build/cjs/metrics/internal.js.map +1 -1
  168. package/build/cjs/metrics/public-api.js +4 -109
  169. package/build/cjs/metrics/public-api.js.map +1 -1
  170. package/build/cjs/profiling.js +11 -41
  171. package/build/cjs/profiling.js.map +1 -1
  172. package/build/cjs/scope.js +73 -224
  173. package/build/cjs/scope.js.map +1 -1
  174. package/build/cjs/sdk.js +2 -21
  175. package/build/cjs/sdk.js.map +1 -1
  176. package/build/cjs/semanticAttributes.js +30 -116
  177. package/build/cjs/semanticAttributes.js.map +1 -1
  178. package/build/cjs/server-runtime-client.js +32 -87
  179. package/build/cjs/server-runtime-client.js.map +1 -1
  180. package/build/cjs/server.js +17 -3
  181. package/build/cjs/server.js.map +1 -1
  182. package/build/cjs/session.js +14 -67
  183. package/build/cjs/session.js.map +1 -1
  184. package/build/cjs/tracing/ai/gen-ai-attributes.js +45 -249
  185. package/build/cjs/tracing/ai/gen-ai-attributes.js.map +1 -1
  186. package/build/cjs/tracing/ai/mediaStripping.js +21 -116
  187. package/build/cjs/tracing/ai/mediaStripping.js.map +1 -1
  188. package/build/cjs/tracing/ai/messageTruncation.js +26 -212
  189. package/build/cjs/tracing/ai/messageTruncation.js.map +1 -1
  190. package/build/cjs/tracing/ai/utils.js +40 -180
  191. package/build/cjs/tracing/ai/utils.js.map +1 -1
  192. package/build/cjs/tracing/anthropic-ai/constants.js +9 -12
  193. package/build/cjs/tracing/anthropic-ai/constants.js.map +1 -1
  194. package/build/cjs/tracing/anthropic-ai/index.js +67 -172
  195. package/build/cjs/tracing/anthropic-ai/index.js.map +1 -1
  196. package/build/cjs/tracing/anthropic-ai/streaming.js +45 -149
  197. package/build/cjs/tracing/anthropic-ai/streaming.js.map +1 -1
  198. package/build/cjs/tracing/anthropic-ai/utils.js +17 -47
  199. package/build/cjs/tracing/anthropic-ai/utils.js.map +1 -1
  200. package/build/cjs/tracing/dynamicSamplingContext.js +18 -85
  201. package/build/cjs/tracing/dynamicSamplingContext.js.map +1 -1
  202. package/build/cjs/tracing/errors.js +2 -14
  203. package/build/cjs/tracing/errors.js.map +1 -1
  204. package/build/cjs/tracing/google-genai/constants.js +9 -16
  205. package/build/cjs/tracing/google-genai/constants.js.map +1 -1
  206. package/build/cjs/tracing/google-genai/index.js +79 -223
  207. package/build/cjs/tracing/google-genai/index.js.map +1 -1
  208. package/build/cjs/tracing/google-genai/streaming.js +11 -56
  209. package/build/cjs/tracing/google-genai/streaming.js.map +1 -1
  210. package/build/cjs/tracing/google-genai/utils.js +8 -13
  211. package/build/cjs/tracing/google-genai/utils.js.map +1 -1
  212. package/build/cjs/tracing/idleSpan.js +48 -174
  213. package/build/cjs/tracing/idleSpan.js.map +1 -1
  214. package/build/cjs/tracing/langchain/constants.js +8 -9
  215. package/build/cjs/tracing/langchain/constants.js.map +1 -1
  216. package/build/cjs/tracing/langchain/embeddings.js +31 -75
  217. package/build/cjs/tracing/langchain/embeddings.js.map +1 -1
  218. package/build/cjs/tracing/langchain/index.js +64 -161
  219. package/build/cjs/tracing/langchain/index.js.map +1 -1
  220. package/build/cjs/tracing/langchain/utils.js +101 -311
  221. package/build/cjs/tracing/langchain/utils.js.map +1 -1
  222. package/build/cjs/tracing/langgraph/constants.js +2 -2
  223. package/build/cjs/tracing/langgraph/index.js +57 -160
  224. package/build/cjs/tracing/langgraph/index.js.map +1 -1
  225. package/build/cjs/tracing/langgraph/utils.js +53 -170
  226. package/build/cjs/tracing/langgraph/utils.js.map +1 -1
  227. package/build/cjs/tracing/logSpans.js +10 -26
  228. package/build/cjs/tracing/logSpans.js.map +1 -1
  229. package/build/cjs/tracing/measurement.js +6 -18
  230. package/build/cjs/tracing/measurement.js.map +1 -1
  231. package/build/cjs/tracing/openai/constants.js +20 -24
  232. package/build/cjs/tracing/openai/constants.js.map +1 -1
  233. package/build/cjs/tracing/openai/index.js +52 -132
  234. package/build/cjs/tracing/openai/index.js.map +1 -1
  235. package/build/cjs/tracing/openai/streaming.js +24 -102
  236. package/build/cjs/tracing/openai/streaming.js.map +1 -1
  237. package/build/cjs/tracing/openai/utils.js +36 -107
  238. package/build/cjs/tracing/openai/utils.js.map +1 -1
  239. package/build/cjs/tracing/sampling.js +23 -63
  240. package/build/cjs/tracing/sampling.js.map +1 -1
  241. package/build/cjs/tracing/sentryNonRecordingSpan.js +15 -40
  242. package/build/cjs/tracing/sentryNonRecordingSpan.js.map +1 -1
  243. package/build/cjs/tracing/sentrySpan.js +66 -172
  244. package/build/cjs/tracing/sentrySpan.js.map +1 -1
  245. package/build/cjs/tracing/spans/beforeSendSpan.js +4 -32
  246. package/build/cjs/tracing/spans/beforeSendSpan.js.map +1 -1
  247. package/build/cjs/tracing/spans/captureSpan.js +63 -165
  248. package/build/cjs/tracing/spans/captureSpan.js.map +1 -1
  249. package/build/cjs/tracing/spans/envelope.js +12 -24
  250. package/build/cjs/tracing/spans/envelope.js.map +1 -1
  251. package/build/cjs/tracing/spans/estimateSize.js +0 -22
  252. package/build/cjs/tracing/spans/estimateSize.js.map +1 -1
  253. package/build/cjs/tracing/spans/extractGenAiSpans.js +11 -33
  254. package/build/cjs/tracing/spans/extractGenAiSpans.js.map +1 -1
  255. package/build/cjs/tracing/spans/hasSpanStreamingEnabled.js +1 -4
  256. package/build/cjs/tracing/spans/hasSpanStreamingEnabled.js.map +1 -1
  257. package/build/cjs/tracing/spans/scopeContextAttributes.js +58 -0
  258. package/build/cjs/tracing/spans/scopeContextAttributes.js.map +1 -0
  259. package/build/cjs/tracing/spans/spanBuffer.js +21 -71
  260. package/build/cjs/tracing/spans/spanBuffer.js.map +1 -1
  261. package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js +4 -8
  262. package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js.map +1 -1
  263. package/build/cjs/tracing/spanstatus.js +15 -32
  264. package/build/cjs/tracing/spanstatus.js.map +1 -1
  265. package/build/cjs/tracing/trace.js +95 -311
  266. package/build/cjs/tracing/trace.js.map +1 -1
  267. package/build/cjs/tracing/utils.js +4 -14
  268. package/build/cjs/tracing/utils.js.map +1 -1
  269. package/build/cjs/tracing/vercel-ai/constants.js +15 -26
  270. package/build/cjs/tracing/vercel-ai/constants.js.map +1 -1
  271. package/build/cjs/tracing/vercel-ai/index.js +84 -288
  272. package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
  273. package/build/cjs/tracing/vercel-ai/utils.js +30 -128
  274. package/build/cjs/tracing/vercel-ai/utils.js.map +1 -1
  275. package/build/cjs/tracing/vercel-ai/vercel-ai-attributes.js +22 -229
  276. package/build/cjs/tracing/vercel-ai/vercel-ai-attributes.js.map +1 -1
  277. package/build/cjs/transports/base.js +32 -67
  278. package/build/cjs/transports/base.js.map +1 -1
  279. package/build/cjs/transports/multiplexed.js +38 -103
  280. package/build/cjs/transports/multiplexed.js.map +1 -1
  281. package/build/cjs/transports/offline.js +31 -72
  282. package/build/cjs/transports/offline.js.map +1 -1
  283. package/build/cjs/transports/userAgent.js +4 -13
  284. package/build/cjs/transports/userAgent.js.map +1 -1
  285. package/build/cjs/trpc.js +19 -39
  286. package/build/cjs/trpc.js.map +1 -1
  287. package/build/cjs/utils/aggregate-errors.js +18 -62
  288. package/build/cjs/utils/aggregate-errors.js.map +1 -1
  289. package/build/cjs/utils/ai/providerSkip.js +3 -50
  290. package/build/cjs/utils/ai/providerSkip.js.map +1 -1
  291. package/build/cjs/utils/anr.js +7 -36
  292. package/build/cjs/utils/anr.js.map +1 -1
  293. package/build/cjs/utils/baggage.js +37 -146
  294. package/build/cjs/utils/baggage.js.map +1 -1
  295. package/build/cjs/utils/breadcrumb-log-level.js +5 -9
  296. package/build/cjs/utils/breadcrumb-log-level.js.map +1 -1
  297. package/build/cjs/utils/browser.js +24 -86
  298. package/build/cjs/utils/browser.js.map +1 -1
  299. package/build/cjs/utils/chain-and-copy-promiselike.js +10 -27
  300. package/build/cjs/utils/chain-and-copy-promiselike.js.map +1 -1
  301. package/build/cjs/utils/clientreport.js +4 -13
  302. package/build/cjs/utils/clientreport.js.map +1 -1
  303. package/build/cjs/utils/cookie.js +6 -53
  304. package/build/cjs/utils/cookie.js.map +1 -1
  305. package/build/cjs/utils/data-collection/defaultPiiToCollectionOptions.js +28 -0
  306. package/build/cjs/utils/data-collection/defaultPiiToCollectionOptions.js.map +1 -0
  307. package/build/cjs/utils/data-collection/filterCookies.js +23 -0
  308. package/build/cjs/utils/data-collection/filterCookies.js.map +1 -0
  309. package/build/cjs/utils/data-collection/filterKeyValueData.js +43 -0
  310. package/build/cjs/utils/data-collection/filterKeyValueData.js.map +1 -0
  311. package/build/cjs/utils/data-collection/filterQueryParams.js +26 -0
  312. package/build/cjs/utils/data-collection/filterQueryParams.js.map +1 -0
  313. package/build/cjs/utils/data-collection/filtering-snippets.js +61 -0
  314. package/build/cjs/utils/data-collection/filtering-snippets.js.map +1 -0
  315. package/build/cjs/utils/data-collection/resolveDataCollectionOptions.js +37 -0
  316. package/build/cjs/utils/data-collection/resolveDataCollectionOptions.js.map +1 -0
  317. package/build/cjs/utils/debounce.js +5 -32
  318. package/build/cjs/utils/debounce.js.map +1 -1
  319. package/build/cjs/utils/debug-ids.js +4 -42
  320. package/build/cjs/utils/debug-ids.js.map +1 -1
  321. package/build/cjs/utils/debug-logger.js +23 -56
  322. package/build/cjs/utils/debug-logger.js.map +1 -1
  323. package/build/cjs/utils/dsn.js +18 -81
  324. package/build/cjs/utils/dsn.js.map +1 -1
  325. package/build/cjs/utils/env.js +3 -27
  326. package/build/cjs/utils/env.js.map +1 -1
  327. package/build/cjs/utils/envToBool.js +2 -15
  328. package/build/cjs/utils/envToBool.js.map +1 -1
  329. package/build/cjs/utils/envelope.js +39 -133
  330. package/build/cjs/utils/envelope.js.map +1 -1
  331. package/build/cjs/utils/error.js +3 -10
  332. package/build/cjs/utils/error.js.map +1 -1
  333. package/build/cjs/utils/eventUtils.js +0 -8
  334. package/build/cjs/utils/eventUtils.js.map +1 -1
  335. package/build/cjs/utils/eventbuilder.js +30 -114
  336. package/build/cjs/utils/eventbuilder.js.map +1 -1
  337. package/build/cjs/utils/exports.js +5 -24
  338. package/build/cjs/utils/exports.js.map +1 -1
  339. package/build/cjs/utils/featureFlags.js +10 -96
  340. package/build/cjs/utils/featureFlags.js.map +1 -1
  341. package/build/cjs/utils/flushIfServerless.js +14 -48
  342. package/build/cjs/utils/flushIfServerless.js.map +1 -1
  343. package/build/cjs/utils/get-default-export.js +1 -25
  344. package/build/cjs/utils/get-default-export.js.map +1 -1
  345. package/build/cjs/utils/handleCallbackErrors.js +10 -48
  346. package/build/cjs/utils/handleCallbackErrors.js.map +1 -1
  347. package/build/cjs/utils/hasSpansEnabled.js +4 -28
  348. package/build/cjs/utils/hasSpansEnabled.js.map +1 -1
  349. package/build/cjs/utils/ipAddress.js +7 -19
  350. package/build/cjs/utils/ipAddress.js.map +1 -1
  351. package/build/cjs/utils/is.js +18 -163
  352. package/build/cjs/utils/is.js.map +1 -1
  353. package/build/cjs/utils/isBrowser.js +3 -9
  354. package/build/cjs/utils/isBrowser.js.map +1 -1
  355. package/build/cjs/utils/isSentryRequestUrl.js +2 -19
  356. package/build/cjs/utils/isSentryRequestUrl.js.map +1 -1
  357. package/build/cjs/utils/lru.js +13 -24
  358. package/build/cjs/utils/lru.js.map +1 -1
  359. package/build/cjs/utils/merge.js +1 -17
  360. package/build/cjs/utils/merge.js.map +1 -1
  361. package/build/cjs/utils/meta.js +1 -24
  362. package/build/cjs/utils/meta.js.map +1 -1
  363. package/build/cjs/utils/misc.js +31 -134
  364. package/build/cjs/utils/misc.js.map +1 -1
  365. package/build/cjs/utils/node-stack-trace.js +22 -61
  366. package/build/cjs/utils/node-stack-trace.js.map +1 -1
  367. package/build/cjs/utils/node.js +3 -48
  368. package/build/cjs/utils/node.js.map +1 -1
  369. package/build/cjs/utils/normalizationHints.js +5 -18
  370. package/build/cjs/utils/normalizationHints.js.map +1 -1
  371. package/build/cjs/utils/normalize.js +39 -205
  372. package/build/cjs/utils/normalize.js.map +1 -1
  373. package/build/cjs/utils/object.js +33 -168
  374. package/build/cjs/utils/object.js.map +1 -1
  375. package/build/cjs/utils/parameterize.js +2 -21
  376. package/build/cjs/utils/parameterize.js.map +1 -1
  377. package/build/cjs/utils/parseSampleRate.js +4 -13
  378. package/build/cjs/utils/parseSampleRate.js.map +1 -1
  379. package/build/cjs/utils/path.js +28 -115
  380. package/build/cjs/utils/path.js.map +1 -1
  381. package/build/cjs/utils/prepareEvent.js +53 -191
  382. package/build/cjs/utils/prepareEvent.js.map +1 -1
  383. package/build/cjs/utils/promisebuffer.js +5 -47
  384. package/build/cjs/utils/promisebuffer.js.map +1 -1
  385. package/build/cjs/utils/propagationContext.js +0 -7
  386. package/build/cjs/utils/propagationContext.js.map +1 -1
  387. package/build/cjs/utils/randomSafeContext.js +3 -22
  388. package/build/cjs/utils/randomSafeContext.js.map +1 -1
  389. package/build/cjs/utils/ratelimit.js +13 -66
  390. package/build/cjs/utils/ratelimit.js.map +1 -1
  391. package/build/cjs/utils/request.js +62 -269
  392. package/build/cjs/utils/request.js.map +1 -1
  393. package/build/cjs/utils/scopeData.js +15 -79
  394. package/build/cjs/utils/scopeData.js.map +1 -1
  395. package/build/cjs/utils/sdkMetadata.js +5 -19
  396. package/build/cjs/utils/sdkMetadata.js.map +1 -1
  397. package/build/cjs/utils/severity.js +1 -9
  398. package/build/cjs/utils/severity.js.map +1 -1
  399. package/build/cjs/utils/should-ignore-span.js +6 -38
  400. package/build/cjs/utils/should-ignore-span.js.map +1 -1
  401. package/build/cjs/utils/spanOnScope.js +3 -14
  402. package/build/cjs/utils/spanOnScope.js.map +1 -1
  403. package/build/cjs/utils/spanUtils.js +42 -222
  404. package/build/cjs/utils/spanUtils.js.map +1 -1
  405. package/build/cjs/utils/stacktrace.js +19 -106
  406. package/build/cjs/utils/stacktrace.js.map +1 -1
  407. package/build/cjs/utils/string.js +7 -75
  408. package/build/cjs/utils/string.js.map +1 -1
  409. package/build/cjs/utils/supports.js +14 -99
  410. package/build/cjs/utils/supports.js.map +1 -1
  411. package/build/cjs/utils/syncpromise.js +19 -68
  412. package/build/cjs/utils/syncpromise.js.map +1 -1
  413. package/build/cjs/utils/time.js +7 -84
  414. package/build/cjs/utils/time.js.map +1 -1
  415. package/build/cjs/utils/timer.js +1 -10
  416. package/build/cjs/utils/timer.js.map +1 -1
  417. package/build/cjs/utils/timestampSequence.js +5 -21
  418. package/build/cjs/utils/timestampSequence.js.map +1 -1
  419. package/build/cjs/utils/trace-info.js +3 -10
  420. package/build/cjs/utils/trace-info.js.map +1 -1
  421. package/build/cjs/utils/traceData.js +4 -39
  422. package/build/cjs/utils/traceData.js.map +1 -1
  423. package/build/cjs/utils/tracePropagationTargets.js +4 -18
  424. package/build/cjs/utils/tracePropagationTargets.js.map +1 -1
  425. package/build/cjs/utils/tracing.js +32 -106
  426. package/build/cjs/utils/tracing.js.map +1 -1
  427. package/build/cjs/utils/transactionEvent.js +11 -19
  428. package/build/cjs/utils/transactionEvent.js.map +1 -1
  429. package/build/cjs/utils/tunnel.js +12 -33
  430. package/build/cjs/utils/tunnel.js.map +1 -1
  431. package/build/cjs/utils/url.js +42 -176
  432. package/build/cjs/utils/url.js.map +1 -1
  433. package/build/cjs/utils/vercelWaitUntil.js +4 -12
  434. package/build/cjs/utils/vercelWaitUntil.js.map +1 -1
  435. package/build/cjs/utils/version.js +1 -3
  436. package/build/cjs/utils/version.js.map +1 -1
  437. package/build/cjs/utils/weakRef.js +5 -36
  438. package/build/cjs/utils/weakRef.js.map +1 -1
  439. package/build/cjs/utils/worldwide.js +1 -4
  440. package/build/cjs/utils/worldwide.js.map +1 -1
  441. package/build/cjs/vendor/escapeStringForRegex.js +1 -32
  442. package/build/cjs/vendor/escapeStringForRegex.js.map +1 -1
  443. package/build/cjs/vendor/getIpAddress.js +19 -99
  444. package/build/cjs/vendor/getIpAddress.js.map +1 -1
  445. package/build/esm/api.js +10 -34
  446. package/build/esm/api.js.map +1 -1
  447. package/build/esm/asyncContext/index.js +0 -14
  448. package/build/esm/asyncContext/index.js.map +1 -1
  449. package/build/esm/asyncContext/stackStrategy.js +16 -47
  450. package/build/esm/asyncContext/stackStrategy.js.map +1 -1
  451. package/build/esm/attributes.js +17 -95
  452. package/build/esm/attributes.js.map +1 -1
  453. package/build/esm/breadcrumbs.js +2 -22
  454. package/build/esm/breadcrumbs.js.map +1 -1
  455. package/build/esm/browser.js +5 -1
  456. package/build/esm/browser.js.map +1 -1
  457. package/build/esm/carrier.js +5 -42
  458. package/build/esm/carrier.js.map +1 -1
  459. package/build/esm/checkin.js +5 -19
  460. package/build/esm/checkin.js.map +1 -1
  461. package/build/esm/client.js +216 -585
  462. package/build/esm/client.js.map +1 -1
  463. package/build/esm/constants.js +2 -2
  464. package/build/esm/currentScopes.js +5 -86
  465. package/build/esm/currentScopes.js.map +1 -1
  466. package/build/esm/debug-build.js +0 -5
  467. package/build/esm/debug-build.js.map +1 -1
  468. package/build/esm/defaultScopes.js +2 -5
  469. package/build/esm/defaultScopes.js.map +1 -1
  470. package/build/esm/envelope.js +32 -103
  471. package/build/esm/envelope.js.map +1 -1
  472. package/build/esm/eventProcessors.js +4 -23
  473. package/build/esm/eventProcessors.js.map +1 -1
  474. package/build/esm/exports.js +21 -197
  475. package/build/esm/exports.js.map +1 -1
  476. package/build/esm/feedback.js +7 -19
  477. package/build/esm/feedback.js.map +1 -1
  478. package/build/esm/fetch.js +66 -201
  479. package/build/esm/fetch.js.map +1 -1
  480. package/build/esm/index.js +7 -1
  481. package/build/esm/index.js.map +1 -1
  482. package/build/esm/instrument/console.js +9 -41
  483. package/build/esm/instrument/console.js.map +1 -1
  484. package/build/esm/instrument/fetch.js +47 -156
  485. package/build/esm/instrument/fetch.js.map +1 -1
  486. package/build/esm/instrument/globalError.js +4 -25
  487. package/build/esm/instrument/globalError.js.map +1 -1
  488. package/build/esm/instrument/globalUnhandledRejection.js +4 -21
  489. package/build/esm/instrument/globalUnhandledRejection.js.map +1 -1
  490. package/build/esm/instrument/handlers.js +9 -21
  491. package/build/esm/instrument/handlers.js.map +1 -1
  492. package/build/esm/integration.js +13 -77
  493. package/build/esm/integration.js.map +1 -1
  494. package/build/esm/integrations/captureconsole.js +16 -40
  495. package/build/esm/integrations/captureconsole.js.map +1 -1
  496. package/build/esm/integrations/consola.js +57 -163
  497. package/build/esm/integrations/consola.js.map +1 -1
  498. package/build/esm/integrations/console.js +11 -43
  499. package/build/esm/integrations/console.js.map +1 -1
  500. package/build/esm/integrations/conversationId.js +5 -22
  501. package/build/esm/integrations/conversationId.js.map +1 -1
  502. package/build/esm/integrations/dedupe.js +16 -74
  503. package/build/esm/integrations/dedupe.js.map +1 -1
  504. package/build/esm/integrations/eventFilters.js +63 -114
  505. package/build/esm/integrations/eventFilters.js.map +1 -1
  506. package/build/esm/integrations/express/index.js +30 -145
  507. package/build/esm/integrations/express/index.js.map +1 -1
  508. package/build/esm/integrations/express/patch-layer.js +20 -130
  509. package/build/esm/integrations/express/patch-layer.js.map +1 -1
  510. package/build/esm/integrations/express/request-layer-store.js +1 -3
  511. package/build/esm/integrations/express/request-layer-store.js.map +1 -1
  512. package/build/esm/integrations/express/set-sdk-processing-metadata.js +0 -2
  513. package/build/esm/integrations/express/set-sdk-processing-metadata.js.map +1 -1
  514. package/build/esm/integrations/express/types.js +6 -7
  515. package/build/esm/integrations/express/types.js.map +1 -1
  516. package/build/esm/integrations/express/utils.js +37 -145
  517. package/build/esm/integrations/express/utils.js.map +1 -1
  518. package/build/esm/integrations/extraerrordata.js +24 -69
  519. package/build/esm/integrations/extraerrordata.js.map +1 -1
  520. package/build/esm/integrations/featureFlags/featureFlagsIntegration.js +3 -29
  521. package/build/esm/integrations/featureFlags/featureFlagsIntegration.js.map +1 -1
  522. package/build/esm/integrations/featureFlags/growthbook.js +11 -40
  523. package/build/esm/integrations/featureFlags/growthbook.js.map +1 -1
  524. package/build/esm/integrations/functiontostring.js +6 -27
  525. package/build/esm/integrations/functiontostring.js.map +1 -1
  526. package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js +10 -18
  527. package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -1
  528. package/build/esm/integrations/http/client-patch.js +8 -70
  529. package/build/esm/integrations/http/client-patch.js.map +1 -1
  530. package/build/esm/integrations/http/client-subscriptions.js +22 -59
  531. package/build/esm/integrations/http/client-subscriptions.js.map +1 -1
  532. package/build/esm/integrations/http/constants.js +3 -3
  533. package/build/esm/integrations/http/double-wrap-warning.js +10 -18
  534. package/build/esm/integrations/http/double-wrap-warning.js.map +1 -1
  535. package/build/esm/integrations/http/get-outgoing-span-data.js +30 -47
  536. package/build/esm/integrations/http/get-outgoing-span-data.js.map +1 -1
  537. package/build/esm/integrations/http/get-request-url.js +7 -24
  538. package/build/esm/integrations/http/get-request-url.js.map +1 -1
  539. package/build/esm/integrations/http/inject-trace-propagation-headers.js +14 -38
  540. package/build/esm/integrations/http/inject-trace-propagation-headers.js.map +1 -1
  541. package/build/esm/integrations/http/patch-request-to-capture-body.js +78 -0
  542. package/build/esm/integrations/http/patch-request-to-capture-body.js.map +1 -0
  543. package/build/esm/integrations/http/record-request-session.js +59 -0
  544. package/build/esm/integrations/http/record-request-session.js.map +1 -0
  545. package/build/esm/integrations/http/server-subscription.js +285 -0
  546. package/build/esm/integrations/http/server-subscription.js.map +1 -0
  547. package/build/esm/integrations/linkederrors.js +6 -11
  548. package/build/esm/integrations/linkederrors.js.map +1 -1
  549. package/build/esm/integrations/mcp-server/attributeExtraction.js +26 -69
  550. package/build/esm/integrations/mcp-server/attributeExtraction.js.map +1 -1
  551. package/build/esm/integrations/mcp-server/attributes.js +30 -138
  552. package/build/esm/integrations/mcp-server/attributes.js.map +1 -1
  553. package/build/esm/integrations/mcp-server/correlation.js +20 -91
  554. package/build/esm/integrations/mcp-server/correlation.js.map +1 -1
  555. package/build/esm/integrations/mcp-server/errorCapture.js +6 -25
  556. package/build/esm/integrations/mcp-server/errorCapture.js.map +1 -1
  557. package/build/esm/integrations/mcp-server/handlers.js +55 -169
  558. package/build/esm/integrations/mcp-server/handlers.js.map +1 -1
  559. package/build/esm/integrations/mcp-server/index.js +7 -60
  560. package/build/esm/integrations/mcp-server/index.js.map +1 -1
  561. package/build/esm/integrations/mcp-server/methodConfig.js +21 -59
  562. package/build/esm/integrations/mcp-server/methodConfig.js.map +1 -1
  563. package/build/esm/integrations/mcp-server/piiFiltering.js +5 -33
  564. package/build/esm/integrations/mcp-server/piiFiltering.js.map +1 -1
  565. package/build/esm/integrations/mcp-server/resultExtraction.js +20 -76
  566. package/build/esm/integrations/mcp-server/resultExtraction.js.map +1 -1
  567. package/build/esm/integrations/mcp-server/sessionExtraction.js +30 -121
  568. package/build/esm/integrations/mcp-server/sessionExtraction.js.map +1 -1
  569. package/build/esm/integrations/mcp-server/sessionManagement.js +2 -60
  570. package/build/esm/integrations/mcp-server/sessionManagement.js.map +1 -1
  571. package/build/esm/integrations/mcp-server/spans.js +20 -107
  572. package/build/esm/integrations/mcp-server/spans.js.map +1 -1
  573. package/build/esm/integrations/mcp-server/transport.js +26 -94
  574. package/build/esm/integrations/mcp-server/transport.js.map +1 -1
  575. package/build/esm/integrations/mcp-server/validation.js +6 -72
  576. package/build/esm/integrations/mcp-server/validation.js.map +1 -1
  577. package/build/esm/integrations/moduleMetadata.js +6 -20
  578. package/build/esm/integrations/moduleMetadata.js.map +1 -1
  579. package/build/esm/integrations/postgresjs.js +78 -287
  580. package/build/esm/integrations/postgresjs.js.map +1 -1
  581. package/build/esm/integrations/requestdata.js +30 -93
  582. package/build/esm/integrations/requestdata.js.map +1 -1
  583. package/build/esm/integrations/rewriteframes.js +14 -45
  584. package/build/esm/integrations/rewriteframes.js.map +1 -1
  585. package/build/esm/integrations/spanStreaming.js +9 -15
  586. package/build/esm/integrations/spanStreaming.js.map +1 -1
  587. package/build/esm/integrations/supabase.js +224 -333
  588. package/build/esm/integrations/supabase.js.map +1 -1
  589. package/build/esm/integrations/third-party-errors-filter.js +60 -85
  590. package/build/esm/integrations/third-party-errors-filter.js.map +1 -1
  591. package/build/esm/integrations/zoderrors.js +35 -111
  592. package/build/esm/integrations/zoderrors.js.map +1 -1
  593. package/build/esm/logs/console-integration.js +15 -50
  594. package/build/esm/logs/console-integration.js.map +1 -1
  595. package/build/esm/logs/constants.js +1 -6
  596. package/build/esm/logs/constants.js.map +1 -1
  597. package/build/esm/logs/envelope.js +10 -40
  598. package/build/esm/logs/envelope.js.map +1 -1
  599. package/build/esm/logs/internal.js +53 -126
  600. package/build/esm/logs/internal.js.map +1 -1
  601. package/build/esm/logs/public-api.js +13 -228
  602. package/build/esm/logs/public-api.js.map +1 -1
  603. package/build/esm/logs/utils.js +6 -47
  604. package/build/esm/logs/utils.js.map +1 -1
  605. package/build/esm/metadata.js +6 -51
  606. package/build/esm/metadata.js.map +1 -1
  607. package/build/esm/metrics/envelope.js +12 -45
  608. package/build/esm/metrics/envelope.js.map +1 -1
  609. package/build/esm/metrics/internal.js +31 -144
  610. package/build/esm/metrics/internal.js.map +1 -1
  611. package/build/esm/metrics/public-api.js +4 -109
  612. package/build/esm/metrics/public-api.js.map +1 -1
  613. package/build/esm/package.json +1 -1
  614. package/build/esm/profiling.js +11 -41
  615. package/build/esm/profiling.js.map +1 -1
  616. package/build/esm/scope.js +73 -224
  617. package/build/esm/scope.js.map +1 -1
  618. package/build/esm/sdk.js +2 -21
  619. package/build/esm/sdk.js.map +1 -1
  620. package/build/esm/semanticAttributes.js +31 -118
  621. package/build/esm/semanticAttributes.js.map +1 -1
  622. package/build/esm/server-runtime-client.js +32 -87
  623. package/build/esm/server-runtime-client.js.map +1 -1
  624. package/build/esm/server.js +7 -1
  625. package/build/esm/server.js.map +1 -1
  626. package/build/esm/session.js +14 -67
  627. package/build/esm/session.js.map +1 -1
  628. package/build/esm/tracing/ai/gen-ai-attributes.js +45 -249
  629. package/build/esm/tracing/ai/gen-ai-attributes.js.map +1 -1
  630. package/build/esm/tracing/ai/mediaStripping.js +21 -116
  631. package/build/esm/tracing/ai/mediaStripping.js.map +1 -1
  632. package/build/esm/tracing/ai/messageTruncation.js +26 -212
  633. package/build/esm/tracing/ai/messageTruncation.js.map +1 -1
  634. package/build/esm/tracing/ai/utils.js +40 -180
  635. package/build/esm/tracing/ai/utils.js.map +1 -1
  636. package/build/esm/tracing/anthropic-ai/constants.js +9 -12
  637. package/build/esm/tracing/anthropic-ai/constants.js.map +1 -1
  638. package/build/esm/tracing/anthropic-ai/index.js +67 -172
  639. package/build/esm/tracing/anthropic-ai/index.js.map +1 -1
  640. package/build/esm/tracing/anthropic-ai/streaming.js +45 -149
  641. package/build/esm/tracing/anthropic-ai/streaming.js.map +1 -1
  642. package/build/esm/tracing/anthropic-ai/utils.js +17 -47
  643. package/build/esm/tracing/anthropic-ai/utils.js.map +1 -1
  644. package/build/esm/tracing/dynamicSamplingContext.js +18 -85
  645. package/build/esm/tracing/dynamicSamplingContext.js.map +1 -1
  646. package/build/esm/tracing/errors.js +2 -14
  647. package/build/esm/tracing/errors.js.map +1 -1
  648. package/build/esm/tracing/google-genai/constants.js +9 -16
  649. package/build/esm/tracing/google-genai/constants.js.map +1 -1
  650. package/build/esm/tracing/google-genai/index.js +79 -223
  651. package/build/esm/tracing/google-genai/index.js.map +1 -1
  652. package/build/esm/tracing/google-genai/streaming.js +11 -56
  653. package/build/esm/tracing/google-genai/streaming.js.map +1 -1
  654. package/build/esm/tracing/google-genai/utils.js +8 -13
  655. package/build/esm/tracing/google-genai/utils.js.map +1 -1
  656. package/build/esm/tracing/idleSpan.js +48 -174
  657. package/build/esm/tracing/idleSpan.js.map +1 -1
  658. package/build/esm/tracing/langchain/constants.js +8 -9
  659. package/build/esm/tracing/langchain/constants.js.map +1 -1
  660. package/build/esm/tracing/langchain/embeddings.js +31 -75
  661. package/build/esm/tracing/langchain/embeddings.js.map +1 -1
  662. package/build/esm/tracing/langchain/index.js +64 -161
  663. package/build/esm/tracing/langchain/index.js.map +1 -1
  664. package/build/esm/tracing/langchain/utils.js +101 -312
  665. package/build/esm/tracing/langchain/utils.js.map +1 -1
  666. package/build/esm/tracing/langgraph/constants.js +2 -2
  667. package/build/esm/tracing/langgraph/index.js +59 -162
  668. package/build/esm/tracing/langgraph/index.js.map +1 -1
  669. package/build/esm/tracing/langgraph/utils.js +54 -170
  670. package/build/esm/tracing/langgraph/utils.js.map +1 -1
  671. package/build/esm/tracing/logSpans.js +10 -26
  672. package/build/esm/tracing/logSpans.js.map +1 -1
  673. package/build/esm/tracing/measurement.js +6 -18
  674. package/build/esm/tracing/measurement.js.map +1 -1
  675. package/build/esm/tracing/openai/constants.js +20 -24
  676. package/build/esm/tracing/openai/constants.js.map +1 -1
  677. package/build/esm/tracing/openai/index.js +52 -132
  678. package/build/esm/tracing/openai/index.js.map +1 -1
  679. package/build/esm/tracing/openai/streaming.js +24 -102
  680. package/build/esm/tracing/openai/streaming.js.map +1 -1
  681. package/build/esm/tracing/openai/utils.js +36 -107
  682. package/build/esm/tracing/openai/utils.js.map +1 -1
  683. package/build/esm/tracing/sampling.js +23 -63
  684. package/build/esm/tracing/sampling.js.map +1 -1
  685. package/build/esm/tracing/sentryNonRecordingSpan.js +15 -40
  686. package/build/esm/tracing/sentryNonRecordingSpan.js.map +1 -1
  687. package/build/esm/tracing/sentrySpan.js +66 -172
  688. package/build/esm/tracing/sentrySpan.js.map +1 -1
  689. package/build/esm/tracing/spans/beforeSendSpan.js +4 -32
  690. package/build/esm/tracing/spans/beforeSendSpan.js.map +1 -1
  691. package/build/esm/tracing/spans/captureSpan.js +64 -166
  692. package/build/esm/tracing/spans/captureSpan.js.map +1 -1
  693. package/build/esm/tracing/spans/envelope.js +12 -24
  694. package/build/esm/tracing/spans/envelope.js.map +1 -1
  695. package/build/esm/tracing/spans/estimateSize.js +0 -22
  696. package/build/esm/tracing/spans/estimateSize.js.map +1 -1
  697. package/build/esm/tracing/spans/extractGenAiSpans.js +11 -33
  698. package/build/esm/tracing/spans/extractGenAiSpans.js.map +1 -1
  699. package/build/esm/tracing/spans/hasSpanStreamingEnabled.js +1 -4
  700. package/build/esm/tracing/spans/hasSpanStreamingEnabled.js.map +1 -1
  701. package/build/esm/tracing/spans/scopeContextAttributes.js +56 -0
  702. package/build/esm/tracing/spans/scopeContextAttributes.js.map +1 -0
  703. package/build/esm/tracing/spans/spanBuffer.js +21 -71
  704. package/build/esm/tracing/spans/spanBuffer.js.map +1 -1
  705. package/build/esm/tracing/spans/spanJsonToStreamedSpan.js +4 -8
  706. package/build/esm/tracing/spans/spanJsonToStreamedSpan.js.map +1 -1
  707. package/build/esm/tracing/spanstatus.js +15 -32
  708. package/build/esm/tracing/spanstatus.js.map +1 -1
  709. package/build/esm/tracing/trace.js +95 -311
  710. package/build/esm/tracing/trace.js.map +1 -1
  711. package/build/esm/tracing/utils.js +4 -14
  712. package/build/esm/tracing/utils.js.map +1 -1
  713. package/build/esm/tracing/vercel-ai/constants.js +15 -26
  714. package/build/esm/tracing/vercel-ai/constants.js.map +1 -1
  715. package/build/esm/tracing/vercel-ai/index.js +84 -288
  716. package/build/esm/tracing/vercel-ai/index.js.map +1 -1
  717. package/build/esm/tracing/vercel-ai/utils.js +30 -128
  718. package/build/esm/tracing/vercel-ai/utils.js.map +1 -1
  719. package/build/esm/tracing/vercel-ai/vercel-ai-attributes.js +22 -229
  720. package/build/esm/tracing/vercel-ai/vercel-ai-attributes.js.map +1 -1
  721. package/build/esm/transports/base.js +32 -67
  722. package/build/esm/transports/base.js.map +1 -1
  723. package/build/esm/transports/multiplexed.js +38 -103
  724. package/build/esm/transports/multiplexed.js.map +1 -1
  725. package/build/esm/transports/offline.js +31 -72
  726. package/build/esm/transports/offline.js.map +1 -1
  727. package/build/esm/transports/userAgent.js +4 -13
  728. package/build/esm/transports/userAgent.js.map +1 -1
  729. package/build/esm/trpc.js +19 -39
  730. package/build/esm/trpc.js.map +1 -1
  731. package/build/esm/utils/aggregate-errors.js +18 -62
  732. package/build/esm/utils/aggregate-errors.js.map +1 -1
  733. package/build/esm/utils/ai/providerSkip.js +3 -50
  734. package/build/esm/utils/ai/providerSkip.js.map +1 -1
  735. package/build/esm/utils/anr.js +7 -36
  736. package/build/esm/utils/anr.js.map +1 -1
  737. package/build/esm/utils/baggage.js +37 -146
  738. package/build/esm/utils/baggage.js.map +1 -1
  739. package/build/esm/utils/breadcrumb-log-level.js +5 -9
  740. package/build/esm/utils/breadcrumb-log-level.js.map +1 -1
  741. package/build/esm/utils/browser.js +24 -86
  742. package/build/esm/utils/browser.js.map +1 -1
  743. package/build/esm/utils/chain-and-copy-promiselike.js +10 -27
  744. package/build/esm/utils/chain-and-copy-promiselike.js.map +1 -1
  745. package/build/esm/utils/clientreport.js +4 -13
  746. package/build/esm/utils/clientreport.js.map +1 -1
  747. package/build/esm/utils/cookie.js +6 -53
  748. package/build/esm/utils/cookie.js.map +1 -1
  749. package/build/esm/utils/data-collection/defaultPiiToCollectionOptions.js +26 -0
  750. package/build/esm/utils/data-collection/defaultPiiToCollectionOptions.js.map +1 -0
  751. package/build/esm/utils/data-collection/filterCookies.js +21 -0
  752. package/build/esm/utils/data-collection/filterCookies.js.map +1 -0
  753. package/build/esm/utils/data-collection/filterKeyValueData.js +41 -0
  754. package/build/esm/utils/data-collection/filterKeyValueData.js.map +1 -0
  755. package/build/esm/utils/data-collection/filterQueryParams.js +24 -0
  756. package/build/esm/utils/data-collection/filterQueryParams.js.map +1 -0
  757. package/build/esm/utils/data-collection/filtering-snippets.js +56 -0
  758. package/build/esm/utils/data-collection/filtering-snippets.js.map +1 -0
  759. package/build/esm/utils/data-collection/resolveDataCollectionOptions.js +35 -0
  760. package/build/esm/utils/data-collection/resolveDataCollectionOptions.js.map +1 -0
  761. package/build/esm/utils/debounce.js +5 -32
  762. package/build/esm/utils/debounce.js.map +1 -1
  763. package/build/esm/utils/debug-ids.js +4 -42
  764. package/build/esm/utils/debug-ids.js.map +1 -1
  765. package/build/esm/utils/debug-logger.js +23 -56
  766. package/build/esm/utils/debug-logger.js.map +1 -1
  767. package/build/esm/utils/dsn.js +18 -81
  768. package/build/esm/utils/dsn.js.map +1 -1
  769. package/build/esm/utils/env.js +3 -27
  770. package/build/esm/utils/env.js.map +1 -1
  771. package/build/esm/utils/envToBool.js +2 -15
  772. package/build/esm/utils/envToBool.js.map +1 -1
  773. package/build/esm/utils/envelope.js +39 -133
  774. package/build/esm/utils/envelope.js.map +1 -1
  775. package/build/esm/utils/error.js +3 -10
  776. package/build/esm/utils/error.js.map +1 -1
  777. package/build/esm/utils/eventUtils.js +0 -8
  778. package/build/esm/utils/eventUtils.js.map +1 -1
  779. package/build/esm/utils/eventbuilder.js +30 -114
  780. package/build/esm/utils/eventbuilder.js.map +1 -1
  781. package/build/esm/utils/exports.js +5 -24
  782. package/build/esm/utils/exports.js.map +1 -1
  783. package/build/esm/utils/featureFlags.js +10 -96
  784. package/build/esm/utils/featureFlags.js.map +1 -1
  785. package/build/esm/utils/flushIfServerless.js +14 -48
  786. package/build/esm/utils/flushIfServerless.js.map +1 -1
  787. package/build/esm/utils/get-default-export.js +1 -25
  788. package/build/esm/utils/get-default-export.js.map +1 -1
  789. package/build/esm/utils/handleCallbackErrors.js +10 -48
  790. package/build/esm/utils/handleCallbackErrors.js.map +1 -1
  791. package/build/esm/utils/hasSpansEnabled.js +4 -28
  792. package/build/esm/utils/hasSpansEnabled.js.map +1 -1
  793. package/build/esm/utils/ipAddress.js +7 -19
  794. package/build/esm/utils/ipAddress.js.map +1 -1
  795. package/build/esm/utils/is.js +18 -163
  796. package/build/esm/utils/is.js.map +1 -1
  797. package/build/esm/utils/isBrowser.js +3 -9
  798. package/build/esm/utils/isBrowser.js.map +1 -1
  799. package/build/esm/utils/isSentryRequestUrl.js +2 -19
  800. package/build/esm/utils/isSentryRequestUrl.js.map +1 -1
  801. package/build/esm/utils/lru.js +13 -24
  802. package/build/esm/utils/lru.js.map +1 -1
  803. package/build/esm/utils/merge.js +1 -17
  804. package/build/esm/utils/merge.js.map +1 -1
  805. package/build/esm/utils/meta.js +1 -24
  806. package/build/esm/utils/meta.js.map +1 -1
  807. package/build/esm/utils/misc.js +31 -134
  808. package/build/esm/utils/misc.js.map +1 -1
  809. package/build/esm/utils/node-stack-trace.js +22 -61
  810. package/build/esm/utils/node-stack-trace.js.map +1 -1
  811. package/build/esm/utils/node.js +3 -48
  812. package/build/esm/utils/node.js.map +1 -1
  813. package/build/esm/utils/normalizationHints.js +5 -18
  814. package/build/esm/utils/normalizationHints.js.map +1 -1
  815. package/build/esm/utils/normalize.js +39 -205
  816. package/build/esm/utils/normalize.js.map +1 -1
  817. package/build/esm/utils/object.js +33 -168
  818. package/build/esm/utils/object.js.map +1 -1
  819. package/build/esm/utils/parameterize.js +2 -21
  820. package/build/esm/utils/parameterize.js.map +1 -1
  821. package/build/esm/utils/parseSampleRate.js +4 -13
  822. package/build/esm/utils/parseSampleRate.js.map +1 -1
  823. package/build/esm/utils/path.js +28 -115
  824. package/build/esm/utils/path.js.map +1 -1
  825. package/build/esm/utils/prepareEvent.js +53 -191
  826. package/build/esm/utils/prepareEvent.js.map +1 -1
  827. package/build/esm/utils/promisebuffer.js +5 -47
  828. package/build/esm/utils/promisebuffer.js.map +1 -1
  829. package/build/esm/utils/propagationContext.js +0 -7
  830. package/build/esm/utils/propagationContext.js.map +1 -1
  831. package/build/esm/utils/randomSafeContext.js +3 -22
  832. package/build/esm/utils/randomSafeContext.js.map +1 -1
  833. package/build/esm/utils/ratelimit.js +13 -66
  834. package/build/esm/utils/ratelimit.js.map +1 -1
  835. package/build/esm/utils/request.js +62 -269
  836. package/build/esm/utils/request.js.map +1 -1
  837. package/build/esm/utils/scopeData.js +15 -79
  838. package/build/esm/utils/scopeData.js.map +1 -1
  839. package/build/esm/utils/sdkMetadata.js +5 -19
  840. package/build/esm/utils/sdkMetadata.js.map +1 -1
  841. package/build/esm/utils/severity.js +1 -9
  842. package/build/esm/utils/severity.js.map +1 -1
  843. package/build/esm/utils/should-ignore-span.js +6 -38
  844. package/build/esm/utils/should-ignore-span.js.map +1 -1
  845. package/build/esm/utils/spanOnScope.js +3 -14
  846. package/build/esm/utils/spanOnScope.js.map +1 -1
  847. package/build/esm/utils/spanUtils.js +42 -222
  848. package/build/esm/utils/spanUtils.js.map +1 -1
  849. package/build/esm/utils/stacktrace.js +19 -106
  850. package/build/esm/utils/stacktrace.js.map +1 -1
  851. package/build/esm/utils/string.js +7 -75
  852. package/build/esm/utils/string.js.map +1 -1
  853. package/build/esm/utils/supports.js +14 -99
  854. package/build/esm/utils/supports.js.map +1 -1
  855. package/build/esm/utils/syncpromise.js +19 -68
  856. package/build/esm/utils/syncpromise.js.map +1 -1
  857. package/build/esm/utils/time.js +7 -84
  858. package/build/esm/utils/time.js.map +1 -1
  859. package/build/esm/utils/timer.js +1 -10
  860. package/build/esm/utils/timer.js.map +1 -1
  861. package/build/esm/utils/timestampSequence.js +5 -21
  862. package/build/esm/utils/timestampSequence.js.map +1 -1
  863. package/build/esm/utils/trace-info.js +3 -10
  864. package/build/esm/utils/trace-info.js.map +1 -1
  865. package/build/esm/utils/traceData.js +4 -39
  866. package/build/esm/utils/traceData.js.map +1 -1
  867. package/build/esm/utils/tracePropagationTargets.js +4 -18
  868. package/build/esm/utils/tracePropagationTargets.js.map +1 -1
  869. package/build/esm/utils/tracing.js +32 -106
  870. package/build/esm/utils/tracing.js.map +1 -1
  871. package/build/esm/utils/transactionEvent.js +11 -19
  872. package/build/esm/utils/transactionEvent.js.map +1 -1
  873. package/build/esm/utils/tunnel.js +12 -33
  874. package/build/esm/utils/tunnel.js.map +1 -1
  875. package/build/esm/utils/url.js +42 -176
  876. package/build/esm/utils/url.js.map +1 -1
  877. package/build/esm/utils/vercelWaitUntil.js +4 -12
  878. package/build/esm/utils/vercelWaitUntil.js.map +1 -1
  879. package/build/esm/utils/version.js +1 -3
  880. package/build/esm/utils/version.js.map +1 -1
  881. package/build/esm/utils/weakRef.js +5 -36
  882. package/build/esm/utils/weakRef.js.map +1 -1
  883. package/build/esm/utils/worldwide.js +1 -4
  884. package/build/esm/utils/worldwide.js.map +1 -1
  885. package/build/esm/vendor/escapeStringForRegex.js +1 -32
  886. package/build/esm/vendor/escapeStringForRegex.js.map +1 -1
  887. package/build/esm/vendor/getIpAddress.js +19 -99
  888. package/build/esm/vendor/getIpAddress.js.map +1 -1
  889. package/build/types/api.d.ts +2 -2
  890. package/build/types/api.d.ts.map +1 -1
  891. package/build/types/attributes.d.ts +5 -8
  892. package/build/types/attributes.d.ts.map +1 -1
  893. package/build/types/breadcrumbs.d.ts +1 -1
  894. package/build/types/breadcrumbs.d.ts.map +1 -1
  895. package/build/types/browser-exports.d.ts +3 -3
  896. package/build/types/browser-exports.d.ts.map +1 -1
  897. package/build/types/carrier.d.ts +2 -2
  898. package/build/types/carrier.d.ts.map +1 -1
  899. package/build/types/checkin.d.ts +4 -4
  900. package/build/types/checkin.d.ts.map +1 -1
  901. package/build/types/client.d.ts +32 -22
  902. package/build/types/client.d.ts.map +1 -1
  903. package/build/types/currentScopes.d.ts +1 -1
  904. package/build/types/currentScopes.d.ts.map +1 -1
  905. package/build/types/envelope.d.ts +7 -7
  906. package/build/types/envelope.d.ts.map +1 -1
  907. package/build/types/eventProcessors.d.ts +2 -2
  908. package/build/types/eventProcessors.d.ts.map +1 -1
  909. package/build/types/exports.d.ts +8 -8
  910. package/build/types/exports.d.ts.map +1 -1
  911. package/build/types/feedback.d.ts +2 -2
  912. package/build/types/feedback.d.ts.map +1 -1
  913. package/build/types/fetch.d.ts +3 -3
  914. package/build/types/fetch.d.ts.map +1 -1
  915. package/build/types/instrument/console.d.ts +1 -1
  916. package/build/types/instrument/console.d.ts.map +1 -1
  917. package/build/types/instrument/fetch.d.ts +1 -1
  918. package/build/types/instrument/fetch.d.ts.map +1 -1
  919. package/build/types/instrument/globalError.d.ts +1 -1
  920. package/build/types/instrument/globalError.d.ts.map +1 -1
  921. package/build/types/instrument/globalUnhandledRejection.d.ts +1 -1
  922. package/build/types/instrument/globalUnhandledRejection.d.ts.map +1 -1
  923. package/build/types/integration.d.ts +2 -2
  924. package/build/types/integration.d.ts.map +1 -1
  925. package/build/types/integrations/consola.d.ts +1 -1
  926. package/build/types/integrations/consola.d.ts.map +1 -1
  927. package/build/types/integrations/console.d.ts +1 -1
  928. package/build/types/integrations/console.d.ts.map +1 -1
  929. package/build/types/integrations/dedupe.d.ts +1 -1
  930. package/build/types/integrations/dedupe.d.ts.map +1 -1
  931. package/build/types/integrations/express/types.d.ts +2 -2
  932. package/build/types/integrations/express/types.d.ts.map +1 -1
  933. package/build/types/integrations/express/utils.d.ts +1 -1
  934. package/build/types/integrations/express/utils.d.ts.map +1 -1
  935. package/build/types/integrations/featureFlags/featureFlagsIntegration.d.ts +1 -1
  936. package/build/types/integrations/featureFlags/featureFlagsIntegration.d.ts.map +1 -1
  937. package/build/types/integrations/featureFlags/growthbook.d.ts +1 -1
  938. package/build/types/integrations/featureFlags/growthbook.d.ts.map +1 -1
  939. package/build/types/integrations/http/double-wrap-warning.d.ts +1 -1
  940. package/build/types/integrations/http/double-wrap-warning.d.ts.map +1 -1
  941. package/build/types/integrations/http/get-outgoing-span-data.d.ts +2 -2
  942. package/build/types/integrations/http/get-outgoing-span-data.d.ts.map +1 -1
  943. package/build/types/integrations/http/patch-request-to-capture-body.d.ts +12 -0
  944. package/build/types/integrations/http/patch-request-to-capture-body.d.ts.map +1 -0
  945. package/build/types/integrations/http/record-request-session.d.ts +18 -0
  946. package/build/types/integrations/http/record-request-session.d.ts.map +1 -0
  947. package/build/types/integrations/http/server-subscription.d.ts +26 -0
  948. package/build/types/integrations/http/server-subscription.d.ts.map +1 -0
  949. package/build/types/integrations/http/types.d.ts +12 -6
  950. package/build/types/integrations/http/types.d.ts.map +1 -1
  951. package/build/types/integrations/mcp-server/correlation.d.ts +1 -1
  952. package/build/types/integrations/mcp-server/correlation.d.ts.map +1 -1
  953. package/build/types/integrations/mcp-server/piiFiltering.d.ts +1 -1
  954. package/build/types/integrations/mcp-server/piiFiltering.d.ts.map +1 -1
  955. package/build/types/integrations/mcp-server/types.d.ts +1 -1
  956. package/build/types/integrations/mcp-server/types.d.ts.map +1 -1
  957. package/build/types/integrations/postgresjs.d.ts +1 -1
  958. package/build/types/integrations/postgresjs.d.ts.map +1 -1
  959. package/build/types/integrations/rewriteframes.d.ts +1 -1
  960. package/build/types/integrations/rewriteframes.d.ts.map +1 -1
  961. package/build/types/integrations/supabase.d.ts +14 -3
  962. package/build/types/integrations/supabase.d.ts.map +1 -1
  963. package/build/types/integrations/third-party-errors-filter.d.ts.map +1 -1
  964. package/build/types/integrations/zoderrors.d.ts +1 -1
  965. package/build/types/integrations/zoderrors.d.ts.map +1 -1
  966. package/build/types/logs/console-integration.d.ts +1 -1
  967. package/build/types/logs/console-integration.d.ts.map +1 -1
  968. package/build/types/logs/constants.d.ts +1 -1
  969. package/build/types/logs/constants.d.ts.map +1 -1
  970. package/build/types/logs/envelope.d.ts +4 -4
  971. package/build/types/logs/envelope.d.ts.map +1 -1
  972. package/build/types/logs/internal.d.ts +16 -1
  973. package/build/types/logs/internal.d.ts.map +1 -1
  974. package/build/types/logs/public-api.d.ts +2 -2
  975. package/build/types/logs/public-api.d.ts.map +1 -1
  976. package/build/types/metadata.d.ts +2 -2
  977. package/build/types/metadata.d.ts.map +1 -1
  978. package/build/types/metrics/envelope.d.ts +4 -4
  979. package/build/types/metrics/envelope.d.ts.map +1 -1
  980. package/build/types/metrics/internal.d.ts +1 -1
  981. package/build/types/metrics/internal.d.ts.map +1 -1
  982. package/build/types/metrics/public-api.d.ts +1 -1
  983. package/build/types/metrics/public-api.d.ts.map +1 -1
  984. package/build/types/profiling.d.ts +1 -1
  985. package/build/types/profiling.d.ts.map +1 -1
  986. package/build/types/report-dialog.d.ts +1 -1
  987. package/build/types/report-dialog.d.ts.map +1 -1
  988. package/build/types/scope.d.ts +14 -14
  989. package/build/types/scope.d.ts.map +1 -1
  990. package/build/types/sdk.d.ts +1 -1
  991. package/build/types/sdk.d.ts.map +1 -1
  992. package/build/types/semanticAttributes.d.ts +6 -4
  993. package/build/types/semanticAttributes.d.ts.map +1 -1
  994. package/build/types/server-exports.d.ts +3 -1
  995. package/build/types/server-exports.d.ts.map +1 -1
  996. package/build/types/server-runtime-client.d.ts +6 -6
  997. package/build/types/server-runtime-client.d.ts.map +1 -1
  998. package/build/types/session.d.ts +1 -1
  999. package/build/types/session.d.ts.map +1 -1
  1000. package/build/types/shared-exports.d.ts +58 -53
  1001. package/build/types/shared-exports.d.ts.map +1 -1
  1002. package/build/types/tracing/ai/utils.d.ts +1 -1
  1003. package/build/types/tracing/ai/utils.d.ts.map +1 -1
  1004. package/build/types/tracing/anthropic-ai/streaming.d.ts +1 -1
  1005. package/build/types/tracing/anthropic-ai/streaming.d.ts.map +1 -1
  1006. package/build/types/tracing/anthropic-ai/utils.d.ts +2 -2
  1007. package/build/types/tracing/anthropic-ai/utils.d.ts.map +1 -1
  1008. package/build/types/tracing/dynamicSamplingContext.d.ts +2 -2
  1009. package/build/types/tracing/dynamicSamplingContext.d.ts.map +1 -1
  1010. package/build/types/tracing/google-genai/streaming.d.ts +1 -1
  1011. package/build/types/tracing/google-genai/streaming.d.ts.map +1 -1
  1012. package/build/types/tracing/idleSpan.d.ts +2 -2
  1013. package/build/types/tracing/idleSpan.d.ts.map +1 -1
  1014. package/build/types/tracing/langchain/utils.d.ts +6 -1
  1015. package/build/types/tracing/langchain/utils.d.ts.map +1 -1
  1016. package/build/types/tracing/langgraph/index.d.ts.map +1 -1
  1017. package/build/types/tracing/langgraph/utils.d.ts +1 -3
  1018. package/build/types/tracing/langgraph/utils.d.ts.map +1 -1
  1019. package/build/types/tracing/logSpans.d.ts +1 -1
  1020. package/build/types/tracing/logSpans.d.ts.map +1 -1
  1021. package/build/types/tracing/measurement.d.ts +2 -2
  1022. package/build/types/tracing/measurement.d.ts.map +1 -1
  1023. package/build/types/tracing/openai/streaming.d.ts +1 -1
  1024. package/build/types/tracing/openai/streaming.d.ts.map +1 -1
  1025. package/build/types/tracing/openai/utils.d.ts +1 -1
  1026. package/build/types/tracing/openai/utils.d.ts.map +1 -1
  1027. package/build/types/tracing/sampling.d.ts +2 -2
  1028. package/build/types/tracing/sampling.d.ts.map +1 -1
  1029. package/build/types/tracing/sentryNonRecordingSpan.d.ts +3 -3
  1030. package/build/types/tracing/sentryNonRecordingSpan.d.ts.map +1 -1
  1031. package/build/types/tracing/sentrySpan.d.ts +4 -4
  1032. package/build/types/tracing/sentrySpan.d.ts.map +1 -1
  1033. package/build/types/tracing/spans/beforeSendSpan.d.ts +3 -3
  1034. package/build/types/tracing/spans/beforeSendSpan.d.ts.map +1 -1
  1035. package/build/types/tracing/spans/captureSpan.d.ts +1 -1
  1036. package/build/types/tracing/spans/captureSpan.d.ts.map +1 -1
  1037. package/build/types/tracing/spans/envelope.d.ts +2 -2
  1038. package/build/types/tracing/spans/envelope.d.ts.map +1 -1
  1039. package/build/types/tracing/spans/estimateSize.d.ts +1 -1
  1040. package/build/types/tracing/spans/estimateSize.d.ts.map +1 -1
  1041. package/build/types/tracing/spans/extractGenAiSpans.d.ts +2 -2
  1042. package/build/types/tracing/spans/extractGenAiSpans.d.ts.map +1 -1
  1043. package/build/types/tracing/spans/scopeContextAttributes.d.ts +9 -0
  1044. package/build/types/tracing/spans/scopeContextAttributes.d.ts.map +1 -0
  1045. package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts +1 -1
  1046. package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts.map +1 -1
  1047. package/build/types/tracing/spanstatus.d.ts +2 -2
  1048. package/build/types/tracing/spanstatus.d.ts.map +1 -1
  1049. package/build/types/tracing/trace.d.ts +2 -2
  1050. package/build/types/tracing/trace.d.ts.map +1 -1
  1051. package/build/types/tracing/utils.d.ts +1 -1
  1052. package/build/types/tracing/utils.d.ts.map +1 -1
  1053. package/build/types/tracing/vercel-ai/utils.d.ts +2 -2
  1054. package/build/types/tracing/vercel-ai/utils.d.ts.map +1 -1
  1055. package/build/types/transports/base.d.ts +1 -1
  1056. package/build/types/transports/base.d.ts.map +1 -1
  1057. package/build/types/transports/multiplexed.d.ts +3 -3
  1058. package/build/types/transports/multiplexed.d.ts.map +1 -1
  1059. package/build/types/transports/offline.d.ts +2 -2
  1060. package/build/types/transports/offline.d.ts.map +1 -1
  1061. package/build/types/transports/userAgent.d.ts +1 -1
  1062. package/build/types/transports/userAgent.d.ts.map +1 -1
  1063. package/build/types/trpc.d.ts.map +1 -1
  1064. package/build/types/types/attachment.d.ts.map +1 -0
  1065. package/build/types/types/breadcrumb.d.ts.map +1 -0
  1066. package/build/types/types/browseroptions.d.ts.map +1 -0
  1067. package/build/types/types/checkin.d.ts.map +1 -0
  1068. package/build/types/types/clientreport.d.ts.map +1 -0
  1069. package/build/types/types/context.d.ts.map +1 -0
  1070. package/build/types/types/csp.d.ts.map +1 -0
  1071. package/build/types/types/datacategory.d.ts.map +1 -0
  1072. package/build/types/types/datacollection.d.ts +75 -0
  1073. package/build/types/types/datacollection.d.ts.map +1 -0
  1074. package/build/types/types/debugMeta.d.ts.map +1 -0
  1075. package/build/types/types/dsn.d.ts.map +1 -0
  1076. package/build/types/types/envelope.d.ts.map +1 -0
  1077. package/build/types/types/error.d.ts.map +1 -0
  1078. package/build/types/types/event.d.ts.map +1 -0
  1079. package/build/types/types/eventprocessor.d.ts.map +1 -0
  1080. package/build/types/types/exception.d.ts.map +1 -0
  1081. package/build/types/types/extra.d.ts.map +1 -0
  1082. package/build/types/types/feedback/config.d.ts.map +1 -0
  1083. package/build/types/types/feedback/form.d.ts.map +1 -0
  1084. package/build/types/types/feedback/index.d.ts.map +1 -0
  1085. package/build/types/types/feedback/sendFeedback.d.ts.map +1 -0
  1086. package/build/types/types/feedback/theme.d.ts.map +1 -0
  1087. package/build/types/types/instrument.d.ts.map +1 -0
  1088. package/build/types/types/integration.d.ts.map +1 -0
  1089. package/build/types/types/link.d.ts.map +1 -0
  1090. package/build/types/types/log.d.ts.map +1 -0
  1091. package/build/types/types/measurement.d.ts.map +1 -0
  1092. package/build/types/types/mechanism.d.ts.map +1 -0
  1093. package/build/types/types/metric.d.ts.map +1 -0
  1094. package/build/types/types/misc.d.ts.map +1 -0
  1095. package/build/types/types/opentelemetry.d.ts.map +1 -0
  1096. package/build/types/{types-hoist → types}/options.d.ts +17 -0
  1097. package/build/types/types/options.d.ts.map +1 -0
  1098. package/build/types/types/package.d.ts.map +1 -0
  1099. package/build/types/types/parameterize.d.ts.map +1 -0
  1100. package/build/types/types/polymorphics.d.ts.map +1 -0
  1101. package/build/types/types/profiling.d.ts.map +1 -0
  1102. package/build/types/types/replay.d.ts.map +1 -0
  1103. package/build/types/types/request.d.ts.map +1 -0
  1104. package/build/types/types/runtime.d.ts.map +1 -0
  1105. package/build/types/{types-hoist → types}/samplingcontext.d.ts +1 -1
  1106. package/build/types/types/samplingcontext.d.ts.map +1 -0
  1107. package/build/types/types/sdkinfo.d.ts.map +1 -0
  1108. package/build/types/types/sdkmetadata.d.ts.map +1 -0
  1109. package/build/types/types/session.d.ts.map +1 -0
  1110. package/build/types/types/severity.d.ts.map +1 -0
  1111. package/build/types/types/span.d.ts.map +1 -0
  1112. package/build/types/types/spanStatus.d.ts.map +1 -0
  1113. package/build/types/types/stackframe.d.ts.map +1 -0
  1114. package/build/types/types/stacktrace.d.ts.map +1 -0
  1115. package/build/types/{types-hoist → types}/startSpanOptions.d.ts +13 -0
  1116. package/build/types/types/startSpanOptions.d.ts.map +1 -0
  1117. package/build/types/types/thread.d.ts.map +1 -0
  1118. package/build/types/types/timedEvent.d.ts.map +1 -0
  1119. package/build/types/types/tracing.d.ts.map +1 -0
  1120. package/build/types/types/transaction.d.ts.map +1 -0
  1121. package/build/types/types/transport.d.ts.map +1 -0
  1122. package/build/types/types/user.d.ts.map +1 -0
  1123. package/build/types/types/view-hierarchy.d.ts.map +1 -0
  1124. package/build/types/types/vue.d.ts.map +1 -0
  1125. package/build/types/types/webfetchapi.d.ts.map +1 -0
  1126. package/build/types/types/wrappedfunction.d.ts.map +1 -0
  1127. package/build/types/utils/aggregate-errors.d.ts +3 -3
  1128. package/build/types/utils/aggregate-errors.d.ts.map +1 -1
  1129. package/build/types/utils/anr.d.ts +1 -1
  1130. package/build/types/utils/anr.d.ts.map +1 -1
  1131. package/build/types/utils/baggage.d.ts +1 -1
  1132. package/build/types/utils/baggage.d.ts.map +1 -1
  1133. package/build/types/utils/breadcrumb-log-level.d.ts +1 -1
  1134. package/build/types/utils/breadcrumb-log-level.d.ts.map +1 -1
  1135. package/build/types/utils/clientreport.d.ts +2 -2
  1136. package/build/types/utils/clientreport.d.ts.map +1 -1
  1137. package/build/types/utils/data-collection/defaultPiiToCollectionOptions.d.ts +6 -0
  1138. package/build/types/utils/data-collection/defaultPiiToCollectionOptions.d.ts.map +1 -0
  1139. package/build/types/utils/data-collection/filterCookies.d.ts +9 -0
  1140. package/build/types/utils/data-collection/filterCookies.d.ts.map +1 -0
  1141. package/build/types/utils/data-collection/filterKeyValueData.d.ts +11 -0
  1142. package/build/types/utils/data-collection/filterKeyValueData.d.ts.map +1 -0
  1143. package/build/types/utils/data-collection/filterQueryParams.d.ts +9 -0
  1144. package/build/types/utils/data-collection/filterQueryParams.d.ts.map +1 -0
  1145. package/build/types/utils/data-collection/filtering-snippets.d.ts +14 -0
  1146. package/build/types/utils/data-collection/filtering-snippets.d.ts.map +1 -0
  1147. package/build/types/utils/data-collection/resolveDataCollectionOptions.d.ts +14 -0
  1148. package/build/types/utils/data-collection/resolveDataCollectionOptions.d.ts.map +1 -0
  1149. package/build/types/utils/debug-ids.d.ts +2 -2
  1150. package/build/types/utils/debug-ids.d.ts.map +1 -1
  1151. package/build/types/utils/debug-logger.d.ts +1 -1
  1152. package/build/types/utils/debug-logger.d.ts.map +1 -1
  1153. package/build/types/utils/dsn.d.ts +1 -1
  1154. package/build/types/utils/dsn.d.ts.map +1 -1
  1155. package/build/types/utils/env.d.ts.map +1 -1
  1156. package/build/types/utils/envelope.d.ts +8 -8
  1157. package/build/types/utils/envelope.d.ts.map +1 -1
  1158. package/build/types/utils/error.d.ts +1 -1
  1159. package/build/types/utils/error.d.ts.map +1 -1
  1160. package/build/types/utils/eventUtils.d.ts +1 -1
  1161. package/build/types/utils/eventUtils.d.ts.map +1 -1
  1162. package/build/types/utils/eventbuilder.d.ts +6 -6
  1163. package/build/types/utils/eventbuilder.d.ts.map +1 -1
  1164. package/build/types/utils/featureFlags.d.ts +1 -1
  1165. package/build/types/utils/featureFlags.d.ts.map +1 -1
  1166. package/build/types/utils/hasSpansEnabled.d.ts +1 -1
  1167. package/build/types/utils/hasSpansEnabled.d.ts.map +1 -1
  1168. package/build/types/utils/ipAddress.d.ts +2 -2
  1169. package/build/types/utils/ipAddress.d.ts.map +1 -1
  1170. package/build/types/utils/is.d.ts +4 -4
  1171. package/build/types/utils/is.d.ts.map +1 -1
  1172. package/build/types/utils/meta.d.ts +1 -1
  1173. package/build/types/utils/meta.d.ts.map +1 -1
  1174. package/build/types/utils/misc.d.ts +3 -3
  1175. package/build/types/utils/misc.d.ts.map +1 -1
  1176. package/build/types/utils/node-stack-trace.d.ts +1 -1
  1177. package/build/types/utils/node-stack-trace.d.ts.map +1 -1
  1178. package/build/types/utils/object.d.ts +1 -1
  1179. package/build/types/utils/object.d.ts.map +1 -1
  1180. package/build/types/utils/parameterize.d.ts +1 -1
  1181. package/build/types/utils/parameterize.d.ts.map +1 -1
  1182. package/build/types/utils/prepareEvent.d.ts +3 -3
  1183. package/build/types/utils/prepareEvent.d.ts.map +1 -1
  1184. package/build/types/utils/ratelimit.d.ts +2 -2
  1185. package/build/types/utils/ratelimit.d.ts.map +1 -1
  1186. package/build/types/utils/request.d.ts +3 -3
  1187. package/build/types/utils/request.d.ts.map +1 -1
  1188. package/build/types/utils/scopeData.d.ts +1 -1
  1189. package/build/types/utils/scopeData.d.ts.map +1 -1
  1190. package/build/types/utils/sdkMetadata.d.ts +1 -1
  1191. package/build/types/utils/sdkMetadata.d.ts.map +1 -1
  1192. package/build/types/utils/severity.d.ts +1 -1
  1193. package/build/types/utils/severity.d.ts.map +1 -1
  1194. package/build/types/utils/should-ignore-span.d.ts +2 -2
  1195. package/build/types/utils/should-ignore-span.d.ts.map +1 -1
  1196. package/build/types/utils/spanOnScope.d.ts +1 -1
  1197. package/build/types/utils/spanOnScope.d.ts.map +1 -1
  1198. package/build/types/utils/spanUtils.d.ts +4 -4
  1199. package/build/types/utils/spanUtils.d.ts.map +1 -1
  1200. package/build/types/utils/stacktrace.d.ts +4 -4
  1201. package/build/types/utils/stacktrace.d.ts.map +1 -1
  1202. package/build/types/utils/trace-info.d.ts +2 -2
  1203. package/build/types/utils/trace-info.d.ts.map +1 -1
  1204. package/build/types/utils/traceData.d.ts +2 -2
  1205. package/build/types/utils/traceData.d.ts.map +1 -1
  1206. package/build/types/utils/tracePropagationTargets.d.ts +1 -1
  1207. package/build/types/utils/tracePropagationTargets.d.ts.map +1 -1
  1208. package/build/types/utils/tracing.d.ts +2 -2
  1209. package/build/types/utils/tracing.d.ts.map +1 -1
  1210. package/build/types/utils/transactionEvent.d.ts +2 -2
  1211. package/build/types/utils/transactionEvent.d.ts.map +1 -1
  1212. package/build/types/utils/url.d.ts +1 -1
  1213. package/build/types/utils/url.d.ts.map +1 -1
  1214. package/build/types/utils/worldwide.d.ts +1 -0
  1215. package/build/types/utils/worldwide.d.ts.map +1 -1
  1216. package/build/types-ts3.8/api.d.ts +2 -2
  1217. package/build/types-ts3.8/attributes.d.ts +5 -8
  1218. package/build/types-ts3.8/breadcrumbs.d.ts +1 -1
  1219. package/build/types-ts3.8/browser-exports.d.ts +3 -3
  1220. package/build/types-ts3.8/carrier.d.ts +2 -2
  1221. package/build/types-ts3.8/checkin.d.ts +4 -4
  1222. package/build/types-ts3.8/client.d.ts +32 -22
  1223. package/build/types-ts3.8/currentScopes.d.ts +1 -1
  1224. package/build/types-ts3.8/envelope.d.ts +7 -7
  1225. package/build/types-ts3.8/eventProcessors.d.ts +2 -2
  1226. package/build/types-ts3.8/exports.d.ts +8 -8
  1227. package/build/types-ts3.8/feedback.d.ts +2 -2
  1228. package/build/types-ts3.8/fetch.d.ts +3 -3
  1229. package/build/types-ts3.8/instrument/console.d.ts +1 -1
  1230. package/build/types-ts3.8/instrument/fetch.d.ts +1 -1
  1231. package/build/types-ts3.8/instrument/globalError.d.ts +1 -1
  1232. package/build/types-ts3.8/instrument/globalUnhandledRejection.d.ts +1 -1
  1233. package/build/types-ts3.8/integration.d.ts +2 -2
  1234. package/build/types-ts3.8/integrations/consola.d.ts +1 -1
  1235. package/build/types-ts3.8/integrations/console.d.ts +1 -1
  1236. package/build/types-ts3.8/integrations/dedupe.d.ts +1 -1
  1237. package/build/types-ts3.8/integrations/express/types.d.ts +2 -2
  1238. package/build/types-ts3.8/integrations/express/utils.d.ts +1 -1
  1239. package/build/types-ts3.8/integrations/featureFlags/featureFlagsIntegration.d.ts +1 -1
  1240. package/build/types-ts3.8/integrations/featureFlags/growthbook.d.ts +1 -1
  1241. package/build/types-ts3.8/integrations/http/double-wrap-warning.d.ts +1 -1
  1242. package/build/types-ts3.8/integrations/http/get-outgoing-span-data.d.ts +2 -2
  1243. package/build/types-ts3.8/integrations/http/patch-request-to-capture-body.d.ts +12 -0
  1244. package/build/types-ts3.8/integrations/http/record-request-session.d.ts +18 -0
  1245. package/build/types-ts3.8/integrations/http/server-subscription.d.ts +26 -0
  1246. package/build/types-ts3.8/integrations/http/types.d.ts +12 -6
  1247. package/build/types-ts3.8/integrations/mcp-server/correlation.d.ts +1 -1
  1248. package/build/types-ts3.8/integrations/mcp-server/piiFiltering.d.ts +1 -1
  1249. package/build/types-ts3.8/integrations/mcp-server/types.d.ts +1 -1
  1250. package/build/types-ts3.8/integrations/postgresjs.d.ts +1 -1
  1251. package/build/types-ts3.8/integrations/rewriteframes.d.ts +1 -1
  1252. package/build/types-ts3.8/integrations/supabase.d.ts +14 -3
  1253. package/build/types-ts3.8/integrations/zoderrors.d.ts +1 -1
  1254. package/build/types-ts3.8/logs/console-integration.d.ts +1 -1
  1255. package/build/types-ts3.8/logs/constants.d.ts +1 -1
  1256. package/build/types-ts3.8/logs/envelope.d.ts +4 -4
  1257. package/build/types-ts3.8/logs/internal.d.ts +16 -1
  1258. package/build/types-ts3.8/logs/public-api.d.ts +2 -2
  1259. package/build/types-ts3.8/metadata.d.ts +2 -2
  1260. package/build/types-ts3.8/metrics/envelope.d.ts +4 -4
  1261. package/build/types-ts3.8/metrics/internal.d.ts +1 -1
  1262. package/build/types-ts3.8/metrics/public-api.d.ts +1 -1
  1263. package/build/types-ts3.8/profiling.d.ts +1 -1
  1264. package/build/types-ts3.8/report-dialog.d.ts +1 -1
  1265. package/build/types-ts3.8/scope.d.ts +14 -14
  1266. package/build/types-ts3.8/sdk.d.ts +1 -1
  1267. package/build/types-ts3.8/semanticAttributes.d.ts +6 -4
  1268. package/build/types-ts3.8/server-exports.d.ts +3 -1
  1269. package/build/types-ts3.8/server-runtime-client.d.ts +6 -6
  1270. package/build/types-ts3.8/session.d.ts +1 -1
  1271. package/build/types-ts3.8/shared-exports.d.ts +58 -53
  1272. package/build/types-ts3.8/tracing/ai/utils.d.ts +1 -1
  1273. package/build/types-ts3.8/tracing/anthropic-ai/streaming.d.ts +1 -1
  1274. package/build/types-ts3.8/tracing/anthropic-ai/utils.d.ts +2 -2
  1275. package/build/types-ts3.8/tracing/dynamicSamplingContext.d.ts +2 -2
  1276. package/build/types-ts3.8/tracing/google-genai/streaming.d.ts +1 -1
  1277. package/build/types-ts3.8/tracing/idleSpan.d.ts +2 -2
  1278. package/build/types-ts3.8/tracing/langchain/utils.d.ts +6 -1
  1279. package/build/types-ts3.8/tracing/langgraph/utils.d.ts +1 -3
  1280. package/build/types-ts3.8/tracing/logSpans.d.ts +1 -1
  1281. package/build/types-ts3.8/tracing/measurement.d.ts +2 -2
  1282. package/build/types-ts3.8/tracing/openai/streaming.d.ts +1 -1
  1283. package/build/types-ts3.8/tracing/openai/utils.d.ts +1 -1
  1284. package/build/types-ts3.8/tracing/sampling.d.ts +2 -2
  1285. package/build/types-ts3.8/tracing/sentryNonRecordingSpan.d.ts +3 -3
  1286. package/build/types-ts3.8/tracing/sentrySpan.d.ts +4 -4
  1287. package/build/types-ts3.8/tracing/spans/beforeSendSpan.d.ts +3 -3
  1288. package/build/types-ts3.8/tracing/spans/captureSpan.d.ts +1 -1
  1289. package/build/types-ts3.8/tracing/spans/envelope.d.ts +2 -2
  1290. package/build/types-ts3.8/tracing/spans/estimateSize.d.ts +1 -1
  1291. package/build/types-ts3.8/tracing/spans/extractGenAiSpans.d.ts +2 -2
  1292. package/build/types-ts3.8/tracing/spans/scopeContextAttributes.d.ts +9 -0
  1293. package/build/types-ts3.8/tracing/spans/spanJsonToStreamedSpan.d.ts +1 -1
  1294. package/build/types-ts3.8/tracing/spanstatus.d.ts +2 -2
  1295. package/build/types-ts3.8/tracing/trace.d.ts +2 -2
  1296. package/build/types-ts3.8/tracing/utils.d.ts +1 -1
  1297. package/build/types-ts3.8/tracing/vercel-ai/utils.d.ts +2 -2
  1298. package/build/types-ts3.8/transports/base.d.ts +1 -1
  1299. package/build/types-ts3.8/transports/multiplexed.d.ts +3 -3
  1300. package/build/types-ts3.8/transports/offline.d.ts +2 -2
  1301. package/build/types-ts3.8/transports/userAgent.d.ts +1 -1
  1302. package/build/types-ts3.8/types/datacollection.d.ts +75 -0
  1303. package/build/types-ts3.8/{types-hoist → types}/options.d.ts +17 -0
  1304. package/build/types-ts3.8/{types-hoist → types}/samplingcontext.d.ts +1 -1
  1305. package/build/types-ts3.8/{types-hoist → types}/startSpanOptions.d.ts +13 -0
  1306. package/build/types-ts3.8/utils/aggregate-errors.d.ts +3 -3
  1307. package/build/types-ts3.8/utils/anr.d.ts +1 -1
  1308. package/build/types-ts3.8/utils/baggage.d.ts +1 -1
  1309. package/build/types-ts3.8/utils/breadcrumb-log-level.d.ts +1 -1
  1310. package/build/types-ts3.8/utils/clientreport.d.ts +2 -2
  1311. package/build/types-ts3.8/utils/data-collection/defaultPiiToCollectionOptions.d.ts +6 -0
  1312. package/build/types-ts3.8/utils/data-collection/filterCookies.d.ts +9 -0
  1313. package/build/types-ts3.8/utils/data-collection/filterKeyValueData.d.ts +11 -0
  1314. package/build/types-ts3.8/utils/data-collection/filterQueryParams.d.ts +9 -0
  1315. package/build/types-ts3.8/utils/data-collection/filtering-snippets.d.ts +14 -0
  1316. package/build/types-ts3.8/utils/data-collection/resolveDataCollectionOptions.d.ts +14 -0
  1317. package/build/types-ts3.8/utils/debug-ids.d.ts +2 -2
  1318. package/build/types-ts3.8/utils/debug-logger.d.ts +1 -1
  1319. package/build/types-ts3.8/utils/dsn.d.ts +1 -1
  1320. package/build/types-ts3.8/utils/envelope.d.ts +8 -8
  1321. package/build/types-ts3.8/utils/error.d.ts +1 -1
  1322. package/build/types-ts3.8/utils/eventUtils.d.ts +1 -1
  1323. package/build/types-ts3.8/utils/eventbuilder.d.ts +6 -6
  1324. package/build/types-ts3.8/utils/featureFlags.d.ts +1 -1
  1325. package/build/types-ts3.8/utils/hasSpansEnabled.d.ts +1 -1
  1326. package/build/types-ts3.8/utils/ipAddress.d.ts +2 -2
  1327. package/build/types-ts3.8/utils/is.d.ts +4 -4
  1328. package/build/types-ts3.8/utils/meta.d.ts +1 -1
  1329. package/build/types-ts3.8/utils/misc.d.ts +3 -3
  1330. package/build/types-ts3.8/utils/node-stack-trace.d.ts +1 -1
  1331. package/build/types-ts3.8/utils/object.d.ts +1 -1
  1332. package/build/types-ts3.8/utils/parameterize.d.ts +1 -1
  1333. package/build/types-ts3.8/utils/prepareEvent.d.ts +3 -3
  1334. package/build/types-ts3.8/utils/ratelimit.d.ts +2 -2
  1335. package/build/types-ts3.8/utils/request.d.ts +3 -3
  1336. package/build/types-ts3.8/utils/scopeData.d.ts +1 -1
  1337. package/build/types-ts3.8/utils/sdkMetadata.d.ts +1 -1
  1338. package/build/types-ts3.8/utils/severity.d.ts +1 -1
  1339. package/build/types-ts3.8/utils/should-ignore-span.d.ts +2 -2
  1340. package/build/types-ts3.8/utils/spanOnScope.d.ts +1 -1
  1341. package/build/types-ts3.8/utils/spanUtils.d.ts +4 -4
  1342. package/build/types-ts3.8/utils/stacktrace.d.ts +4 -4
  1343. package/build/types-ts3.8/utils/trace-info.d.ts +2 -2
  1344. package/build/types-ts3.8/utils/traceData.d.ts +2 -2
  1345. package/build/types-ts3.8/utils/tracePropagationTargets.d.ts +1 -1
  1346. package/build/types-ts3.8/utils/tracing.d.ts +2 -2
  1347. package/build/types-ts3.8/utils/transactionEvent.d.ts +2 -2
  1348. package/build/types-ts3.8/utils/url.d.ts +1 -1
  1349. package/build/types-ts3.8/utils/worldwide.d.ts +1 -0
  1350. package/package.json +10 -2
  1351. package/server.d.ts +4 -0
  1352. package/build/types/types-hoist/attachment.d.ts.map +0 -1
  1353. package/build/types/types-hoist/breadcrumb.d.ts.map +0 -1
  1354. package/build/types/types-hoist/browseroptions.d.ts.map +0 -1
  1355. package/build/types/types-hoist/checkin.d.ts.map +0 -1
  1356. package/build/types/types-hoist/clientreport.d.ts.map +0 -1
  1357. package/build/types/types-hoist/context.d.ts.map +0 -1
  1358. package/build/types/types-hoist/csp.d.ts.map +0 -1
  1359. package/build/types/types-hoist/datacategory.d.ts.map +0 -1
  1360. package/build/types/types-hoist/debugMeta.d.ts.map +0 -1
  1361. package/build/types/types-hoist/dsn.d.ts.map +0 -1
  1362. package/build/types/types-hoist/envelope.d.ts.map +0 -1
  1363. package/build/types/types-hoist/error.d.ts.map +0 -1
  1364. package/build/types/types-hoist/event.d.ts.map +0 -1
  1365. package/build/types/types-hoist/eventprocessor.d.ts.map +0 -1
  1366. package/build/types/types-hoist/exception.d.ts.map +0 -1
  1367. package/build/types/types-hoist/extra.d.ts.map +0 -1
  1368. package/build/types/types-hoist/feedback/config.d.ts.map +0 -1
  1369. package/build/types/types-hoist/feedback/form.d.ts.map +0 -1
  1370. package/build/types/types-hoist/feedback/index.d.ts.map +0 -1
  1371. package/build/types/types-hoist/feedback/sendFeedback.d.ts.map +0 -1
  1372. package/build/types/types-hoist/feedback/theme.d.ts.map +0 -1
  1373. package/build/types/types-hoist/instrument.d.ts.map +0 -1
  1374. package/build/types/types-hoist/integration.d.ts.map +0 -1
  1375. package/build/types/types-hoist/link.d.ts.map +0 -1
  1376. package/build/types/types-hoist/log.d.ts.map +0 -1
  1377. package/build/types/types-hoist/measurement.d.ts.map +0 -1
  1378. package/build/types/types-hoist/mechanism.d.ts.map +0 -1
  1379. package/build/types/types-hoist/metric.d.ts.map +0 -1
  1380. package/build/types/types-hoist/misc.d.ts.map +0 -1
  1381. package/build/types/types-hoist/opentelemetry.d.ts.map +0 -1
  1382. package/build/types/types-hoist/options.d.ts.map +0 -1
  1383. package/build/types/types-hoist/package.d.ts.map +0 -1
  1384. package/build/types/types-hoist/parameterize.d.ts.map +0 -1
  1385. package/build/types/types-hoist/polymorphics.d.ts.map +0 -1
  1386. package/build/types/types-hoist/profiling.d.ts.map +0 -1
  1387. package/build/types/types-hoist/replay.d.ts.map +0 -1
  1388. package/build/types/types-hoist/request.d.ts.map +0 -1
  1389. package/build/types/types-hoist/runtime.d.ts.map +0 -1
  1390. package/build/types/types-hoist/samplingcontext.d.ts.map +0 -1
  1391. package/build/types/types-hoist/sdkinfo.d.ts.map +0 -1
  1392. package/build/types/types-hoist/sdkmetadata.d.ts.map +0 -1
  1393. package/build/types/types-hoist/session.d.ts.map +0 -1
  1394. package/build/types/types-hoist/severity.d.ts.map +0 -1
  1395. package/build/types/types-hoist/span.d.ts.map +0 -1
  1396. package/build/types/types-hoist/spanStatus.d.ts.map +0 -1
  1397. package/build/types/types-hoist/stackframe.d.ts.map +0 -1
  1398. package/build/types/types-hoist/stacktrace.d.ts.map +0 -1
  1399. package/build/types/types-hoist/startSpanOptions.d.ts.map +0 -1
  1400. package/build/types/types-hoist/thread.d.ts.map +0 -1
  1401. package/build/types/types-hoist/timedEvent.d.ts.map +0 -1
  1402. package/build/types/types-hoist/tracing.d.ts.map +0 -1
  1403. package/build/types/types-hoist/transaction.d.ts.map +0 -1
  1404. package/build/types/types-hoist/transport.d.ts.map +0 -1
  1405. package/build/types/types-hoist/user.d.ts.map +0 -1
  1406. package/build/types/types-hoist/view-hierarchy.d.ts.map +0 -1
  1407. package/build/types/types-hoist/vue.d.ts.map +0 -1
  1408. package/build/types/types-hoist/webfetchapi.d.ts.map +0 -1
  1409. package/build/types/types-hoist/wrappedfunction.d.ts.map +0 -1
  1410. /package/build/types/{types-hoist → types}/attachment.d.ts +0 -0
  1411. /package/build/types/{types-hoist → types}/breadcrumb.d.ts +0 -0
  1412. /package/build/types/{types-hoist → types}/browseroptions.d.ts +0 -0
  1413. /package/build/types/{types-hoist → types}/checkin.d.ts +0 -0
  1414. /package/build/types/{types-hoist → types}/clientreport.d.ts +0 -0
  1415. /package/build/types/{types-hoist → types}/context.d.ts +0 -0
  1416. /package/build/types/{types-hoist → types}/csp.d.ts +0 -0
  1417. /package/build/types/{types-hoist → types}/datacategory.d.ts +0 -0
  1418. /package/build/types/{types-hoist → types}/debugMeta.d.ts +0 -0
  1419. /package/build/types/{types-hoist → types}/dsn.d.ts +0 -0
  1420. /package/build/types/{types-hoist → types}/envelope.d.ts +0 -0
  1421. /package/build/types/{types-hoist → types}/error.d.ts +0 -0
  1422. /package/build/types/{types-hoist → types}/event.d.ts +0 -0
  1423. /package/build/types/{types-hoist → types}/eventprocessor.d.ts +0 -0
  1424. /package/build/types/{types-hoist → types}/exception.d.ts +0 -0
  1425. /package/build/types/{types-hoist → types}/extra.d.ts +0 -0
  1426. /package/build/types/{types-hoist → types}/feedback/config.d.ts +0 -0
  1427. /package/build/types/{types-hoist → types}/feedback/form.d.ts +0 -0
  1428. /package/build/types/{types-hoist → types}/feedback/index.d.ts +0 -0
  1429. /package/build/types/{types-hoist → types}/feedback/sendFeedback.d.ts +0 -0
  1430. /package/build/types/{types-hoist → types}/feedback/theme.d.ts +0 -0
  1431. /package/build/types/{types-hoist → types}/instrument.d.ts +0 -0
  1432. /package/build/types/{types-hoist → types}/integration.d.ts +0 -0
  1433. /package/build/types/{types-hoist → types}/link.d.ts +0 -0
  1434. /package/build/types/{types-hoist → types}/log.d.ts +0 -0
  1435. /package/build/types/{types-hoist → types}/measurement.d.ts +0 -0
  1436. /package/build/types/{types-hoist → types}/mechanism.d.ts +0 -0
  1437. /package/build/types/{types-hoist → types}/metric.d.ts +0 -0
  1438. /package/build/types/{types-hoist → types}/misc.d.ts +0 -0
  1439. /package/build/types/{types-hoist → types}/opentelemetry.d.ts +0 -0
  1440. /package/build/types/{types-hoist → types}/package.d.ts +0 -0
  1441. /package/build/types/{types-hoist → types}/parameterize.d.ts +0 -0
  1442. /package/build/types/{types-hoist → types}/polymorphics.d.ts +0 -0
  1443. /package/build/types/{types-hoist → types}/profiling.d.ts +0 -0
  1444. /package/build/types/{types-hoist → types}/replay.d.ts +0 -0
  1445. /package/build/types/{types-hoist → types}/request.d.ts +0 -0
  1446. /package/build/types/{types-hoist → types}/runtime.d.ts +0 -0
  1447. /package/build/types/{types-hoist → types}/sdkinfo.d.ts +0 -0
  1448. /package/build/types/{types-hoist → types}/sdkmetadata.d.ts +0 -0
  1449. /package/build/types/{types-hoist → types}/session.d.ts +0 -0
  1450. /package/build/types/{types-hoist → types}/severity.d.ts +0 -0
  1451. /package/build/types/{types-hoist → types}/span.d.ts +0 -0
  1452. /package/build/types/{types-hoist → types}/spanStatus.d.ts +0 -0
  1453. /package/build/types/{types-hoist → types}/stackframe.d.ts +0 -0
  1454. /package/build/types/{types-hoist → types}/stacktrace.d.ts +0 -0
  1455. /package/build/types/{types-hoist → types}/thread.d.ts +0 -0
  1456. /package/build/types/{types-hoist → types}/timedEvent.d.ts +0 -0
  1457. /package/build/types/{types-hoist → types}/tracing.d.ts +0 -0
  1458. /package/build/types/{types-hoist → types}/transaction.d.ts +0 -0
  1459. /package/build/types/{types-hoist → types}/transport.d.ts +0 -0
  1460. /package/build/types/{types-hoist → types}/user.d.ts +0 -0
  1461. /package/build/types/{types-hoist → types}/view-hierarchy.d.ts +0 -0
  1462. /package/build/types/{types-hoist → types}/vue.d.ts +0 -0
  1463. /package/build/types/{types-hoist → types}/webfetchapi.d.ts +0 -0
  1464. /package/build/types/{types-hoist → types}/wrappedfunction.d.ts +0 -0
  1465. /package/build/types-ts3.8/{types-hoist → types}/attachment.d.ts +0 -0
  1466. /package/build/types-ts3.8/{types-hoist → types}/breadcrumb.d.ts +0 -0
  1467. /package/build/types-ts3.8/{types-hoist → types}/browseroptions.d.ts +0 -0
  1468. /package/build/types-ts3.8/{types-hoist → types}/checkin.d.ts +0 -0
  1469. /package/build/types-ts3.8/{types-hoist → types}/clientreport.d.ts +0 -0
  1470. /package/build/types-ts3.8/{types-hoist → types}/context.d.ts +0 -0
  1471. /package/build/types-ts3.8/{types-hoist → types}/csp.d.ts +0 -0
  1472. /package/build/types-ts3.8/{types-hoist → types}/datacategory.d.ts +0 -0
  1473. /package/build/types-ts3.8/{types-hoist → types}/debugMeta.d.ts +0 -0
  1474. /package/build/types-ts3.8/{types-hoist → types}/dsn.d.ts +0 -0
  1475. /package/build/types-ts3.8/{types-hoist → types}/envelope.d.ts +0 -0
  1476. /package/build/types-ts3.8/{types-hoist → types}/error.d.ts +0 -0
  1477. /package/build/types-ts3.8/{types-hoist → types}/event.d.ts +0 -0
  1478. /package/build/types-ts3.8/{types-hoist → types}/eventprocessor.d.ts +0 -0
  1479. /package/build/types-ts3.8/{types-hoist → types}/exception.d.ts +0 -0
  1480. /package/build/types-ts3.8/{types-hoist → types}/extra.d.ts +0 -0
  1481. /package/build/types-ts3.8/{types-hoist → types}/feedback/config.d.ts +0 -0
  1482. /package/build/types-ts3.8/{types-hoist → types}/feedback/form.d.ts +0 -0
  1483. /package/build/types-ts3.8/{types-hoist → types}/feedback/index.d.ts +0 -0
  1484. /package/build/types-ts3.8/{types-hoist → types}/feedback/sendFeedback.d.ts +0 -0
  1485. /package/build/types-ts3.8/{types-hoist → types}/feedback/theme.d.ts +0 -0
  1486. /package/build/types-ts3.8/{types-hoist → types}/instrument.d.ts +0 -0
  1487. /package/build/types-ts3.8/{types-hoist → types}/integration.d.ts +0 -0
  1488. /package/build/types-ts3.8/{types-hoist → types}/link.d.ts +0 -0
  1489. /package/build/types-ts3.8/{types-hoist → types}/log.d.ts +0 -0
  1490. /package/build/types-ts3.8/{types-hoist → types}/measurement.d.ts +0 -0
  1491. /package/build/types-ts3.8/{types-hoist → types}/mechanism.d.ts +0 -0
  1492. /package/build/types-ts3.8/{types-hoist → types}/metric.d.ts +0 -0
  1493. /package/build/types-ts3.8/{types-hoist → types}/misc.d.ts +0 -0
  1494. /package/build/types-ts3.8/{types-hoist → types}/opentelemetry.d.ts +0 -0
  1495. /package/build/types-ts3.8/{types-hoist → types}/package.d.ts +0 -0
  1496. /package/build/types-ts3.8/{types-hoist → types}/parameterize.d.ts +0 -0
  1497. /package/build/types-ts3.8/{types-hoist → types}/polymorphics.d.ts +0 -0
  1498. /package/build/types-ts3.8/{types-hoist → types}/profiling.d.ts +0 -0
  1499. /package/build/types-ts3.8/{types-hoist → types}/replay.d.ts +0 -0
  1500. /package/build/types-ts3.8/{types-hoist → types}/request.d.ts +0 -0
  1501. /package/build/types-ts3.8/{types-hoist → types}/runtime.d.ts +0 -0
  1502. /package/build/types-ts3.8/{types-hoist → types}/sdkinfo.d.ts +0 -0
  1503. /package/build/types-ts3.8/{types-hoist → types}/sdkmetadata.d.ts +0 -0
  1504. /package/build/types-ts3.8/{types-hoist → types}/session.d.ts +0 -0
  1505. /package/build/types-ts3.8/{types-hoist → types}/severity.d.ts +0 -0
  1506. /package/build/types-ts3.8/{types-hoist → types}/span.d.ts +0 -0
  1507. /package/build/types-ts3.8/{types-hoist → types}/spanStatus.d.ts +0 -0
  1508. /package/build/types-ts3.8/{types-hoist → types}/stackframe.d.ts +0 -0
  1509. /package/build/types-ts3.8/{types-hoist → types}/stacktrace.d.ts +0 -0
  1510. /package/build/types-ts3.8/{types-hoist → types}/thread.d.ts +0 -0
  1511. /package/build/types-ts3.8/{types-hoist → types}/timedEvent.d.ts +0 -0
  1512. /package/build/types-ts3.8/{types-hoist → types}/tracing.d.ts +0 -0
  1513. /package/build/types-ts3.8/{types-hoist → types}/transaction.d.ts +0 -0
  1514. /package/build/types-ts3.8/{types-hoist → types}/transport.d.ts +0 -0
  1515. /package/build/types-ts3.8/{types-hoist → types}/user.d.ts +0 -0
  1516. /package/build/types-ts3.8/{types-hoist → types}/view-hierarchy.d.ts +0 -0
  1517. /package/build/types-ts3.8/{types-hoist → types}/vue.d.ts +0 -0
  1518. /package/build/types-ts3.8/{types-hoist → types}/webfetchapi.d.ts +0 -0
  1519. /package/build/types-ts3.8/{types-hoist → types}/wrappedfunction.d.ts +0 -0
@@ -30,149 +30,67 @@ const spanUtils = require('./utils/spanUtils.js');
30
30
  const syncpromise = require('./utils/syncpromise.js');
31
31
  const timer = require('./utils/timer.js');
32
32
  const transactionEvent = require('./utils/transactionEvent.js');
33
-
34
- /* eslint-disable max-lines */
33
+ const resolveDataCollectionOptions = require('./utils/data-collection/resolveDataCollectionOptions.js');
35
34
 
36
35
  const ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.";
37
- const MISSING_RELEASE_FOR_SESSION_ERROR = 'Discarded session because of missing or non-string release';
38
-
39
- const INTERNAL_ERROR_SYMBOL = Symbol.for('SentryInternalError');
40
- const DO_NOT_SEND_EVENT_SYMBOL = Symbol.for('SentryDoNotSendEventError');
41
-
42
- // Default interval for flushing logs and metrics (5 seconds)
43
- const DEFAULT_FLUSH_INTERVAL = 5000;
44
-
36
+ const MISSING_RELEASE_FOR_SESSION_ERROR = "Discarded session because of missing or non-string release";
37
+ const INTERNAL_ERROR_SYMBOL = /* @__PURE__ */ Symbol.for("SentryInternalError");
38
+ const DO_NOT_SEND_EVENT_SYMBOL = /* @__PURE__ */ Symbol.for("SentryDoNotSendEventError");
39
+ const DEFAULT_FLUSH_INTERVAL = 5e3;
45
40
  function _makeInternalError(message) {
46
41
  return {
47
42
  message,
48
- [INTERNAL_ERROR_SYMBOL]: true,
43
+ [INTERNAL_ERROR_SYMBOL]: true
49
44
  };
50
45
  }
51
-
52
46
  function _makeDoNotSendEventError(message) {
53
47
  return {
54
48
  message,
55
- [DO_NOT_SEND_EVENT_SYMBOL]: true,
49
+ [DO_NOT_SEND_EVENT_SYMBOL]: true
56
50
  };
57
51
  }
58
-
59
52
  function _isInternalError(error) {
60
- return !!error && typeof error === 'object' && INTERNAL_ERROR_SYMBOL in error;
53
+ return !!error && typeof error === "object" && INTERNAL_ERROR_SYMBOL in error;
61
54
  }
62
-
63
55
  function _isDoNotSendEventError(error) {
64
- return !!error && typeof error === 'object' && DO_NOT_SEND_EVENT_SYMBOL in error;
56
+ return !!error && typeof error === "object" && DO_NOT_SEND_EVENT_SYMBOL in error;
65
57
  }
66
-
67
- /**
68
- * Sets up weight-based flushing for logs or metrics.
69
- * This helper function encapsulates the common pattern of:
70
- * 1. Tracking accumulated weight of items
71
- * 2. Flushing when weight exceeds threshold (800KB)
72
- * 3. Flushing after timeout period from the first item
73
- *
74
- * Uses closure variables to track weight and timeout state.
75
- */
76
- function setupWeightBasedFlushing
77
-
78
- (
79
- client,
80
- afterCaptureHook,
81
- flushHook,
82
- estimateSizeFn,
83
- flushFn,
84
- ) {
85
- // Track weight and timeout in closure variables
58
+ function setupWeightBasedFlushing(client, afterCaptureHook, flushHook, estimateSizeFn, flushFn) {
86
59
  let weight = 0;
87
60
  let flushTimeout;
88
61
  let isTimerActive = false;
89
-
90
- // @ts-expect-error - TypeScript can't narrow generic hook types to match specific overloads, but we know this is type-safe
91
62
  client.on(flushHook, () => {
92
63
  weight = 0;
93
64
  clearTimeout(flushTimeout);
94
65
  isTimerActive = false;
95
66
  });
96
-
97
- // @ts-expect-error - TypeScript can't narrow generic hook types to match specific overloads, but we know this is type-safe
98
67
  client.on(afterCaptureHook, (item) => {
99
68
  weight += estimateSizeFn(item);
100
-
101
- // We flush the buffer if it exceeds 0.8 MB
102
- // The weight is a rough estimate, so we flush way before the payload gets too big.
103
- if (weight >= 800000) {
69
+ if (weight >= 8e5) {
104
70
  flushFn(client);
105
71
  } else if (!isTimerActive) {
106
- // Only start timer if one isn't already running.
107
- // This prevents flushing being delayed by items that arrive close to the timeout limit
108
- // and thus resetting the flushing timeout and delaying items being flushed.
109
- isTimerActive = true;
110
- // Use safeUnref so the timer doesn't prevent the process from exiting
111
- flushTimeout = timer.safeUnref(
112
- setTimeout(() => {
113
- flushFn(client);
114
- // Note: isTimerActive is reset by the flushHook handler above, not here,
115
- // to avoid race conditions when new items arrive during the flush.
116
- }, DEFAULT_FLUSH_INTERVAL),
117
- );
72
+ const flushInterval = client.getOptions()._flushInterval ?? DEFAULT_FLUSH_INTERVAL;
73
+ if (flushInterval > 0) {
74
+ isTimerActive = true;
75
+ flushTimeout = timer.safeUnref(
76
+ setTimeout(() => {
77
+ flushFn(client);
78
+ }, flushInterval)
79
+ );
80
+ }
118
81
  }
119
82
  });
120
-
121
- client.on('flush', () => {
83
+ client.on("flush", () => {
122
84
  flushFn(client);
123
85
  });
124
86
  }
125
-
126
- /**
127
- * Base implementation for all JavaScript SDK clients.
128
- *
129
- * Call the constructor with the corresponding options
130
- * specific to the client subclass. To access these options later, use
131
- * {@link Client.getOptions}.
132
- *
133
- * If a Dsn is specified in the options, it will be parsed and stored. Use
134
- * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is
135
- * invalid, the constructor will throw a {@link SentryException}. Note that
136
- * without a valid Dsn, the SDK will not send any events to Sentry.
137
- *
138
- * Before sending an event, it is passed through
139
- * {@link Client._prepareEvent} to add SDK information and scope data
140
- * (breadcrumbs and context). To add more custom information, override this
141
- * method and extend the resulting prepared event.
142
- *
143
- * To issue automatically created events (e.g. via instrumentation), use
144
- * {@link Client.captureEvent}. It will prepare the event and pass it through
145
- * the callback lifecycle. To issue auto-breadcrumbs, use
146
- * {@link Client.addBreadcrumb}.
147
- *
148
- * @example
149
- * class NodeClient extends Client<NodeOptions> {
150
- * public constructor(options: NodeOptions) {
151
- * super(options);
152
- * }
153
- *
154
- * // ...
155
- * }
156
- */
157
87
  class Client {
158
- /** Options passed to the SDK. */
159
-
160
- /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */
161
-
162
- /** Array of set up integrations. */
163
-
164
- /** Number of calls being processed */
165
-
166
- /** Holds flushable */
167
-
168
- // eslint-disable-next-line @typescript-eslint/ban-types
169
-
170
88
  /**
171
89
  * Initializes this client instance.
172
90
  *
173
91
  * @param options Options for the client.
174
92
  */
175
- constructor(options) {
93
+ constructor(options) {
176
94
  this._options = options;
177
95
  this._integrations = {};
178
96
  this._numProcessing = 0;
@@ -180,194 +98,144 @@ class Client {
180
98
  this._hooks = {};
181
99
  this._eventProcessors = [];
182
100
  this._promiseBuffer = promisebuffer.makePromiseBuffer(options.transportOptions?.bufferSize ?? base.DEFAULT_TRANSPORT_BUFFER_SIZE);
183
-
101
+ this._dataCollection = resolveDataCollectionOptions.resolveDataCollectionOptions(options);
184
102
  if (options.dsn) {
185
103
  this._dsn = dsn.makeDsn(options.dsn);
186
104
  } else {
187
- debugBuild.DEBUG_BUILD && debugLogger.debug.warn('No DSN provided, client will not send events.');
105
+ debugBuild.DEBUG_BUILD && debugLogger.debug.warn("No DSN provided, client will not send events.");
188
106
  }
189
-
190
107
  if (this._dsn) {
191
108
  const url = api.getEnvelopeEndpointWithUrlEncodedAuth(
192
109
  this._dsn,
193
110
  options.tunnel,
194
- options._metadata ? options._metadata.sdk : undefined,
111
+ options._metadata ? options._metadata.sdk : void 0
195
112
  );
196
113
  this._transport = options.transport({
197
114
  tunnel: this._options.tunnel,
198
115
  recordDroppedEvent: this.recordDroppedEvent.bind(this),
199
116
  ...options.transportOptions,
200
- url,
117
+ url
201
118
  });
202
119
  }
203
-
204
- // Backfill enableLogs option from _experiments.enableLogs
205
- // TODO(v11): Remove or change default value
206
- // eslint-disable-next-line deprecation/deprecation
207
120
  this._options.enableLogs = this._options.enableLogs ?? this._options._experiments?.enableLogs;
208
-
209
- // Setup log flushing with weight and timeout tracking
210
121
  if (this._options.enableLogs) {
211
- setupWeightBasedFlushing(this, 'afterCaptureLog', 'flushLogs', estimateLogSizeInBytes, internal._INTERNAL_flushLogsBuffer);
122
+ setupWeightBasedFlushing(this, "afterCaptureLog", "flushLogs", estimateLogSizeInBytes, internal._INTERNAL_flushLogsBuffer);
212
123
  }
213
-
214
- // todo(v11): Remove the experimental flag
215
- // eslint-disable-next-line deprecation/deprecation
216
124
  const enableMetrics = this._options.enableMetrics ?? this._options._experiments?.enableMetrics ?? true;
217
-
218
- // Setup metric flushing with weight and timeout tracking
219
125
  if (enableMetrics) {
220
126
  setupWeightBasedFlushing(
221
127
  this,
222
- 'afterCaptureMetric',
223
- 'flushMetrics',
128
+ "afterCaptureMetric",
129
+ "flushMetrics",
224
130
  estimateMetricSizeInBytes,
225
- internal$1._INTERNAL_flushMetricsBuffer,
131
+ internal$1._INTERNAL_flushMetricsBuffer
226
132
  );
227
133
  }
228
134
  }
229
-
230
135
  /**
231
136
  * Captures an exception event and sends it to Sentry.
232
137
  *
233
138
  * Unlike `captureException` exported from every SDK, this method requires that you pass it the current scope.
234
139
  */
235
- captureException(exception, hint, scope) {
140
+ captureException(exception, hint, scope) {
236
141
  const eventId = misc.uuid4();
237
-
238
- // ensure we haven't captured this very object before
239
142
  if (misc.checkOrSetAlreadyCaught(exception)) {
240
143
  debugBuild.DEBUG_BUILD && debugLogger.debug.log(ALREADY_SEEN_ERROR);
241
144
  return eventId;
242
145
  }
243
-
244
146
  const hintWithEventId = {
245
147
  event_id: eventId,
246
- ...hint,
148
+ ...hint
247
149
  };
248
-
249
150
  this._process(
250
- () =>
251
- this.eventFromException(exception, hintWithEventId)
252
- .then(event => this._captureEvent(event, hintWithEventId, scope))
253
- .then(res => res),
254
- 'error',
151
+ () => this.eventFromException(exception, hintWithEventId).then((event) => this._captureEvent(event, hintWithEventId, scope)).then((res) => res),
152
+ "error"
255
153
  );
256
-
257
154
  return hintWithEventId.event_id;
258
155
  }
259
-
260
156
  /**
261
157
  * Captures a message event and sends it to Sentry.
262
158
  *
263
159
  * Unlike `captureMessage` exported from every SDK, this method requires that you pass it the current scope.
264
160
  */
265
- captureMessage(
266
- message,
267
- level,
268
- hint,
269
- currentScope,
270
- ) {
161
+ captureMessage(message, level, hint, currentScope) {
271
162
  const hintWithEventId = {
272
163
  event_id: misc.uuid4(),
273
- ...hint,
164
+ ...hint
274
165
  };
275
-
276
166
  const eventMessage = is.isParameterizedString(message) ? message : String(message);
277
167
  const isMessage = is.isPrimitive(message);
278
- const promisedEvent = isMessage
279
- ? this.eventFromMessage(eventMessage, level, hintWithEventId)
280
- : this.eventFromException(message, hintWithEventId);
281
-
168
+ const promisedEvent = isMessage ? this.eventFromMessage(eventMessage, level, hintWithEventId) : this.eventFromException(message, hintWithEventId);
282
169
  this._process(
283
- () => promisedEvent.then(event => this._captureEvent(event, hintWithEventId, currentScope)),
284
- isMessage ? 'unknown' : 'error',
170
+ () => promisedEvent.then((event) => this._captureEvent(event, hintWithEventId, currentScope)),
171
+ isMessage ? "unknown" : "error"
285
172
  );
286
-
287
173
  return hintWithEventId.event_id;
288
174
  }
289
-
290
175
  /**
291
176
  * Captures a manually created event and sends it to Sentry.
292
177
  *
293
178
  * Unlike `captureEvent` exported from every SDK, this method requires that you pass it the current scope.
294
179
  */
295
- captureEvent(event, hint, currentScope) {
180
+ captureEvent(event, hint, currentScope) {
296
181
  const eventId = misc.uuid4();
297
-
298
- // ensure we haven't captured this very object before
299
182
  if (hint?.originalException && misc.checkOrSetAlreadyCaught(hint.originalException)) {
300
183
  debugBuild.DEBUG_BUILD && debugLogger.debug.log(ALREADY_SEEN_ERROR);
301
184
  return eventId;
302
185
  }
303
-
304
186
  const hintWithEventId = {
305
187
  event_id: eventId,
306
- ...hint,
188
+ ...hint
307
189
  };
308
-
309
190
  const sdkProcessingMetadata = event.sdkProcessingMetadata || {};
310
191
  const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope;
311
192
  const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope;
312
193
  const dataCategory = getDataCategoryByType(event.type);
313
-
314
194
  this._process(
315
195
  () => this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope, capturedSpanIsolationScope),
316
- dataCategory,
196
+ dataCategory
317
197
  );
318
-
319
198
  return hintWithEventId.event_id;
320
199
  }
321
-
322
200
  /**
323
201
  * Captures a session.
324
202
  */
325
- captureSession(session$1) {
203
+ captureSession(session$1) {
326
204
  this.sendSession(session$1);
327
- // After sending, we set init false to indicate it's not the first occurrence
328
205
  session.updateSession(session$1, { init: false });
329
206
  }
330
-
331
- /**
332
- * Create a cron monitor check in and send it to Sentry. This method is not available on all clients.
333
- *
334
- * @param checkIn An object that describes a check in.
335
- * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want
336
- * to create a monitor automatically when sending a check in.
337
- * @param scope An optional scope containing event metadata.
338
- * @returns A string representing the id of the check in.
339
- */
340
-
341
207
  /**
342
208
  * Get the current Dsn.
343
209
  */
344
- getDsn() {
210
+ getDsn() {
345
211
  return this._dsn;
346
212
  }
347
-
348
213
  /**
349
214
  * Get the current options.
350
215
  */
351
- getOptions() {
216
+ getOptions() {
352
217
  return this._options;
353
218
  }
354
-
219
+ /**
220
+ * Get the resolved data collection configuration.
221
+ */
222
+ getDataCollectionOptions() {
223
+ return this._dataCollection;
224
+ }
355
225
  /**
356
226
  * Get the SDK metadata.
357
227
  * @see SdkMetadata
358
228
  */
359
- getSdkMetadata() {
229
+ getSdkMetadata() {
360
230
  return this._options._metadata;
361
231
  }
362
-
363
232
  /**
364
233
  * Returns the transport that is used by the client.
365
234
  * Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.
366
235
  */
367
- getTransport() {
236
+ getTransport() {
368
237
  return this._transport;
369
238
  }
370
-
371
239
  /**
372
240
  * Wait for all events to be sent or the timeout to expire, whichever comes first.
373
241
  *
@@ -377,24 +245,16 @@ class Client {
377
245
  * still events in the queue when the timeout is reached.
378
246
  */
379
247
  // @ts-expect-error - PromiseLike is a subset of Promise
380
- async flush(timeout) {
248
+ async flush(timeout) {
381
249
  const transport = this._transport;
382
-
383
- // Emit `flush` unconditionally so weight-based log/metric flushers drain
384
- // their buffers and clear their idle timers, even when no transport is
385
- // configured (e.g. no DSN).
386
- this.emit('flush');
387
-
250
+ this.emit("flush");
388
251
  if (!transport) {
389
252
  return true;
390
253
  }
391
-
392
254
  const clientFinished = await this._isClientDoneProcessing(timeout);
393
255
  const transportFlushed = await transport.flush(timeout);
394
-
395
256
  return clientFinished && transportFlushed;
396
257
  }
397
-
398
258
  /**
399
259
  * Flush the event queue and set the client to `enabled = false`. See {@link Client.flush}.
400
260
  *
@@ -404,55 +264,53 @@ class Client {
404
264
  * it doesn't.
405
265
  */
406
266
  // @ts-expect-error - PromiseLike is a subset of Promise
407
- async close(timeout) {
267
+ async close(timeout) {
408
268
  internal._INTERNAL_flushLogsBuffer(this);
409
269
  const result = await this.flush(timeout);
410
270
  this.getOptions().enabled = false;
411
- this.emit('close');
271
+ this.emit("close");
412
272
  return result;
413
273
  }
414
-
415
274
  /**
416
275
  * Get all installed event processors.
417
276
  */
418
- getEventProcessors() {
277
+ getEventProcessors() {
419
278
  return this._eventProcessors;
420
279
  }
421
-
422
280
  /**
423
281
  * Adds an event processor that applies to any event processed by this client.
424
282
  */
425
- addEventProcessor(eventProcessor) {
283
+ addEventProcessor(eventProcessor) {
426
284
  this._eventProcessors.push(eventProcessor);
427
285
  }
428
-
429
286
  /**
430
287
  * Initialize this client.
431
288
  * Call this after the client was set on a scope.
432
289
  */
433
- init() {
434
- if (
435
- this._isEnabled() ||
436
- // Force integrations to be setup even if no DSN was set when we have
437
- // Spotlight enabled. This is particularly important for browser as we
438
- // don't support the `spotlight` option there and rely on the users
439
- // adding the `spotlightBrowserIntegration()` to their integrations which
440
- // wouldn't get initialized with the check below when there's no DSN set.
441
- this._options.integrations.some(({ name }) => name.startsWith('Spotlight'))
442
- ) {
290
+ init() {
291
+ if (this._isEnabled() || // Force integrations to be setup even if no DSN was set when we have
292
+ // Spotlight enabled. This is particularly important for browser as we
293
+ // don't support the `spotlight` option there and rely on the users
294
+ // adding the `spotlightBrowserIntegration()` to their integrations which
295
+ // wouldn't get initialized with the check below when there's no DSN set.
296
+ this._options.integrations.some(({ name }) => name.startsWith("Spotlight"))) {
443
297
  this._setupIntegrations();
444
298
  }
445
299
  }
446
-
447
300
  /**
448
301
  * Gets an installed integration by its name.
449
302
  *
450
303
  * @returns {Integration|undefined} The installed integration or `undefined` if no integration with that `name` was installed.
451
304
  */
452
- getIntegrationByName(integrationName) {
453
- return this._integrations[integrationName] ;
305
+ getIntegrationByName(integrationName) {
306
+ return this._integrations[integrationName];
307
+ }
308
+ /**
309
+ * Returns the names of all installed integrations.
310
+ */
311
+ getIntegrationNames() {
312
+ return Object.keys(this._integrations);
454
313
  }
455
-
456
314
  /**
457
315
  * Add an integration to the client.
458
316
  * This can be used to e.g. lazy load integrations.
@@ -460,53 +318,37 @@ class Client {
460
318
  * and you're better off just passing the integrations via `integrations: []` at initialization time.
461
319
  * However, if you find the need to conditionally load & add an integration, you can use `addIntegration` to do so.
462
320
  */
463
- addIntegration(integration$1) {
321
+ addIntegration(integration$1) {
464
322
  const isAlreadyInstalled = this._integrations[integration$1.name];
465
-
466
323
  if (!isAlreadyInstalled && integration$1.beforeSetup) {
467
324
  integration$1.beforeSetup(this);
468
325
  }
469
-
470
- // This hook takes care of only installing if not already installed
471
326
  integration.setupIntegration(this, integration$1, this._integrations);
472
- // Here we need to check manually to make sure to not run this multiple times
473
327
  if (!isAlreadyInstalled) {
474
328
  integration.afterSetupIntegrations(this, [integration$1]);
475
329
  }
476
330
  }
477
-
478
331
  /**
479
332
  * Send a fully prepared event to Sentry.
480
333
  */
481
- sendEvent(event, hint = {}) {
482
- this.emit('beforeSendEvent', event, hint);
483
-
484
- // Extract gen_ai spans from transaction and convert to span v2 format.
485
- // This mutates event.spans to remove the extracted spans.
334
+ sendEvent(event, hint = {}) {
335
+ this.emit("beforeSendEvent", event, hint);
486
336
  const genAiSpanItem = extractGenAiSpans.extractGenAiSpansFromEvent(event, this);
487
-
488
337
  let env = envelope.createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);
489
-
490
338
  for (const attachment of hint.attachments || []) {
491
339
  env = envelope$1.addItemToEnvelope(env, envelope$1.createAttachmentEnvelopeItem(attachment));
492
340
  }
493
-
494
341
  if (genAiSpanItem) {
495
342
  env = envelope$1.addItemToEnvelope(env, genAiSpanItem);
496
343
  }
497
-
498
- // sendEnvelope should not throw
499
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
500
- this.sendEnvelope(env).then(sendResponse => this.emit('afterSendEvent', event, sendResponse));
344
+ this.sendEnvelope(env).then((sendResponse) => this.emit("afterSendEvent", event, sendResponse));
501
345
  }
502
-
503
346
  /**
504
347
  * Send a session or session aggregrates to Sentry.
505
348
  */
506
- sendSession(session) {
507
- // Backfill release and environment on session
349
+ sendSession(session) {
508
350
  const { release: clientReleaseOption, environment: clientEnvironmentOption = constants.DEFAULT_ENVIRONMENT } = this._options;
509
- if ('aggregates' in session) {
351
+ if ("aggregates" in session) {
510
352
  const sessionAttrs = session.attrs || {};
511
353
  if (!sessionAttrs.release && !clientReleaseOption) {
512
354
  debugBuild.DEBUG_BUILD && debugLogger.debug.warn(MISSING_RELEASE_FOR_SESSION_ERROR);
@@ -523,96 +365,57 @@ class Client {
523
365
  session.release = session.release || clientReleaseOption;
524
366
  session.environment = session.environment || clientEnvironmentOption;
525
367
  }
526
-
527
- this.emit('beforeSendSession', session);
528
-
368
+ this.emit("beforeSendSession", session);
529
369
  const env = envelope.createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);
530
-
531
- // sendEnvelope should not throw
532
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
533
370
  this.sendEnvelope(env);
534
371
  }
535
-
536
372
  /**
537
373
  * Record on the client that an event got dropped (ie, an event that will not be sent to Sentry).
538
374
  */
539
- recordDroppedEvent(reason, category, count = 1) {
375
+ recordDroppedEvent(reason, category, count = 1) {
540
376
  if (this._options.sendClientReports) {
541
- // We want to track each category (error, transaction, session, replay_event) separately
542
- // but still keep the distinction between different type of outcomes.
543
- // We could use nested maps, but it's much easier to read and type this way.
544
- // A correct type for map-based implementation if we want to go that route
545
- // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`
546
- // With typescript 4.1 we could even use template literal types
547
377
  const key = `${reason}:${category}`;
548
- debugBuild.DEBUG_BUILD && debugLogger.debug.log(`Recording outcome: "${key}"${count > 1 ? ` (${count} times)` : ''}`);
378
+ debugBuild.DEBUG_BUILD && debugLogger.debug.log(`Recording outcome: "${key}"${count > 1 ? ` (${count} times)` : ""}`);
549
379
  this._outcomes[key] = (this._outcomes[key] || 0) + count;
550
380
  }
551
381
  }
552
-
553
- /* eslint-disable @typescript-eslint/unified-signatures */
554
- /**
555
- * Register a callback for whenever a span is started.
556
- * Receives the span as argument.
557
- * @returns {() => void} A function that, when executed, removes the registered callback.
558
- */
559
-
560
382
  /**
561
383
  * Register a hook on this client.
562
384
  */
563
- on(hook, callback) {
564
- const hookCallbacks = (this._hooks[hook] = this._hooks[hook] || new Set());
565
-
566
- // Wrap the callback in a function so that registering the same callback instance multiple
567
- // times results in the callback being called multiple times.
568
- // @ts-expect-error - The `callback` type is correct and must be a function due to the
569
- // individual, specific overloads of this function.
570
- // eslint-disable-next-line @typescript-eslint/ban-types
385
+ on(hook, callback) {
386
+ const hookCallbacks = this._hooks[hook] = this._hooks[hook] || /* @__PURE__ */ new Set();
571
387
  const uniqueCallback = (...args) => callback(...args);
572
-
573
388
  hookCallbacks.add(uniqueCallback);
574
-
575
- // This function returns a callback execution handler that, when invoked,
576
- // deregisters a callback. This is crucial for managing instances where callbacks
577
- // need to be unregistered to prevent self-referencing in callback closures,
578
- // ensuring proper garbage collection.
579
389
  return () => {
580
390
  hookCallbacks.delete(uniqueCallback);
581
391
  };
582
392
  }
583
-
584
- /** Fire a hook whenever a span starts. */
585
-
586
393
  /**
587
394
  * Emit a hook that was previously registered via `on()`.
588
395
  */
589
- emit(hook, ...rest) {
396
+ emit(hook, ...rest) {
590
397
  const callbacks = this._hooks[hook];
591
398
  if (callbacks) {
592
- callbacks.forEach(callback => callback(...rest));
399
+ callbacks.forEach((callback) => callback(...rest));
593
400
  }
594
401
  }
595
-
596
402
  /**
597
403
  * Send an envelope to Sentry.
598
404
  */
599
405
  // @ts-expect-error - PromiseLike is a subset of Promise
600
- async sendEnvelope(envelope) {
601
- this.emit('beforeEnvelope', envelope);
602
-
406
+ async sendEnvelope(envelope) {
407
+ this.emit("beforeEnvelope", envelope);
603
408
  if (this._isEnabled() && this._transport) {
604
409
  try {
605
410
  return await this._transport.send(envelope);
606
411
  } catch (reason) {
607
- debugBuild.DEBUG_BUILD && debugLogger.debug.error('Error while sending envelope:', reason);
412
+ debugBuild.DEBUG_BUILD && debugLogger.debug.error("Error while sending envelope:", reason);
608
413
  return {};
609
414
  }
610
415
  }
611
-
612
- debugBuild.DEBUG_BUILD && debugLogger.debug.error('Transport disabled');
416
+ debugBuild.DEBUG_BUILD && debugLogger.debug.error("Transport disabled");
613
417
  return {};
614
418
  }
615
-
616
419
  /**
617
420
  * Register a cleanup function to be called when the client is disposed.
618
421
  * This is useful for integrations that need to clean up global state.
@@ -621,10 +424,8 @@ class Client {
621
424
  * override this method to actually register and execute cleanup callbacks.
622
425
  */
623
426
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
624
- registerCleanup(callback) {
625
- // No-op in base class - subclasses override to implement cleanup registration
427
+ registerCleanup(callback) {
626
428
  }
627
-
628
429
  /**
629
430
  * Disposes of the client and releases all resources.
630
431
  *
@@ -634,31 +435,23 @@ class Client {
634
435
  *
635
436
  * After calling dispose(), the client should not be used anymore.
636
437
  */
637
- dispose() {
638
- // Base class has no cleanup logic - subclasses implement their own
438
+ dispose() {
639
439
  }
640
-
641
440
  /* eslint-enable @typescript-eslint/unified-signatures */
642
-
643
441
  /** Setup integrations for this client. */
644
- _setupIntegrations() {
442
+ _setupIntegrations() {
645
443
  const { integrations } = this._options;
646
444
  this._integrations = integration.setupIntegrations(this, integrations);
647
445
  integration.afterSetupIntegrations(this, integrations);
648
446
  }
649
-
650
447
  /** Updates existing session based on the provided event */
651
- _updateSessionFromEvent(session$1, event) {
652
- // initially, set `crashed` based on the event level and update from exceptions if there are any later on
653
- let crashed = event.level === 'fatal';
448
+ _updateSessionFromEvent(session$1, event) {
449
+ let crashed = event.level === "fatal";
654
450
  let errored = false;
655
451
  const exceptions = event.exception?.values;
656
-
657
452
  if (exceptions) {
658
453
  errored = true;
659
- // reset crashed to false if there are exceptions, to ensure `mechanism.handled` is respected.
660
454
  crashed = false;
661
-
662
455
  for (const ex of exceptions) {
663
456
  if (ex.mechanism?.handled === false) {
664
457
  crashed = true;
@@ -666,22 +459,16 @@ class Client {
666
459
  }
667
460
  }
668
461
  }
669
-
670
- // A session is updated and that session update is sent in only one of the two following scenarios:
671
- // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update
672
- // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update
673
- const sessionNonTerminal = session$1.status === 'ok';
674
- const shouldUpdateAndSend = (sessionNonTerminal && session$1.errors === 0) || (sessionNonTerminal && crashed);
675
-
462
+ const sessionNonTerminal = session$1.status === "ok";
463
+ const shouldUpdateAndSend = sessionNonTerminal && session$1.errors === 0 || sessionNonTerminal && crashed;
676
464
  if (shouldUpdateAndSend) {
677
465
  session.updateSession(session$1, {
678
- ...(crashed && { status: 'crashed' }),
679
- errors: session$1.errors || Number(errored || crashed),
466
+ ...crashed && { status: "crashed" },
467
+ errors: session$1.errors || Number(errored || crashed)
680
468
  });
681
469
  this.captureSession(session$1);
682
470
  }
683
471
  }
684
-
685
472
  /**
686
473
  * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying
687
474
  * "no" (resolving to `false`) in order to give the client a chance to potentially finish first.
@@ -692,26 +479,21 @@ class Client {
692
479
  * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and
693
480
  * `false` otherwise
694
481
  */
695
- async _isClientDoneProcessing(timeout) {
482
+ async _isClientDoneProcessing(timeout) {
696
483
  let ticked = 0;
697
-
698
484
  while (!timeout || ticked < timeout) {
699
- await new Promise(resolve => setTimeout(resolve, 1));
700
-
485
+ await new Promise((resolve) => setTimeout(resolve, 1));
701
486
  if (!this._numProcessing) {
702
487
  return true;
703
488
  }
704
489
  ticked++;
705
490
  }
706
-
707
491
  return false;
708
492
  }
709
-
710
493
  /** Determines whether this SDK is enabled and a transport is present. */
711
- _isEnabled() {
712
- return this.getOptions().enabled !== false && this._transport !== undefined;
494
+ _isEnabled() {
495
+ return this.getOptions().enabled !== false && this._transport !== void 0;
713
496
  }
714
-
715
497
  /**
716
498
  * Adds common information to events.
717
499
  *
@@ -726,68 +508,48 @@ class Client {
726
508
  * @param currentScope A scope containing event metadata.
727
509
  * @returns A new event with more information.
728
510
  */
729
- _prepareEvent(
730
- event,
731
- hint,
732
- currentScope,
733
- isolationScope,
734
- ) {
511
+ _prepareEvent(event, hint, currentScope, isolationScope) {
735
512
  const options = this.getOptions();
736
- const integrations = Object.keys(this._integrations);
737
- if (!hint.integrations && integrations?.length) {
513
+ const integrations = this.getIntegrationNames();
514
+ if (!hint.integrations && integrations.length) {
738
515
  hint.integrations = integrations;
739
516
  }
740
-
741
- this.emit('preprocessEvent', event, hint);
742
-
517
+ this.emit("preprocessEvent", event, hint);
743
518
  if (!event.type) {
744
519
  isolationScope.setLastEventId(event.event_id || hint.event_id);
745
520
  }
746
-
747
- return prepareEvent.prepareEvent(options, event, hint, currentScope, this, isolationScope).then(evt => {
521
+ return prepareEvent.prepareEvent(options, event, hint, currentScope, this, isolationScope).then((evt) => {
748
522
  if (evt === null) {
749
523
  return evt;
750
524
  }
751
-
752
- this.emit('postprocessEvent', evt, hint);
753
-
525
+ this.emit("postprocessEvent", evt, hint);
754
526
  evt.contexts = {
755
527
  trace: { ...evt.contexts?.trace, ...currentScopes.getTraceContextFromScope(currentScope) },
756
- ...evt.contexts,
528
+ ...evt.contexts
757
529
  };
758
-
759
530
  const dynamicSamplingContext$1 = dynamicSamplingContext.getDynamicSamplingContextFromScope(this, currentScope);
760
-
761
531
  evt.sdkProcessingMetadata = {
762
532
  dynamicSamplingContext: dynamicSamplingContext$1,
763
- ...evt.sdkProcessingMetadata,
533
+ ...evt.sdkProcessingMetadata
764
534
  };
765
-
766
535
  return evt;
767
536
  });
768
537
  }
769
-
770
538
  /**
771
539
  * Processes the event and logs an error in case of rejection
772
540
  * @param event
773
541
  * @param hint
774
542
  * @param scope
775
543
  */
776
- _captureEvent(
777
- event,
778
- hint = {},
779
- currentScope = currentScopes.getCurrentScope(),
780
- isolationScope = currentScopes.getIsolationScope(),
781
- ) {
544
+ _captureEvent(event, hint = {}, currentScope = currentScopes.getCurrentScope(), isolationScope = currentScopes.getIsolationScope()) {
782
545
  if (debugBuild.DEBUG_BUILD && isErrorEvent(event)) {
783
- debugLogger.debug.log(`Captured error event \`${eventUtils.getPossibleEventMessages(event)[0] || '<unknown>'}\``);
546
+ debugLogger.debug.log(`Captured error event \`${eventUtils.getPossibleEventMessages(event)[0] || "<unknown>"}\``);
784
547
  }
785
-
786
548
  return this._processEvent(event, hint, currentScope, isolationScope).then(
787
- finalEvent => {
549
+ (finalEvent) => {
788
550
  return finalEvent.event_id;
789
551
  },
790
- reason => {
552
+ (reason) => {
791
553
  if (debugBuild.DEBUG_BUILD) {
792
554
  if (_isDoNotSendEventError(reason)) {
793
555
  debugLogger.debug.log(reason.message);
@@ -797,11 +559,10 @@ class Client {
797
559
  debugLogger.debug.warn(reason);
798
560
  }
799
561
  }
800
- return undefined;
801
- },
562
+ return void 0;
563
+ }
802
564
  );
803
565
  }
804
-
805
566
  /**
806
567
  * Processes an event (either error or message) and sends it to Sentry.
807
568
  *
@@ -815,280 +576,193 @@ class Client {
815
576
  * @param currentScope A scope containing event metadata.
816
577
  * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
817
578
  */
818
- _processEvent(
819
- event,
820
- hint,
821
- currentScope,
822
- isolationScope,
823
- ) {
579
+ _processEvent(event, hint, currentScope, isolationScope) {
824
580
  const options = this.getOptions();
825
581
  const { sampleRate } = options;
826
-
827
582
  const isTransaction = isTransactionEvent(event);
828
583
  const isError = isErrorEvent(event);
829
- const eventType = event.type || 'error';
584
+ const eventType = event.type || "error";
830
585
  const beforeSendLabel = `before send for type \`${eventType}\``;
831
-
832
- // 1.0 === 100% events are sent
833
- // 0.0 === 0% events are sent
834
- // Sampling for transaction happens somewhere else
835
- const parsedSampleRate = typeof sampleRate === 'undefined' ? undefined : parseSampleRate.parseSampleRate(sampleRate);
836
- if (isError && typeof parsedSampleRate === 'number' && randomSafeContext.safeMathRandom() > parsedSampleRate) {
837
- this.recordDroppedEvent('sample_rate', 'error');
586
+ const parsedSampleRate = typeof sampleRate === "undefined" ? void 0 : parseSampleRate.parseSampleRate(sampleRate);
587
+ if (isError && typeof parsedSampleRate === "number" && randomSafeContext.safeMathRandom() > parsedSampleRate) {
588
+ this.recordDroppedEvent("sample_rate", "error");
838
589
  return syncpromise.rejectedSyncPromise(
839
590
  _makeDoNotSendEventError(
840
- `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,
841
- ),
591
+ `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`
592
+ )
842
593
  );
843
594
  }
844
-
845
595
  const dataCategory = getDataCategoryByType(event.type);
846
-
847
- return this._prepareEvent(event, hint, currentScope, isolationScope)
848
- .then(prepared => {
849
- if (prepared === null) {
850
- this.recordDroppedEvent('event_processor', dataCategory);
851
- throw _makeDoNotSendEventError('An event processor returned `null`, will not send event.');
852
- }
853
-
854
- const isInternalException = (hint.data )?.__sentry__ === true;
855
- if (isInternalException) {
856
- return prepared;
857
- }
858
-
859
- const result = processBeforeSend(this, options, prepared, hint);
860
- return _validateBeforeSendResult(result, beforeSendLabel);
861
- })
862
- .then(processedEvent => {
863
- if (processedEvent === null) {
864
- this.recordDroppedEvent('before_send', dataCategory);
865
- if (isTransaction) {
866
- const spans = event.spans || [];
867
- // the transaction itself counts as one span, plus all the child spans that are added
868
- const spanCount = 1 + spans.length;
869
- this.recordDroppedEvent('before_send', 'span', spanCount);
870
- }
871
- throw _makeDoNotSendEventError(`${beforeSendLabel} returned \`null\`, will not send event.`);
872
- }
873
-
874
- const session = currentScope.getSession() || isolationScope.getSession();
875
- if (isError && session) {
876
- this._updateSessionFromEvent(session, processedEvent);
877
- }
878
-
596
+ return this._prepareEvent(event, hint, currentScope, isolationScope).then((prepared) => {
597
+ if (prepared === null) {
598
+ this.recordDroppedEvent("event_processor", dataCategory);
599
+ throw _makeDoNotSendEventError("An event processor returned `null`, will not send event.");
600
+ }
601
+ const isInternalException = hint.data?.__sentry__ === true;
602
+ if (isInternalException) {
603
+ return prepared;
604
+ }
605
+ const result = processBeforeSend(this, options, prepared, hint);
606
+ return _validateBeforeSendResult(result, beforeSendLabel);
607
+ }).then((processedEvent) => {
608
+ if (processedEvent === null) {
609
+ this.recordDroppedEvent("before_send", dataCategory);
879
610
  if (isTransaction) {
880
- const spanCountBefore = processedEvent.sdkProcessingMetadata?.spanCountBeforeProcessing || 0;
881
- const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;
882
-
883
- const droppedSpanCount = spanCountBefore - spanCountAfter;
884
- if (droppedSpanCount > 0) {
885
- this.recordDroppedEvent('before_send', 'span', droppedSpanCount);
886
- }
887
- }
888
-
889
- // None of the Sentry built event processor will update transaction name,
890
- // so if the transaction name has been changed by an event processor, we know
891
- // it has to come from custom event processor added by a user
892
- const transactionInfo = processedEvent.transaction_info;
893
- if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {
894
- const source = 'custom';
895
- processedEvent.transaction_info = {
896
- ...transactionInfo,
897
- source,
898
- };
611
+ const spans = event.spans || [];
612
+ const spanCount = 1 + spans.length;
613
+ this.recordDroppedEvent("before_send", "span", spanCount);
899
614
  }
900
-
901
- this.sendEvent(processedEvent, hint);
902
- return processedEvent;
903
- })
904
- .then(null, reason => {
905
- if (_isDoNotSendEventError(reason) || _isInternalError(reason)) {
906
- throw reason;
615
+ throw _makeDoNotSendEventError(`${beforeSendLabel} returned \`null\`, will not send event.`);
616
+ }
617
+ const session = currentScope.getSession() || isolationScope.getSession();
618
+ if (isError && session) {
619
+ this._updateSessionFromEvent(session, processedEvent);
620
+ }
621
+ if (isTransaction) {
622
+ const spanCountBefore = processedEvent.sdkProcessingMetadata?.spanCountBeforeProcessing || 0;
623
+ const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;
624
+ const droppedSpanCount = spanCountBefore - spanCountAfter;
625
+ if (droppedSpanCount > 0) {
626
+ this.recordDroppedEvent("before_send", "span", droppedSpanCount);
907
627
  }
908
-
909
- this.captureException(reason, {
910
- mechanism: {
911
- handled: false,
912
- type: 'internal',
913
- },
914
- data: {
915
- __sentry__: true,
916
- },
917
- originalException: reason,
918
- });
919
- throw _makeInternalError(
920
- `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${reason}`,
921
- );
628
+ }
629
+ const transactionInfo = processedEvent.transaction_info;
630
+ if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {
631
+ const source = "custom";
632
+ processedEvent.transaction_info = {
633
+ ...transactionInfo,
634
+ source
635
+ };
636
+ }
637
+ this.sendEvent(processedEvent, hint);
638
+ return processedEvent;
639
+ }).then(null, (reason) => {
640
+ if (_isDoNotSendEventError(reason) || _isInternalError(reason)) {
641
+ throw reason;
642
+ }
643
+ this.captureException(reason, {
644
+ mechanism: {
645
+ handled: false,
646
+ type: "internal"
647
+ },
648
+ data: {
649
+ __sentry__: true
650
+ },
651
+ originalException: reason
922
652
  });
653
+ throw _makeInternalError(
654
+ `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
655
+ Reason: ${reason}`
656
+ );
657
+ });
923
658
  }
924
-
925
659
  /**
926
660
  * Occupies the client with processing and event
927
661
  */
928
- _process(taskProducer, dataCategory) {
662
+ _process(taskProducer, dataCategory) {
929
663
  this._numProcessing++;
930
-
931
664
  void this._promiseBuffer.add(taskProducer).then(
932
- value => {
665
+ (value) => {
933
666
  this._numProcessing--;
934
667
  return value;
935
668
  },
936
- reason => {
669
+ (reason) => {
937
670
  this._numProcessing--;
938
-
939
671
  if (reason === promisebuffer.SENTRY_BUFFER_FULL_ERROR) {
940
- this.recordDroppedEvent('queue_overflow', dataCategory);
672
+ this.recordDroppedEvent("queue_overflow", dataCategory);
941
673
  }
942
-
943
674
  return reason;
944
- },
675
+ }
945
676
  );
946
677
  }
947
-
948
678
  /**
949
679
  * Clears outcomes on this client and returns them.
950
680
  */
951
- _clearOutcomes() {
681
+ _clearOutcomes() {
952
682
  const outcomes = this._outcomes;
953
683
  this._outcomes = {};
954
684
  return Object.entries(outcomes).map(([key, quantity]) => {
955
- const [reason, category] = key.split(':') ;
685
+ const [reason, category] = key.split(":");
956
686
  return {
957
687
  reason,
958
688
  category,
959
- quantity,
689
+ quantity
960
690
  };
961
691
  });
962
692
  }
963
-
964
693
  /**
965
694
  * Sends client reports as an envelope.
966
695
  */
967
- _flushOutcomes() {
968
- debugBuild.DEBUG_BUILD && debugLogger.debug.log('Flushing outcomes...');
969
-
696
+ _flushOutcomes() {
697
+ debugBuild.DEBUG_BUILD && debugLogger.debug.log("Flushing outcomes...");
970
698
  const outcomes = this._clearOutcomes();
971
-
972
699
  if (outcomes.length === 0) {
973
- debugBuild.DEBUG_BUILD && debugLogger.debug.log('No outcomes to send');
700
+ debugBuild.DEBUG_BUILD && debugLogger.debug.log("No outcomes to send");
974
701
  return;
975
702
  }
976
-
977
- // This is really the only place where we want to check for a DSN and only send outcomes then
978
703
  if (!this._dsn) {
979
- debugBuild.DEBUG_BUILD && debugLogger.debug.log('No dsn provided, will not send outcomes');
704
+ debugBuild.DEBUG_BUILD && debugLogger.debug.log("No dsn provided, will not send outcomes");
980
705
  return;
981
706
  }
982
-
983
- debugBuild.DEBUG_BUILD && debugLogger.debug.log('Sending outcomes:', outcomes);
984
-
707
+ debugBuild.DEBUG_BUILD && debugLogger.debug.log("Sending outcomes:", outcomes);
985
708
  const envelope = clientreport.createClientReportEnvelope(outcomes, this._options.tunnel && dsn.dsnToString(this._dsn));
986
-
987
- // sendEnvelope should not throw
988
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
989
709
  this.sendEnvelope(envelope);
990
710
  }
991
-
992
- /**
993
- * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
994
- */
995
-
996
711
  }
997
-
998
712
  function getDataCategoryByType(type) {
999
- return type === 'replay_event' ? 'replay' : type || 'error';
713
+ return type === "replay_event" ? "replay" : type || "error";
1000
714
  }
1001
-
1002
- /**
1003
- * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.
1004
- */
1005
- function _validateBeforeSendResult(
1006
- beforeSendResult,
1007
- beforeSendLabel,
1008
- ) {
715
+ function _validateBeforeSendResult(beforeSendResult, beforeSendLabel) {
1009
716
  const invalidValueError = `${beforeSendLabel} must return \`null\` or a valid event.`;
1010
717
  if (is.isThenable(beforeSendResult)) {
1011
718
  return beforeSendResult.then(
1012
- event => {
719
+ (event) => {
1013
720
  if (!is.isPlainObject(event) && event !== null) {
1014
721
  throw _makeInternalError(invalidValueError);
1015
722
  }
1016
723
  return event;
1017
724
  },
1018
- e => {
725
+ (e) => {
1019
726
  throw _makeInternalError(`${beforeSendLabel} rejected with ${e}`);
1020
- },
727
+ }
1021
728
  );
1022
729
  } else if (!is.isPlainObject(beforeSendResult) && beforeSendResult !== null) {
1023
730
  throw _makeInternalError(invalidValueError);
1024
731
  }
1025
732
  return beforeSendResult;
1026
733
  }
1027
-
1028
- /**
1029
- * Process the matching `beforeSendXXX` callback.
1030
- */
1031
- function processBeforeSend(
1032
- client,
1033
- options,
1034
- event,
1035
- hint,
1036
- ) {
734
+ function processBeforeSend(client, options, event, hint) {
1037
735
  const { beforeSend, beforeSendTransaction, ignoreSpans } = options;
1038
736
  const beforeSendSpan$1 = !beforeSendSpan.isStreamedBeforeSendSpanCallback(options.beforeSendSpan) && options.beforeSendSpan;
1039
-
1040
737
  let processedEvent = event;
1041
-
1042
738
  if (isErrorEvent(processedEvent) && beforeSend) {
1043
739
  return beforeSend(processedEvent, hint);
1044
740
  }
1045
-
1046
741
  if (isTransactionEvent(processedEvent)) {
1047
- // Avoid processing if we don't have to
1048
742
  if (beforeSendSpan$1 || ignoreSpans) {
1049
- // 1. Process root span
1050
743
  const rootSpanJson = transactionEvent.convertTransactionEventToSpanJson(processedEvent);
1051
-
1052
- // 1.1 If the root span should be ignored, drop the whole transaction
1053
- if (
1054
- ignoreSpans?.length &&
1055
- shouldIgnoreSpan.shouldIgnoreSpan(
1056
- { description: rootSpanJson.description, op: rootSpanJson.op, attributes: rootSpanJson.data },
1057
- ignoreSpans,
1058
- )
1059
- ) {
1060
- // dropping the whole transaction!
744
+ if (ignoreSpans?.length && shouldIgnoreSpan.shouldIgnoreSpan(
745
+ { description: rootSpanJson.description, op: rootSpanJson.op, attributes: rootSpanJson.data },
746
+ ignoreSpans
747
+ )) {
1061
748
  return null;
1062
749
  }
1063
-
1064
- // 1.2 If a `beforeSendSpan` callback is defined, process the root span
1065
750
  if (beforeSendSpan$1) {
1066
751
  const processedRootSpanJson = beforeSendSpan$1(rootSpanJson);
1067
752
  if (!processedRootSpanJson) {
1068
753
  spanUtils.showSpanDropWarning();
1069
754
  } else {
1070
- // update event with processed root span values
1071
755
  processedEvent = merge.merge(event, transactionEvent.convertSpanJsonToTransactionEvent(processedRootSpanJson));
1072
756
  }
1073
757
  }
1074
-
1075
- // 2. Process child spans
1076
758
  if (processedEvent.spans) {
1077
759
  const processedSpans = [];
1078
-
1079
760
  const initialSpans = processedEvent.spans;
1080
-
1081
761
  for (const span of initialSpans) {
1082
- // 2.a If the child span should be ignored, reparent it to the root span
1083
- if (
1084
- ignoreSpans?.length &&
1085
- shouldIgnoreSpan.shouldIgnoreSpan({ description: span.description, op: span.op, attributes: span.data }, ignoreSpans)
1086
- ) {
762
+ if (ignoreSpans?.length && shouldIgnoreSpan.shouldIgnoreSpan({ description: span.description, op: span.op, attributes: span.data }, ignoreSpans)) {
1087
763
  shouldIgnoreSpan.reparentChildSpans(initialSpans, span);
1088
764
  continue;
1089
765
  }
1090
-
1091
- // 2.b If a `beforeSendSpan` callback is defined, process the child span
1092
766
  if (beforeSendSpan$1) {
1093
767
  const processedSpan = beforeSendSpan$1(span);
1094
768
  if (!processedSpan) {
@@ -1101,114 +775,71 @@ function processBeforeSend(
1101
775
  processedSpans.push(span);
1102
776
  }
1103
777
  }
1104
-
1105
778
  const droppedSpans = processedEvent.spans.length - processedSpans.length;
1106
779
  if (droppedSpans) {
1107
- client.recordDroppedEvent('before_send', 'span', droppedSpans);
780
+ client.recordDroppedEvent("before_send", "span", droppedSpans);
1108
781
  }
1109
-
1110
782
  processedEvent.spans = processedSpans;
1111
783
  }
1112
784
  }
1113
-
1114
785
  if (beforeSendTransaction) {
1115
786
  if (processedEvent.spans) {
1116
- // We store the # of spans before processing in SDK metadata,
1117
- // so we can compare it afterwards to determine how many spans were dropped
1118
787
  const spanCountBefore = processedEvent.spans.length;
1119
788
  processedEvent.sdkProcessingMetadata = {
1120
789
  ...event.sdkProcessingMetadata,
1121
- spanCountBeforeProcessing: spanCountBefore,
790
+ spanCountBeforeProcessing: spanCountBefore
1122
791
  };
1123
792
  }
1124
- return beforeSendTransaction(processedEvent , hint);
793
+ return beforeSendTransaction(processedEvent, hint);
1125
794
  }
1126
795
  }
1127
-
1128
796
  return processedEvent;
1129
797
  }
1130
-
1131
798
  function isErrorEvent(event) {
1132
- return event.type === undefined;
799
+ return event.type === void 0;
1133
800
  }
1134
-
1135
801
  function isTransactionEvent(event) {
1136
- return event.type === 'transaction';
802
+ return event.type === "transaction";
1137
803
  }
1138
-
1139
- /**
1140
- * Estimate the size of a metric in bytes.
1141
- *
1142
- * @param metric - The metric to estimate the size of.
1143
- * @returns The estimated size of the metric in bytes.
1144
- */
1145
804
  function estimateMetricSizeInBytes(metric) {
1146
805
  let weight = 0;
1147
-
1148
- // Estimate byte size of 2 bytes per character. This is a rough estimate JS strings are stored as UTF-16.
1149
806
  if (metric.name) {
1150
807
  weight += metric.name.length * 2;
1151
808
  }
1152
-
1153
- // Add weight for number
1154
809
  weight += 8;
1155
-
1156
810
  return weight + estimateAttributesSizeInBytes(metric.attributes);
1157
811
  }
1158
-
1159
- /**
1160
- * Estimate the size of a log in bytes.
1161
- *
1162
- * @param log - The log to estimate the size of.
1163
- * @returns The estimated size of the log in bytes.
1164
- */
1165
812
  function estimateLogSizeInBytes(log) {
1166
813
  let weight = 0;
1167
-
1168
- // Estimate byte size of 2 bytes per character. This is a rough estimate JS strings are stored as UTF-16.
1169
814
  if (log.message) {
1170
815
  weight += log.message.length * 2;
1171
816
  }
1172
-
1173
817
  return weight + estimateAttributesSizeInBytes(log.attributes);
1174
818
  }
1175
-
1176
- /**
1177
- * Estimate the size of attributes in bytes.
1178
- *
1179
- * @param attributes - The attributes object to estimate the size of.
1180
- * @returns The estimated size of the attributes in bytes.
1181
- */
1182
819
  function estimateAttributesSizeInBytes(attributes) {
1183
820
  if (!attributes) {
1184
821
  return 0;
1185
822
  }
1186
-
1187
823
  let weight = 0;
1188
-
1189
- Object.values(attributes).forEach(value => {
824
+ Object.values(attributes).forEach((value) => {
1190
825
  if (Array.isArray(value)) {
1191
826
  weight += value.length * estimatePrimitiveSizeInBytes(value[0]);
1192
827
  } else if (is.isPrimitive(value)) {
1193
828
  weight += estimatePrimitiveSizeInBytes(value);
1194
829
  } else {
1195
- // For objects values, we estimate the size of the object as 100 bytes
1196
830
  weight += 100;
1197
831
  }
1198
832
  });
1199
-
1200
833
  return weight;
1201
834
  }
1202
-
1203
835
  function estimatePrimitiveSizeInBytes(value) {
1204
- if (typeof value === 'string') {
836
+ if (typeof value === "string") {
1205
837
  return value.length * 2;
1206
- } else if (typeof value === 'number') {
838
+ } else if (typeof value === "number") {
1207
839
  return 8;
1208
- } else if (typeof value === 'boolean') {
840
+ } else if (typeof value === "boolean") {
1209
841
  return 4;
1210
842
  }
1211
-
1212
843
  return 0;
1213
844
  }
1214
845