@sentry/core 10.53.1 → 10.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1517) hide show
  1. package/build/cjs/api.js +10 -34
  2. package/build/cjs/api.js.map +1 -1
  3. package/build/cjs/asyncContext/index.js +0 -14
  4. package/build/cjs/asyncContext/index.js.map +1 -1
  5. package/build/cjs/asyncContext/stackStrategy.js +16 -47
  6. package/build/cjs/asyncContext/stackStrategy.js.map +1 -1
  7. package/build/cjs/attributes.js +17 -95
  8. package/build/cjs/attributes.js.map +1 -1
  9. package/build/cjs/breadcrumbs.js +2 -22
  10. package/build/cjs/breadcrumbs.js.map +1 -1
  11. package/build/cjs/browser.js +12 -3
  12. package/build/cjs/browser.js.map +1 -1
  13. package/build/cjs/carrier.js +5 -42
  14. package/build/cjs/carrier.js.map +1 -1
  15. package/build/cjs/checkin.js +5 -19
  16. package/build/cjs/checkin.js.map +1 -1
  17. package/build/cjs/client.js +216 -585
  18. package/build/cjs/client.js.map +1 -1
  19. package/build/cjs/constants.js +2 -2
  20. package/build/cjs/currentScopes.js +5 -86
  21. package/build/cjs/currentScopes.js.map +1 -1
  22. package/build/cjs/debug-build.js +0 -5
  23. package/build/cjs/debug-build.js.map +1 -1
  24. package/build/cjs/defaultScopes.js +2 -5
  25. package/build/cjs/defaultScopes.js.map +1 -1
  26. package/build/cjs/envelope.js +32 -103
  27. package/build/cjs/envelope.js.map +1 -1
  28. package/build/cjs/eventProcessors.js +4 -23
  29. package/build/cjs/eventProcessors.js.map +1 -1
  30. package/build/cjs/exports.js +21 -197
  31. package/build/cjs/exports.js.map +1 -1
  32. package/build/cjs/feedback.js +7 -19
  33. package/build/cjs/feedback.js.map +1 -1
  34. package/build/cjs/fetch.js +66 -201
  35. package/build/cjs/fetch.js.map +1 -1
  36. package/build/cjs/index.js +17 -3
  37. package/build/cjs/index.js.map +1 -1
  38. package/build/cjs/instrument/console.js +9 -41
  39. package/build/cjs/instrument/console.js.map +1 -1
  40. package/build/cjs/instrument/fetch.js +47 -156
  41. package/build/cjs/instrument/fetch.js.map +1 -1
  42. package/build/cjs/instrument/globalError.js +4 -25
  43. package/build/cjs/instrument/globalError.js.map +1 -1
  44. package/build/cjs/instrument/globalUnhandledRejection.js +4 -21
  45. package/build/cjs/instrument/globalUnhandledRejection.js.map +1 -1
  46. package/build/cjs/instrument/handlers.js +9 -21
  47. package/build/cjs/instrument/handlers.js.map +1 -1
  48. package/build/cjs/integration.js +13 -77
  49. package/build/cjs/integration.js.map +1 -1
  50. package/build/cjs/integrations/captureconsole.js +16 -40
  51. package/build/cjs/integrations/captureconsole.js.map +1 -1
  52. package/build/cjs/integrations/consola.js +57 -163
  53. package/build/cjs/integrations/consola.js.map +1 -1
  54. package/build/cjs/integrations/console.js +11 -43
  55. package/build/cjs/integrations/console.js.map +1 -1
  56. package/build/cjs/integrations/conversationId.js +5 -22
  57. package/build/cjs/integrations/conversationId.js.map +1 -1
  58. package/build/cjs/integrations/dedupe.js +16 -74
  59. package/build/cjs/integrations/dedupe.js.map +1 -1
  60. package/build/cjs/integrations/eventFilters.js +63 -114
  61. package/build/cjs/integrations/eventFilters.js.map +1 -1
  62. package/build/cjs/integrations/express/index.js +30 -145
  63. package/build/cjs/integrations/express/index.js.map +1 -1
  64. package/build/cjs/integrations/express/patch-layer.js +20 -130
  65. package/build/cjs/integrations/express/patch-layer.js.map +1 -1
  66. package/build/cjs/integrations/express/request-layer-store.js +1 -3
  67. package/build/cjs/integrations/express/request-layer-store.js.map +1 -1
  68. package/build/cjs/integrations/express/set-sdk-processing-metadata.js +0 -2
  69. package/build/cjs/integrations/express/set-sdk-processing-metadata.js.map +1 -1
  70. package/build/cjs/integrations/express/types.js +6 -7
  71. package/build/cjs/integrations/express/types.js.map +1 -1
  72. package/build/cjs/integrations/express/utils.js +37 -145
  73. package/build/cjs/integrations/express/utils.js.map +1 -1
  74. package/build/cjs/integrations/extraerrordata.js +24 -69
  75. package/build/cjs/integrations/extraerrordata.js.map +1 -1
  76. package/build/cjs/integrations/featureFlags/featureFlagsIntegration.js +3 -29
  77. package/build/cjs/integrations/featureFlags/featureFlagsIntegration.js.map +1 -1
  78. package/build/cjs/integrations/featureFlags/growthbook.js +11 -40
  79. package/build/cjs/integrations/featureFlags/growthbook.js.map +1 -1
  80. package/build/cjs/integrations/functiontostring.js +6 -27
  81. package/build/cjs/integrations/functiontostring.js.map +1 -1
  82. package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js +10 -18
  83. package/build/cjs/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -1
  84. package/build/cjs/integrations/http/client-patch.js +8 -70
  85. package/build/cjs/integrations/http/client-patch.js.map +1 -1
  86. package/build/cjs/integrations/http/client-subscriptions.js +22 -59
  87. package/build/cjs/integrations/http/client-subscriptions.js.map +1 -1
  88. package/build/cjs/integrations/http/constants.js +3 -3
  89. package/build/cjs/integrations/http/double-wrap-warning.js +10 -18
  90. package/build/cjs/integrations/http/double-wrap-warning.js.map +1 -1
  91. package/build/cjs/integrations/http/get-outgoing-span-data.js +30 -47
  92. package/build/cjs/integrations/http/get-outgoing-span-data.js.map +1 -1
  93. package/build/cjs/integrations/http/get-request-url.js +7 -24
  94. package/build/cjs/integrations/http/get-request-url.js.map +1 -1
  95. package/build/cjs/integrations/http/inject-trace-propagation-headers.js +14 -38
  96. package/build/cjs/integrations/http/inject-trace-propagation-headers.js.map +1 -1
  97. package/build/cjs/integrations/http/patch-request-to-capture-body.js +80 -0
  98. package/build/cjs/integrations/http/patch-request-to-capture-body.js.map +1 -0
  99. package/build/cjs/integrations/http/record-request-session.js +61 -0
  100. package/build/cjs/integrations/http/record-request-session.js.map +1 -0
  101. package/build/cjs/integrations/http/server-subscription.js +289 -0
  102. package/build/cjs/integrations/http/server-subscription.js.map +1 -0
  103. package/build/cjs/integrations/linkederrors.js +6 -11
  104. package/build/cjs/integrations/linkederrors.js.map +1 -1
  105. package/build/cjs/integrations/mcp-server/attributeExtraction.js +26 -69
  106. package/build/cjs/integrations/mcp-server/attributeExtraction.js.map +1 -1
  107. package/build/cjs/integrations/mcp-server/attributes.js +30 -138
  108. package/build/cjs/integrations/mcp-server/attributes.js.map +1 -1
  109. package/build/cjs/integrations/mcp-server/correlation.js +20 -91
  110. package/build/cjs/integrations/mcp-server/correlation.js.map +1 -1
  111. package/build/cjs/integrations/mcp-server/errorCapture.js +6 -25
  112. package/build/cjs/integrations/mcp-server/errorCapture.js.map +1 -1
  113. package/build/cjs/integrations/mcp-server/handlers.js +55 -169
  114. package/build/cjs/integrations/mcp-server/handlers.js.map +1 -1
  115. package/build/cjs/integrations/mcp-server/index.js +7 -60
  116. package/build/cjs/integrations/mcp-server/index.js.map +1 -1
  117. package/build/cjs/integrations/mcp-server/methodConfig.js +21 -59
  118. package/build/cjs/integrations/mcp-server/methodConfig.js.map +1 -1
  119. package/build/cjs/integrations/mcp-server/piiFiltering.js +5 -33
  120. package/build/cjs/integrations/mcp-server/piiFiltering.js.map +1 -1
  121. package/build/cjs/integrations/mcp-server/resultExtraction.js +20 -76
  122. package/build/cjs/integrations/mcp-server/resultExtraction.js.map +1 -1
  123. package/build/cjs/integrations/mcp-server/sessionExtraction.js +30 -121
  124. package/build/cjs/integrations/mcp-server/sessionExtraction.js.map +1 -1
  125. package/build/cjs/integrations/mcp-server/sessionManagement.js +2 -60
  126. package/build/cjs/integrations/mcp-server/sessionManagement.js.map +1 -1
  127. package/build/cjs/integrations/mcp-server/spans.js +20 -107
  128. package/build/cjs/integrations/mcp-server/spans.js.map +1 -1
  129. package/build/cjs/integrations/mcp-server/transport.js +26 -94
  130. package/build/cjs/integrations/mcp-server/transport.js.map +1 -1
  131. package/build/cjs/integrations/mcp-server/validation.js +6 -72
  132. package/build/cjs/integrations/mcp-server/validation.js.map +1 -1
  133. package/build/cjs/integrations/moduleMetadata.js +6 -20
  134. package/build/cjs/integrations/moduleMetadata.js.map +1 -1
  135. package/build/cjs/integrations/postgresjs.js +78 -287
  136. package/build/cjs/integrations/postgresjs.js.map +1 -1
  137. package/build/cjs/integrations/requestdata.js +30 -93
  138. package/build/cjs/integrations/requestdata.js.map +1 -1
  139. package/build/cjs/integrations/rewriteframes.js +14 -45
  140. package/build/cjs/integrations/rewriteframes.js.map +1 -1
  141. package/build/cjs/integrations/spanStreaming.js +9 -15
  142. package/build/cjs/integrations/spanStreaming.js.map +1 -1
  143. package/build/cjs/integrations/supabase.js +224 -333
  144. package/build/cjs/integrations/supabase.js.map +1 -1
  145. package/build/cjs/integrations/third-party-errors-filter.js +60 -85
  146. package/build/cjs/integrations/third-party-errors-filter.js.map +1 -1
  147. package/build/cjs/integrations/zoderrors.js +35 -111
  148. package/build/cjs/integrations/zoderrors.js.map +1 -1
  149. package/build/cjs/logs/console-integration.js +15 -50
  150. package/build/cjs/logs/console-integration.js.map +1 -1
  151. package/build/cjs/logs/constants.js +1 -6
  152. package/build/cjs/logs/constants.js.map +1 -1
  153. package/build/cjs/logs/envelope.js +10 -40
  154. package/build/cjs/logs/envelope.js.map +1 -1
  155. package/build/cjs/logs/internal.js +53 -125
  156. package/build/cjs/logs/internal.js.map +1 -1
  157. package/build/cjs/logs/public-api.js +13 -228
  158. package/build/cjs/logs/public-api.js.map +1 -1
  159. package/build/cjs/logs/utils.js +6 -47
  160. package/build/cjs/logs/utils.js.map +1 -1
  161. package/build/cjs/metadata.js +6 -51
  162. package/build/cjs/metadata.js.map +1 -1
  163. package/build/cjs/metrics/envelope.js +12 -45
  164. package/build/cjs/metrics/envelope.js.map +1 -1
  165. package/build/cjs/metrics/internal.js +31 -144
  166. package/build/cjs/metrics/internal.js.map +1 -1
  167. package/build/cjs/metrics/public-api.js +4 -109
  168. package/build/cjs/metrics/public-api.js.map +1 -1
  169. package/build/cjs/profiling.js +11 -41
  170. package/build/cjs/profiling.js.map +1 -1
  171. package/build/cjs/scope.js +73 -224
  172. package/build/cjs/scope.js.map +1 -1
  173. package/build/cjs/sdk.js +2 -21
  174. package/build/cjs/sdk.js.map +1 -1
  175. package/build/cjs/semanticAttributes.js +30 -116
  176. package/build/cjs/semanticAttributes.js.map +1 -1
  177. package/build/cjs/server-runtime-client.js +32 -87
  178. package/build/cjs/server-runtime-client.js.map +1 -1
  179. package/build/cjs/server.js +17 -3
  180. package/build/cjs/server.js.map +1 -1
  181. package/build/cjs/session.js +14 -67
  182. package/build/cjs/session.js.map +1 -1
  183. package/build/cjs/tracing/ai/gen-ai-attributes.js +45 -249
  184. package/build/cjs/tracing/ai/gen-ai-attributes.js.map +1 -1
  185. package/build/cjs/tracing/ai/mediaStripping.js +21 -116
  186. package/build/cjs/tracing/ai/mediaStripping.js.map +1 -1
  187. package/build/cjs/tracing/ai/messageTruncation.js +26 -212
  188. package/build/cjs/tracing/ai/messageTruncation.js.map +1 -1
  189. package/build/cjs/tracing/ai/utils.js +40 -180
  190. package/build/cjs/tracing/ai/utils.js.map +1 -1
  191. package/build/cjs/tracing/anthropic-ai/constants.js +9 -12
  192. package/build/cjs/tracing/anthropic-ai/constants.js.map +1 -1
  193. package/build/cjs/tracing/anthropic-ai/index.js +67 -172
  194. package/build/cjs/tracing/anthropic-ai/index.js.map +1 -1
  195. package/build/cjs/tracing/anthropic-ai/streaming.js +45 -149
  196. package/build/cjs/tracing/anthropic-ai/streaming.js.map +1 -1
  197. package/build/cjs/tracing/anthropic-ai/utils.js +17 -47
  198. package/build/cjs/tracing/anthropic-ai/utils.js.map +1 -1
  199. package/build/cjs/tracing/dynamicSamplingContext.js +18 -85
  200. package/build/cjs/tracing/dynamicSamplingContext.js.map +1 -1
  201. package/build/cjs/tracing/errors.js +2 -14
  202. package/build/cjs/tracing/errors.js.map +1 -1
  203. package/build/cjs/tracing/google-genai/constants.js +9 -16
  204. package/build/cjs/tracing/google-genai/constants.js.map +1 -1
  205. package/build/cjs/tracing/google-genai/index.js +79 -223
  206. package/build/cjs/tracing/google-genai/index.js.map +1 -1
  207. package/build/cjs/tracing/google-genai/streaming.js +11 -56
  208. package/build/cjs/tracing/google-genai/streaming.js.map +1 -1
  209. package/build/cjs/tracing/google-genai/utils.js +8 -13
  210. package/build/cjs/tracing/google-genai/utils.js.map +1 -1
  211. package/build/cjs/tracing/idleSpan.js +48 -174
  212. package/build/cjs/tracing/idleSpan.js.map +1 -1
  213. package/build/cjs/tracing/langchain/constants.js +8 -9
  214. package/build/cjs/tracing/langchain/constants.js.map +1 -1
  215. package/build/cjs/tracing/langchain/embeddings.js +31 -75
  216. package/build/cjs/tracing/langchain/embeddings.js.map +1 -1
  217. package/build/cjs/tracing/langchain/index.js +64 -161
  218. package/build/cjs/tracing/langchain/index.js.map +1 -1
  219. package/build/cjs/tracing/langchain/utils.js +101 -311
  220. package/build/cjs/tracing/langchain/utils.js.map +1 -1
  221. package/build/cjs/tracing/langgraph/constants.js +2 -2
  222. package/build/cjs/tracing/langgraph/index.js +57 -160
  223. package/build/cjs/tracing/langgraph/index.js.map +1 -1
  224. package/build/cjs/tracing/langgraph/utils.js +53 -170
  225. package/build/cjs/tracing/langgraph/utils.js.map +1 -1
  226. package/build/cjs/tracing/logSpans.js +10 -26
  227. package/build/cjs/tracing/logSpans.js.map +1 -1
  228. package/build/cjs/tracing/measurement.js +6 -18
  229. package/build/cjs/tracing/measurement.js.map +1 -1
  230. package/build/cjs/tracing/openai/constants.js +20 -24
  231. package/build/cjs/tracing/openai/constants.js.map +1 -1
  232. package/build/cjs/tracing/openai/index.js +52 -132
  233. package/build/cjs/tracing/openai/index.js.map +1 -1
  234. package/build/cjs/tracing/openai/streaming.js +24 -102
  235. package/build/cjs/tracing/openai/streaming.js.map +1 -1
  236. package/build/cjs/tracing/openai/utils.js +36 -107
  237. package/build/cjs/tracing/openai/utils.js.map +1 -1
  238. package/build/cjs/tracing/sampling.js +23 -63
  239. package/build/cjs/tracing/sampling.js.map +1 -1
  240. package/build/cjs/tracing/sentryNonRecordingSpan.js +15 -40
  241. package/build/cjs/tracing/sentryNonRecordingSpan.js.map +1 -1
  242. package/build/cjs/tracing/sentrySpan.js +66 -172
  243. package/build/cjs/tracing/sentrySpan.js.map +1 -1
  244. package/build/cjs/tracing/spans/beforeSendSpan.js +4 -32
  245. package/build/cjs/tracing/spans/beforeSendSpan.js.map +1 -1
  246. package/build/cjs/tracing/spans/captureSpan.js +58 -156
  247. package/build/cjs/tracing/spans/captureSpan.js.map +1 -1
  248. package/build/cjs/tracing/spans/envelope.js +12 -24
  249. package/build/cjs/tracing/spans/envelope.js.map +1 -1
  250. package/build/cjs/tracing/spans/estimateSize.js +0 -22
  251. package/build/cjs/tracing/spans/estimateSize.js.map +1 -1
  252. package/build/cjs/tracing/spans/extractGenAiSpans.js +11 -33
  253. package/build/cjs/tracing/spans/extractGenAiSpans.js.map +1 -1
  254. package/build/cjs/tracing/spans/hasSpanStreamingEnabled.js +1 -4
  255. package/build/cjs/tracing/spans/hasSpanStreamingEnabled.js.map +1 -1
  256. package/build/cjs/tracing/spans/scopeContextAttributes.js +58 -0
  257. package/build/cjs/tracing/spans/scopeContextAttributes.js.map +1 -0
  258. package/build/cjs/tracing/spans/spanBuffer.js +21 -71
  259. package/build/cjs/tracing/spans/spanBuffer.js.map +1 -1
  260. package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js +4 -8
  261. package/build/cjs/tracing/spans/spanJsonToStreamedSpan.js.map +1 -1
  262. package/build/cjs/tracing/spanstatus.js +15 -32
  263. package/build/cjs/tracing/spanstatus.js.map +1 -1
  264. package/build/cjs/tracing/trace.js +95 -311
  265. package/build/cjs/tracing/trace.js.map +1 -1
  266. package/build/cjs/tracing/utils.js +4 -14
  267. package/build/cjs/tracing/utils.js.map +1 -1
  268. package/build/cjs/tracing/vercel-ai/constants.js +15 -26
  269. package/build/cjs/tracing/vercel-ai/constants.js.map +1 -1
  270. package/build/cjs/tracing/vercel-ai/index.js +84 -288
  271. package/build/cjs/tracing/vercel-ai/index.js.map +1 -1
  272. package/build/cjs/tracing/vercel-ai/utils.js +30 -128
  273. package/build/cjs/tracing/vercel-ai/utils.js.map +1 -1
  274. package/build/cjs/tracing/vercel-ai/vercel-ai-attributes.js +22 -229
  275. package/build/cjs/tracing/vercel-ai/vercel-ai-attributes.js.map +1 -1
  276. package/build/cjs/transports/base.js +32 -67
  277. package/build/cjs/transports/base.js.map +1 -1
  278. package/build/cjs/transports/multiplexed.js +38 -103
  279. package/build/cjs/transports/multiplexed.js.map +1 -1
  280. package/build/cjs/transports/offline.js +31 -72
  281. package/build/cjs/transports/offline.js.map +1 -1
  282. package/build/cjs/transports/userAgent.js +4 -13
  283. package/build/cjs/transports/userAgent.js.map +1 -1
  284. package/build/cjs/trpc.js +19 -39
  285. package/build/cjs/trpc.js.map +1 -1
  286. package/build/cjs/utils/aggregate-errors.js +18 -62
  287. package/build/cjs/utils/aggregate-errors.js.map +1 -1
  288. package/build/cjs/utils/ai/providerSkip.js +3 -50
  289. package/build/cjs/utils/ai/providerSkip.js.map +1 -1
  290. package/build/cjs/utils/anr.js +7 -36
  291. package/build/cjs/utils/anr.js.map +1 -1
  292. package/build/cjs/utils/baggage.js +37 -146
  293. package/build/cjs/utils/baggage.js.map +1 -1
  294. package/build/cjs/utils/breadcrumb-log-level.js +5 -9
  295. package/build/cjs/utils/breadcrumb-log-level.js.map +1 -1
  296. package/build/cjs/utils/browser.js +24 -86
  297. package/build/cjs/utils/browser.js.map +1 -1
  298. package/build/cjs/utils/chain-and-copy-promiselike.js +10 -27
  299. package/build/cjs/utils/chain-and-copy-promiselike.js.map +1 -1
  300. package/build/cjs/utils/clientreport.js +4 -13
  301. package/build/cjs/utils/clientreport.js.map +1 -1
  302. package/build/cjs/utils/cookie.js +6 -53
  303. package/build/cjs/utils/cookie.js.map +1 -1
  304. package/build/cjs/utils/data-collection/defaultPiiToCollectionOptions.js +28 -0
  305. package/build/cjs/utils/data-collection/defaultPiiToCollectionOptions.js.map +1 -0
  306. package/build/cjs/utils/data-collection/filterCookies.js +23 -0
  307. package/build/cjs/utils/data-collection/filterCookies.js.map +1 -0
  308. package/build/cjs/utils/data-collection/filterKeyValueData.js +43 -0
  309. package/build/cjs/utils/data-collection/filterKeyValueData.js.map +1 -0
  310. package/build/cjs/utils/data-collection/filterQueryParams.js +26 -0
  311. package/build/cjs/utils/data-collection/filterQueryParams.js.map +1 -0
  312. package/build/cjs/utils/data-collection/filtering-snippets.js +61 -0
  313. package/build/cjs/utils/data-collection/filtering-snippets.js.map +1 -0
  314. package/build/cjs/utils/data-collection/resolveDataCollectionOptions.js +37 -0
  315. package/build/cjs/utils/data-collection/resolveDataCollectionOptions.js.map +1 -0
  316. package/build/cjs/utils/debounce.js +5 -32
  317. package/build/cjs/utils/debounce.js.map +1 -1
  318. package/build/cjs/utils/debug-ids.js +4 -42
  319. package/build/cjs/utils/debug-ids.js.map +1 -1
  320. package/build/cjs/utils/debug-logger.js +23 -56
  321. package/build/cjs/utils/debug-logger.js.map +1 -1
  322. package/build/cjs/utils/dsn.js +18 -81
  323. package/build/cjs/utils/dsn.js.map +1 -1
  324. package/build/cjs/utils/env.js +3 -27
  325. package/build/cjs/utils/env.js.map +1 -1
  326. package/build/cjs/utils/envToBool.js +2 -15
  327. package/build/cjs/utils/envToBool.js.map +1 -1
  328. package/build/cjs/utils/envelope.js +39 -133
  329. package/build/cjs/utils/envelope.js.map +1 -1
  330. package/build/cjs/utils/error.js +3 -10
  331. package/build/cjs/utils/error.js.map +1 -1
  332. package/build/cjs/utils/eventUtils.js +0 -8
  333. package/build/cjs/utils/eventUtils.js.map +1 -1
  334. package/build/cjs/utils/eventbuilder.js +30 -114
  335. package/build/cjs/utils/eventbuilder.js.map +1 -1
  336. package/build/cjs/utils/exports.js +5 -24
  337. package/build/cjs/utils/exports.js.map +1 -1
  338. package/build/cjs/utils/featureFlags.js +10 -96
  339. package/build/cjs/utils/featureFlags.js.map +1 -1
  340. package/build/cjs/utils/flushIfServerless.js +14 -48
  341. package/build/cjs/utils/flushIfServerless.js.map +1 -1
  342. package/build/cjs/utils/get-default-export.js +1 -25
  343. package/build/cjs/utils/get-default-export.js.map +1 -1
  344. package/build/cjs/utils/handleCallbackErrors.js +10 -48
  345. package/build/cjs/utils/handleCallbackErrors.js.map +1 -1
  346. package/build/cjs/utils/hasSpansEnabled.js +4 -28
  347. package/build/cjs/utils/hasSpansEnabled.js.map +1 -1
  348. package/build/cjs/utils/ipAddress.js +7 -19
  349. package/build/cjs/utils/ipAddress.js.map +1 -1
  350. package/build/cjs/utils/is.js +18 -163
  351. package/build/cjs/utils/is.js.map +1 -1
  352. package/build/cjs/utils/isBrowser.js +3 -9
  353. package/build/cjs/utils/isBrowser.js.map +1 -1
  354. package/build/cjs/utils/isSentryRequestUrl.js +2 -19
  355. package/build/cjs/utils/isSentryRequestUrl.js.map +1 -1
  356. package/build/cjs/utils/lru.js +13 -24
  357. package/build/cjs/utils/lru.js.map +1 -1
  358. package/build/cjs/utils/merge.js +1 -17
  359. package/build/cjs/utils/merge.js.map +1 -1
  360. package/build/cjs/utils/meta.js +1 -24
  361. package/build/cjs/utils/meta.js.map +1 -1
  362. package/build/cjs/utils/misc.js +31 -134
  363. package/build/cjs/utils/misc.js.map +1 -1
  364. package/build/cjs/utils/node-stack-trace.js +22 -61
  365. package/build/cjs/utils/node-stack-trace.js.map +1 -1
  366. package/build/cjs/utils/node.js +3 -48
  367. package/build/cjs/utils/node.js.map +1 -1
  368. package/build/cjs/utils/normalizationHints.js +5 -18
  369. package/build/cjs/utils/normalizationHints.js.map +1 -1
  370. package/build/cjs/utils/normalize.js +39 -205
  371. package/build/cjs/utils/normalize.js.map +1 -1
  372. package/build/cjs/utils/object.js +33 -168
  373. package/build/cjs/utils/object.js.map +1 -1
  374. package/build/cjs/utils/parameterize.js +2 -21
  375. package/build/cjs/utils/parameterize.js.map +1 -1
  376. package/build/cjs/utils/parseSampleRate.js +4 -13
  377. package/build/cjs/utils/parseSampleRate.js.map +1 -1
  378. package/build/cjs/utils/path.js +28 -115
  379. package/build/cjs/utils/path.js.map +1 -1
  380. package/build/cjs/utils/prepareEvent.js +53 -191
  381. package/build/cjs/utils/prepareEvent.js.map +1 -1
  382. package/build/cjs/utils/promisebuffer.js +5 -47
  383. package/build/cjs/utils/promisebuffer.js.map +1 -1
  384. package/build/cjs/utils/propagationContext.js +0 -7
  385. package/build/cjs/utils/propagationContext.js.map +1 -1
  386. package/build/cjs/utils/randomSafeContext.js +3 -22
  387. package/build/cjs/utils/randomSafeContext.js.map +1 -1
  388. package/build/cjs/utils/ratelimit.js +13 -66
  389. package/build/cjs/utils/ratelimit.js.map +1 -1
  390. package/build/cjs/utils/request.js +62 -269
  391. package/build/cjs/utils/request.js.map +1 -1
  392. package/build/cjs/utils/scopeData.js +15 -79
  393. package/build/cjs/utils/scopeData.js.map +1 -1
  394. package/build/cjs/utils/sdkMetadata.js +5 -19
  395. package/build/cjs/utils/sdkMetadata.js.map +1 -1
  396. package/build/cjs/utils/severity.js +1 -9
  397. package/build/cjs/utils/severity.js.map +1 -1
  398. package/build/cjs/utils/should-ignore-span.js +6 -38
  399. package/build/cjs/utils/should-ignore-span.js.map +1 -1
  400. package/build/cjs/utils/spanOnScope.js +3 -14
  401. package/build/cjs/utils/spanOnScope.js.map +1 -1
  402. package/build/cjs/utils/spanUtils.js +42 -222
  403. package/build/cjs/utils/spanUtils.js.map +1 -1
  404. package/build/cjs/utils/stacktrace.js +19 -106
  405. package/build/cjs/utils/stacktrace.js.map +1 -1
  406. package/build/cjs/utils/string.js +7 -75
  407. package/build/cjs/utils/string.js.map +1 -1
  408. package/build/cjs/utils/supports.js +14 -99
  409. package/build/cjs/utils/supports.js.map +1 -1
  410. package/build/cjs/utils/syncpromise.js +19 -68
  411. package/build/cjs/utils/syncpromise.js.map +1 -1
  412. package/build/cjs/utils/time.js +7 -84
  413. package/build/cjs/utils/time.js.map +1 -1
  414. package/build/cjs/utils/timer.js +1 -10
  415. package/build/cjs/utils/timer.js.map +1 -1
  416. package/build/cjs/utils/timestampSequence.js +5 -21
  417. package/build/cjs/utils/timestampSequence.js.map +1 -1
  418. package/build/cjs/utils/trace-info.js +3 -10
  419. package/build/cjs/utils/trace-info.js.map +1 -1
  420. package/build/cjs/utils/traceData.js +4 -39
  421. package/build/cjs/utils/traceData.js.map +1 -1
  422. package/build/cjs/utils/tracePropagationTargets.js +4 -18
  423. package/build/cjs/utils/tracePropagationTargets.js.map +1 -1
  424. package/build/cjs/utils/tracing.js +32 -106
  425. package/build/cjs/utils/tracing.js.map +1 -1
  426. package/build/cjs/utils/transactionEvent.js +11 -19
  427. package/build/cjs/utils/transactionEvent.js.map +1 -1
  428. package/build/cjs/utils/tunnel.js +12 -33
  429. package/build/cjs/utils/tunnel.js.map +1 -1
  430. package/build/cjs/utils/url.js +42 -176
  431. package/build/cjs/utils/url.js.map +1 -1
  432. package/build/cjs/utils/vercelWaitUntil.js +4 -12
  433. package/build/cjs/utils/vercelWaitUntil.js.map +1 -1
  434. package/build/cjs/utils/version.js +1 -3
  435. package/build/cjs/utils/version.js.map +1 -1
  436. package/build/cjs/utils/weakRef.js +5 -36
  437. package/build/cjs/utils/weakRef.js.map +1 -1
  438. package/build/cjs/utils/worldwide.js +1 -4
  439. package/build/cjs/utils/worldwide.js.map +1 -1
  440. package/build/cjs/vendor/escapeStringForRegex.js +1 -32
  441. package/build/cjs/vendor/escapeStringForRegex.js.map +1 -1
  442. package/build/cjs/vendor/getIpAddress.js +19 -99
  443. package/build/cjs/vendor/getIpAddress.js.map +1 -1
  444. package/build/esm/api.js +10 -34
  445. package/build/esm/api.js.map +1 -1
  446. package/build/esm/asyncContext/index.js +0 -14
  447. package/build/esm/asyncContext/index.js.map +1 -1
  448. package/build/esm/asyncContext/stackStrategy.js +16 -47
  449. package/build/esm/asyncContext/stackStrategy.js.map +1 -1
  450. package/build/esm/attributes.js +17 -95
  451. package/build/esm/attributes.js.map +1 -1
  452. package/build/esm/breadcrumbs.js +2 -22
  453. package/build/esm/breadcrumbs.js.map +1 -1
  454. package/build/esm/browser.js +5 -1
  455. package/build/esm/browser.js.map +1 -1
  456. package/build/esm/carrier.js +5 -42
  457. package/build/esm/carrier.js.map +1 -1
  458. package/build/esm/checkin.js +5 -19
  459. package/build/esm/checkin.js.map +1 -1
  460. package/build/esm/client.js +216 -585
  461. package/build/esm/client.js.map +1 -1
  462. package/build/esm/constants.js +2 -2
  463. package/build/esm/currentScopes.js +5 -86
  464. package/build/esm/currentScopes.js.map +1 -1
  465. package/build/esm/debug-build.js +0 -5
  466. package/build/esm/debug-build.js.map +1 -1
  467. package/build/esm/defaultScopes.js +2 -5
  468. package/build/esm/defaultScopes.js.map +1 -1
  469. package/build/esm/envelope.js +32 -103
  470. package/build/esm/envelope.js.map +1 -1
  471. package/build/esm/eventProcessors.js +4 -23
  472. package/build/esm/eventProcessors.js.map +1 -1
  473. package/build/esm/exports.js +21 -197
  474. package/build/esm/exports.js.map +1 -1
  475. package/build/esm/feedback.js +7 -19
  476. package/build/esm/feedback.js.map +1 -1
  477. package/build/esm/fetch.js +66 -201
  478. package/build/esm/fetch.js.map +1 -1
  479. package/build/esm/index.js +7 -1
  480. package/build/esm/index.js.map +1 -1
  481. package/build/esm/instrument/console.js +9 -41
  482. package/build/esm/instrument/console.js.map +1 -1
  483. package/build/esm/instrument/fetch.js +47 -156
  484. package/build/esm/instrument/fetch.js.map +1 -1
  485. package/build/esm/instrument/globalError.js +4 -25
  486. package/build/esm/instrument/globalError.js.map +1 -1
  487. package/build/esm/instrument/globalUnhandledRejection.js +4 -21
  488. package/build/esm/instrument/globalUnhandledRejection.js.map +1 -1
  489. package/build/esm/instrument/handlers.js +9 -21
  490. package/build/esm/instrument/handlers.js.map +1 -1
  491. package/build/esm/integration.js +13 -77
  492. package/build/esm/integration.js.map +1 -1
  493. package/build/esm/integrations/captureconsole.js +16 -40
  494. package/build/esm/integrations/captureconsole.js.map +1 -1
  495. package/build/esm/integrations/consola.js +57 -163
  496. package/build/esm/integrations/consola.js.map +1 -1
  497. package/build/esm/integrations/console.js +11 -43
  498. package/build/esm/integrations/console.js.map +1 -1
  499. package/build/esm/integrations/conversationId.js +5 -22
  500. package/build/esm/integrations/conversationId.js.map +1 -1
  501. package/build/esm/integrations/dedupe.js +16 -74
  502. package/build/esm/integrations/dedupe.js.map +1 -1
  503. package/build/esm/integrations/eventFilters.js +63 -114
  504. package/build/esm/integrations/eventFilters.js.map +1 -1
  505. package/build/esm/integrations/express/index.js +30 -145
  506. package/build/esm/integrations/express/index.js.map +1 -1
  507. package/build/esm/integrations/express/patch-layer.js +20 -130
  508. package/build/esm/integrations/express/patch-layer.js.map +1 -1
  509. package/build/esm/integrations/express/request-layer-store.js +1 -3
  510. package/build/esm/integrations/express/request-layer-store.js.map +1 -1
  511. package/build/esm/integrations/express/set-sdk-processing-metadata.js +0 -2
  512. package/build/esm/integrations/express/set-sdk-processing-metadata.js.map +1 -1
  513. package/build/esm/integrations/express/types.js +6 -7
  514. package/build/esm/integrations/express/types.js.map +1 -1
  515. package/build/esm/integrations/express/utils.js +37 -145
  516. package/build/esm/integrations/express/utils.js.map +1 -1
  517. package/build/esm/integrations/extraerrordata.js +24 -69
  518. package/build/esm/integrations/extraerrordata.js.map +1 -1
  519. package/build/esm/integrations/featureFlags/featureFlagsIntegration.js +3 -29
  520. package/build/esm/integrations/featureFlags/featureFlagsIntegration.js.map +1 -1
  521. package/build/esm/integrations/featureFlags/growthbook.js +11 -40
  522. package/build/esm/integrations/featureFlags/growthbook.js.map +1 -1
  523. package/build/esm/integrations/functiontostring.js +6 -27
  524. package/build/esm/integrations/functiontostring.js.map +1 -1
  525. package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js +10 -18
  526. package/build/esm/integrations/http/add-outgoing-request-breadcrumb.js.map +1 -1
  527. package/build/esm/integrations/http/client-patch.js +8 -70
  528. package/build/esm/integrations/http/client-patch.js.map +1 -1
  529. package/build/esm/integrations/http/client-subscriptions.js +22 -59
  530. package/build/esm/integrations/http/client-subscriptions.js.map +1 -1
  531. package/build/esm/integrations/http/constants.js +3 -3
  532. package/build/esm/integrations/http/double-wrap-warning.js +10 -18
  533. package/build/esm/integrations/http/double-wrap-warning.js.map +1 -1
  534. package/build/esm/integrations/http/get-outgoing-span-data.js +30 -47
  535. package/build/esm/integrations/http/get-outgoing-span-data.js.map +1 -1
  536. package/build/esm/integrations/http/get-request-url.js +7 -24
  537. package/build/esm/integrations/http/get-request-url.js.map +1 -1
  538. package/build/esm/integrations/http/inject-trace-propagation-headers.js +14 -38
  539. package/build/esm/integrations/http/inject-trace-propagation-headers.js.map +1 -1
  540. package/build/esm/integrations/http/patch-request-to-capture-body.js +78 -0
  541. package/build/esm/integrations/http/patch-request-to-capture-body.js.map +1 -0
  542. package/build/esm/integrations/http/record-request-session.js +59 -0
  543. package/build/esm/integrations/http/record-request-session.js.map +1 -0
  544. package/build/esm/integrations/http/server-subscription.js +285 -0
  545. package/build/esm/integrations/http/server-subscription.js.map +1 -0
  546. package/build/esm/integrations/linkederrors.js +6 -11
  547. package/build/esm/integrations/linkederrors.js.map +1 -1
  548. package/build/esm/integrations/mcp-server/attributeExtraction.js +26 -69
  549. package/build/esm/integrations/mcp-server/attributeExtraction.js.map +1 -1
  550. package/build/esm/integrations/mcp-server/attributes.js +30 -138
  551. package/build/esm/integrations/mcp-server/attributes.js.map +1 -1
  552. package/build/esm/integrations/mcp-server/correlation.js +20 -91
  553. package/build/esm/integrations/mcp-server/correlation.js.map +1 -1
  554. package/build/esm/integrations/mcp-server/errorCapture.js +6 -25
  555. package/build/esm/integrations/mcp-server/errorCapture.js.map +1 -1
  556. package/build/esm/integrations/mcp-server/handlers.js +55 -169
  557. package/build/esm/integrations/mcp-server/handlers.js.map +1 -1
  558. package/build/esm/integrations/mcp-server/index.js +7 -60
  559. package/build/esm/integrations/mcp-server/index.js.map +1 -1
  560. package/build/esm/integrations/mcp-server/methodConfig.js +21 -59
  561. package/build/esm/integrations/mcp-server/methodConfig.js.map +1 -1
  562. package/build/esm/integrations/mcp-server/piiFiltering.js +5 -33
  563. package/build/esm/integrations/mcp-server/piiFiltering.js.map +1 -1
  564. package/build/esm/integrations/mcp-server/resultExtraction.js +20 -76
  565. package/build/esm/integrations/mcp-server/resultExtraction.js.map +1 -1
  566. package/build/esm/integrations/mcp-server/sessionExtraction.js +30 -121
  567. package/build/esm/integrations/mcp-server/sessionExtraction.js.map +1 -1
  568. package/build/esm/integrations/mcp-server/sessionManagement.js +2 -60
  569. package/build/esm/integrations/mcp-server/sessionManagement.js.map +1 -1
  570. package/build/esm/integrations/mcp-server/spans.js +20 -107
  571. package/build/esm/integrations/mcp-server/spans.js.map +1 -1
  572. package/build/esm/integrations/mcp-server/transport.js +26 -94
  573. package/build/esm/integrations/mcp-server/transport.js.map +1 -1
  574. package/build/esm/integrations/mcp-server/validation.js +6 -72
  575. package/build/esm/integrations/mcp-server/validation.js.map +1 -1
  576. package/build/esm/integrations/moduleMetadata.js +6 -20
  577. package/build/esm/integrations/moduleMetadata.js.map +1 -1
  578. package/build/esm/integrations/postgresjs.js +78 -287
  579. package/build/esm/integrations/postgresjs.js.map +1 -1
  580. package/build/esm/integrations/requestdata.js +30 -93
  581. package/build/esm/integrations/requestdata.js.map +1 -1
  582. package/build/esm/integrations/rewriteframes.js +14 -45
  583. package/build/esm/integrations/rewriteframes.js.map +1 -1
  584. package/build/esm/integrations/spanStreaming.js +9 -15
  585. package/build/esm/integrations/spanStreaming.js.map +1 -1
  586. package/build/esm/integrations/supabase.js +224 -333
  587. package/build/esm/integrations/supabase.js.map +1 -1
  588. package/build/esm/integrations/third-party-errors-filter.js +60 -85
  589. package/build/esm/integrations/third-party-errors-filter.js.map +1 -1
  590. package/build/esm/integrations/zoderrors.js +35 -111
  591. package/build/esm/integrations/zoderrors.js.map +1 -1
  592. package/build/esm/logs/console-integration.js +15 -50
  593. package/build/esm/logs/console-integration.js.map +1 -1
  594. package/build/esm/logs/constants.js +1 -6
  595. package/build/esm/logs/constants.js.map +1 -1
  596. package/build/esm/logs/envelope.js +10 -40
  597. package/build/esm/logs/envelope.js.map +1 -1
  598. package/build/esm/logs/internal.js +53 -126
  599. package/build/esm/logs/internal.js.map +1 -1
  600. package/build/esm/logs/public-api.js +13 -228
  601. package/build/esm/logs/public-api.js.map +1 -1
  602. package/build/esm/logs/utils.js +6 -47
  603. package/build/esm/logs/utils.js.map +1 -1
  604. package/build/esm/metadata.js +6 -51
  605. package/build/esm/metadata.js.map +1 -1
  606. package/build/esm/metrics/envelope.js +12 -45
  607. package/build/esm/metrics/envelope.js.map +1 -1
  608. package/build/esm/metrics/internal.js +31 -144
  609. package/build/esm/metrics/internal.js.map +1 -1
  610. package/build/esm/metrics/public-api.js +4 -109
  611. package/build/esm/metrics/public-api.js.map +1 -1
  612. package/build/esm/package.json +1 -1
  613. package/build/esm/profiling.js +11 -41
  614. package/build/esm/profiling.js.map +1 -1
  615. package/build/esm/scope.js +73 -224
  616. package/build/esm/scope.js.map +1 -1
  617. package/build/esm/sdk.js +2 -21
  618. package/build/esm/sdk.js.map +1 -1
  619. package/build/esm/semanticAttributes.js +31 -118
  620. package/build/esm/semanticAttributes.js.map +1 -1
  621. package/build/esm/server-runtime-client.js +32 -87
  622. package/build/esm/server-runtime-client.js.map +1 -1
  623. package/build/esm/server.js +7 -1
  624. package/build/esm/server.js.map +1 -1
  625. package/build/esm/session.js +14 -67
  626. package/build/esm/session.js.map +1 -1
  627. package/build/esm/tracing/ai/gen-ai-attributes.js +45 -249
  628. package/build/esm/tracing/ai/gen-ai-attributes.js.map +1 -1
  629. package/build/esm/tracing/ai/mediaStripping.js +21 -116
  630. package/build/esm/tracing/ai/mediaStripping.js.map +1 -1
  631. package/build/esm/tracing/ai/messageTruncation.js +26 -212
  632. package/build/esm/tracing/ai/messageTruncation.js.map +1 -1
  633. package/build/esm/tracing/ai/utils.js +40 -180
  634. package/build/esm/tracing/ai/utils.js.map +1 -1
  635. package/build/esm/tracing/anthropic-ai/constants.js +9 -12
  636. package/build/esm/tracing/anthropic-ai/constants.js.map +1 -1
  637. package/build/esm/tracing/anthropic-ai/index.js +67 -172
  638. package/build/esm/tracing/anthropic-ai/index.js.map +1 -1
  639. package/build/esm/tracing/anthropic-ai/streaming.js +45 -149
  640. package/build/esm/tracing/anthropic-ai/streaming.js.map +1 -1
  641. package/build/esm/tracing/anthropic-ai/utils.js +17 -47
  642. package/build/esm/tracing/anthropic-ai/utils.js.map +1 -1
  643. package/build/esm/tracing/dynamicSamplingContext.js +18 -85
  644. package/build/esm/tracing/dynamicSamplingContext.js.map +1 -1
  645. package/build/esm/tracing/errors.js +2 -14
  646. package/build/esm/tracing/errors.js.map +1 -1
  647. package/build/esm/tracing/google-genai/constants.js +9 -16
  648. package/build/esm/tracing/google-genai/constants.js.map +1 -1
  649. package/build/esm/tracing/google-genai/index.js +79 -223
  650. package/build/esm/tracing/google-genai/index.js.map +1 -1
  651. package/build/esm/tracing/google-genai/streaming.js +11 -56
  652. package/build/esm/tracing/google-genai/streaming.js.map +1 -1
  653. package/build/esm/tracing/google-genai/utils.js +8 -13
  654. package/build/esm/tracing/google-genai/utils.js.map +1 -1
  655. package/build/esm/tracing/idleSpan.js +48 -174
  656. package/build/esm/tracing/idleSpan.js.map +1 -1
  657. package/build/esm/tracing/langchain/constants.js +8 -9
  658. package/build/esm/tracing/langchain/constants.js.map +1 -1
  659. package/build/esm/tracing/langchain/embeddings.js +31 -75
  660. package/build/esm/tracing/langchain/embeddings.js.map +1 -1
  661. package/build/esm/tracing/langchain/index.js +64 -161
  662. package/build/esm/tracing/langchain/index.js.map +1 -1
  663. package/build/esm/tracing/langchain/utils.js +101 -312
  664. package/build/esm/tracing/langchain/utils.js.map +1 -1
  665. package/build/esm/tracing/langgraph/constants.js +2 -2
  666. package/build/esm/tracing/langgraph/index.js +59 -162
  667. package/build/esm/tracing/langgraph/index.js.map +1 -1
  668. package/build/esm/tracing/langgraph/utils.js +54 -170
  669. package/build/esm/tracing/langgraph/utils.js.map +1 -1
  670. package/build/esm/tracing/logSpans.js +10 -26
  671. package/build/esm/tracing/logSpans.js.map +1 -1
  672. package/build/esm/tracing/measurement.js +6 -18
  673. package/build/esm/tracing/measurement.js.map +1 -1
  674. package/build/esm/tracing/openai/constants.js +20 -24
  675. package/build/esm/tracing/openai/constants.js.map +1 -1
  676. package/build/esm/tracing/openai/index.js +52 -132
  677. package/build/esm/tracing/openai/index.js.map +1 -1
  678. package/build/esm/tracing/openai/streaming.js +24 -102
  679. package/build/esm/tracing/openai/streaming.js.map +1 -1
  680. package/build/esm/tracing/openai/utils.js +36 -107
  681. package/build/esm/tracing/openai/utils.js.map +1 -1
  682. package/build/esm/tracing/sampling.js +23 -63
  683. package/build/esm/tracing/sampling.js.map +1 -1
  684. package/build/esm/tracing/sentryNonRecordingSpan.js +15 -40
  685. package/build/esm/tracing/sentryNonRecordingSpan.js.map +1 -1
  686. package/build/esm/tracing/sentrySpan.js +66 -172
  687. package/build/esm/tracing/sentrySpan.js.map +1 -1
  688. package/build/esm/tracing/spans/beforeSendSpan.js +4 -32
  689. package/build/esm/tracing/spans/beforeSendSpan.js.map +1 -1
  690. package/build/esm/tracing/spans/captureSpan.js +59 -157
  691. package/build/esm/tracing/spans/captureSpan.js.map +1 -1
  692. package/build/esm/tracing/spans/envelope.js +12 -24
  693. package/build/esm/tracing/spans/envelope.js.map +1 -1
  694. package/build/esm/tracing/spans/estimateSize.js +0 -22
  695. package/build/esm/tracing/spans/estimateSize.js.map +1 -1
  696. package/build/esm/tracing/spans/extractGenAiSpans.js +11 -33
  697. package/build/esm/tracing/spans/extractGenAiSpans.js.map +1 -1
  698. package/build/esm/tracing/spans/hasSpanStreamingEnabled.js +1 -4
  699. package/build/esm/tracing/spans/hasSpanStreamingEnabled.js.map +1 -1
  700. package/build/esm/tracing/spans/scopeContextAttributes.js +56 -0
  701. package/build/esm/tracing/spans/scopeContextAttributes.js.map +1 -0
  702. package/build/esm/tracing/spans/spanBuffer.js +21 -71
  703. package/build/esm/tracing/spans/spanBuffer.js.map +1 -1
  704. package/build/esm/tracing/spans/spanJsonToStreamedSpan.js +4 -8
  705. package/build/esm/tracing/spans/spanJsonToStreamedSpan.js.map +1 -1
  706. package/build/esm/tracing/spanstatus.js +15 -32
  707. package/build/esm/tracing/spanstatus.js.map +1 -1
  708. package/build/esm/tracing/trace.js +95 -311
  709. package/build/esm/tracing/trace.js.map +1 -1
  710. package/build/esm/tracing/utils.js +4 -14
  711. package/build/esm/tracing/utils.js.map +1 -1
  712. package/build/esm/tracing/vercel-ai/constants.js +15 -26
  713. package/build/esm/tracing/vercel-ai/constants.js.map +1 -1
  714. package/build/esm/tracing/vercel-ai/index.js +84 -288
  715. package/build/esm/tracing/vercel-ai/index.js.map +1 -1
  716. package/build/esm/tracing/vercel-ai/utils.js +30 -128
  717. package/build/esm/tracing/vercel-ai/utils.js.map +1 -1
  718. package/build/esm/tracing/vercel-ai/vercel-ai-attributes.js +22 -229
  719. package/build/esm/tracing/vercel-ai/vercel-ai-attributes.js.map +1 -1
  720. package/build/esm/transports/base.js +32 -67
  721. package/build/esm/transports/base.js.map +1 -1
  722. package/build/esm/transports/multiplexed.js +38 -103
  723. package/build/esm/transports/multiplexed.js.map +1 -1
  724. package/build/esm/transports/offline.js +31 -72
  725. package/build/esm/transports/offline.js.map +1 -1
  726. package/build/esm/transports/userAgent.js +4 -13
  727. package/build/esm/transports/userAgent.js.map +1 -1
  728. package/build/esm/trpc.js +19 -39
  729. package/build/esm/trpc.js.map +1 -1
  730. package/build/esm/utils/aggregate-errors.js +18 -62
  731. package/build/esm/utils/aggregate-errors.js.map +1 -1
  732. package/build/esm/utils/ai/providerSkip.js +3 -50
  733. package/build/esm/utils/ai/providerSkip.js.map +1 -1
  734. package/build/esm/utils/anr.js +7 -36
  735. package/build/esm/utils/anr.js.map +1 -1
  736. package/build/esm/utils/baggage.js +37 -146
  737. package/build/esm/utils/baggage.js.map +1 -1
  738. package/build/esm/utils/breadcrumb-log-level.js +5 -9
  739. package/build/esm/utils/breadcrumb-log-level.js.map +1 -1
  740. package/build/esm/utils/browser.js +24 -86
  741. package/build/esm/utils/browser.js.map +1 -1
  742. package/build/esm/utils/chain-and-copy-promiselike.js +10 -27
  743. package/build/esm/utils/chain-and-copy-promiselike.js.map +1 -1
  744. package/build/esm/utils/clientreport.js +4 -13
  745. package/build/esm/utils/clientreport.js.map +1 -1
  746. package/build/esm/utils/cookie.js +6 -53
  747. package/build/esm/utils/cookie.js.map +1 -1
  748. package/build/esm/utils/data-collection/defaultPiiToCollectionOptions.js +26 -0
  749. package/build/esm/utils/data-collection/defaultPiiToCollectionOptions.js.map +1 -0
  750. package/build/esm/utils/data-collection/filterCookies.js +21 -0
  751. package/build/esm/utils/data-collection/filterCookies.js.map +1 -0
  752. package/build/esm/utils/data-collection/filterKeyValueData.js +41 -0
  753. package/build/esm/utils/data-collection/filterKeyValueData.js.map +1 -0
  754. package/build/esm/utils/data-collection/filterQueryParams.js +24 -0
  755. package/build/esm/utils/data-collection/filterQueryParams.js.map +1 -0
  756. package/build/esm/utils/data-collection/filtering-snippets.js +56 -0
  757. package/build/esm/utils/data-collection/filtering-snippets.js.map +1 -0
  758. package/build/esm/utils/data-collection/resolveDataCollectionOptions.js +35 -0
  759. package/build/esm/utils/data-collection/resolveDataCollectionOptions.js.map +1 -0
  760. package/build/esm/utils/debounce.js +5 -32
  761. package/build/esm/utils/debounce.js.map +1 -1
  762. package/build/esm/utils/debug-ids.js +4 -42
  763. package/build/esm/utils/debug-ids.js.map +1 -1
  764. package/build/esm/utils/debug-logger.js +23 -56
  765. package/build/esm/utils/debug-logger.js.map +1 -1
  766. package/build/esm/utils/dsn.js +18 -81
  767. package/build/esm/utils/dsn.js.map +1 -1
  768. package/build/esm/utils/env.js +3 -27
  769. package/build/esm/utils/env.js.map +1 -1
  770. package/build/esm/utils/envToBool.js +2 -15
  771. package/build/esm/utils/envToBool.js.map +1 -1
  772. package/build/esm/utils/envelope.js +39 -133
  773. package/build/esm/utils/envelope.js.map +1 -1
  774. package/build/esm/utils/error.js +3 -10
  775. package/build/esm/utils/error.js.map +1 -1
  776. package/build/esm/utils/eventUtils.js +0 -8
  777. package/build/esm/utils/eventUtils.js.map +1 -1
  778. package/build/esm/utils/eventbuilder.js +30 -114
  779. package/build/esm/utils/eventbuilder.js.map +1 -1
  780. package/build/esm/utils/exports.js +5 -24
  781. package/build/esm/utils/exports.js.map +1 -1
  782. package/build/esm/utils/featureFlags.js +10 -96
  783. package/build/esm/utils/featureFlags.js.map +1 -1
  784. package/build/esm/utils/flushIfServerless.js +14 -48
  785. package/build/esm/utils/flushIfServerless.js.map +1 -1
  786. package/build/esm/utils/get-default-export.js +1 -25
  787. package/build/esm/utils/get-default-export.js.map +1 -1
  788. package/build/esm/utils/handleCallbackErrors.js +10 -48
  789. package/build/esm/utils/handleCallbackErrors.js.map +1 -1
  790. package/build/esm/utils/hasSpansEnabled.js +4 -28
  791. package/build/esm/utils/hasSpansEnabled.js.map +1 -1
  792. package/build/esm/utils/ipAddress.js +7 -19
  793. package/build/esm/utils/ipAddress.js.map +1 -1
  794. package/build/esm/utils/is.js +18 -163
  795. package/build/esm/utils/is.js.map +1 -1
  796. package/build/esm/utils/isBrowser.js +3 -9
  797. package/build/esm/utils/isBrowser.js.map +1 -1
  798. package/build/esm/utils/isSentryRequestUrl.js +2 -19
  799. package/build/esm/utils/isSentryRequestUrl.js.map +1 -1
  800. package/build/esm/utils/lru.js +13 -24
  801. package/build/esm/utils/lru.js.map +1 -1
  802. package/build/esm/utils/merge.js +1 -17
  803. package/build/esm/utils/merge.js.map +1 -1
  804. package/build/esm/utils/meta.js +1 -24
  805. package/build/esm/utils/meta.js.map +1 -1
  806. package/build/esm/utils/misc.js +31 -134
  807. package/build/esm/utils/misc.js.map +1 -1
  808. package/build/esm/utils/node-stack-trace.js +22 -61
  809. package/build/esm/utils/node-stack-trace.js.map +1 -1
  810. package/build/esm/utils/node.js +3 -48
  811. package/build/esm/utils/node.js.map +1 -1
  812. package/build/esm/utils/normalizationHints.js +5 -18
  813. package/build/esm/utils/normalizationHints.js.map +1 -1
  814. package/build/esm/utils/normalize.js +39 -205
  815. package/build/esm/utils/normalize.js.map +1 -1
  816. package/build/esm/utils/object.js +33 -168
  817. package/build/esm/utils/object.js.map +1 -1
  818. package/build/esm/utils/parameterize.js +2 -21
  819. package/build/esm/utils/parameterize.js.map +1 -1
  820. package/build/esm/utils/parseSampleRate.js +4 -13
  821. package/build/esm/utils/parseSampleRate.js.map +1 -1
  822. package/build/esm/utils/path.js +28 -115
  823. package/build/esm/utils/path.js.map +1 -1
  824. package/build/esm/utils/prepareEvent.js +53 -191
  825. package/build/esm/utils/prepareEvent.js.map +1 -1
  826. package/build/esm/utils/promisebuffer.js +5 -47
  827. package/build/esm/utils/promisebuffer.js.map +1 -1
  828. package/build/esm/utils/propagationContext.js +0 -7
  829. package/build/esm/utils/propagationContext.js.map +1 -1
  830. package/build/esm/utils/randomSafeContext.js +3 -22
  831. package/build/esm/utils/randomSafeContext.js.map +1 -1
  832. package/build/esm/utils/ratelimit.js +13 -66
  833. package/build/esm/utils/ratelimit.js.map +1 -1
  834. package/build/esm/utils/request.js +62 -269
  835. package/build/esm/utils/request.js.map +1 -1
  836. package/build/esm/utils/scopeData.js +15 -79
  837. package/build/esm/utils/scopeData.js.map +1 -1
  838. package/build/esm/utils/sdkMetadata.js +5 -19
  839. package/build/esm/utils/sdkMetadata.js.map +1 -1
  840. package/build/esm/utils/severity.js +1 -9
  841. package/build/esm/utils/severity.js.map +1 -1
  842. package/build/esm/utils/should-ignore-span.js +6 -38
  843. package/build/esm/utils/should-ignore-span.js.map +1 -1
  844. package/build/esm/utils/spanOnScope.js +3 -14
  845. package/build/esm/utils/spanOnScope.js.map +1 -1
  846. package/build/esm/utils/spanUtils.js +42 -222
  847. package/build/esm/utils/spanUtils.js.map +1 -1
  848. package/build/esm/utils/stacktrace.js +19 -106
  849. package/build/esm/utils/stacktrace.js.map +1 -1
  850. package/build/esm/utils/string.js +7 -75
  851. package/build/esm/utils/string.js.map +1 -1
  852. package/build/esm/utils/supports.js +14 -99
  853. package/build/esm/utils/supports.js.map +1 -1
  854. package/build/esm/utils/syncpromise.js +19 -68
  855. package/build/esm/utils/syncpromise.js.map +1 -1
  856. package/build/esm/utils/time.js +7 -84
  857. package/build/esm/utils/time.js.map +1 -1
  858. package/build/esm/utils/timer.js +1 -10
  859. package/build/esm/utils/timer.js.map +1 -1
  860. package/build/esm/utils/timestampSequence.js +5 -21
  861. package/build/esm/utils/timestampSequence.js.map +1 -1
  862. package/build/esm/utils/trace-info.js +3 -10
  863. package/build/esm/utils/trace-info.js.map +1 -1
  864. package/build/esm/utils/traceData.js +4 -39
  865. package/build/esm/utils/traceData.js.map +1 -1
  866. package/build/esm/utils/tracePropagationTargets.js +4 -18
  867. package/build/esm/utils/tracePropagationTargets.js.map +1 -1
  868. package/build/esm/utils/tracing.js +32 -106
  869. package/build/esm/utils/tracing.js.map +1 -1
  870. package/build/esm/utils/transactionEvent.js +11 -19
  871. package/build/esm/utils/transactionEvent.js.map +1 -1
  872. package/build/esm/utils/tunnel.js +12 -33
  873. package/build/esm/utils/tunnel.js.map +1 -1
  874. package/build/esm/utils/url.js +42 -176
  875. package/build/esm/utils/url.js.map +1 -1
  876. package/build/esm/utils/vercelWaitUntil.js +4 -12
  877. package/build/esm/utils/vercelWaitUntil.js.map +1 -1
  878. package/build/esm/utils/version.js +1 -3
  879. package/build/esm/utils/version.js.map +1 -1
  880. package/build/esm/utils/weakRef.js +5 -36
  881. package/build/esm/utils/weakRef.js.map +1 -1
  882. package/build/esm/utils/worldwide.js +1 -4
  883. package/build/esm/utils/worldwide.js.map +1 -1
  884. package/build/esm/vendor/escapeStringForRegex.js +1 -32
  885. package/build/esm/vendor/escapeStringForRegex.js.map +1 -1
  886. package/build/esm/vendor/getIpAddress.js +19 -99
  887. package/build/esm/vendor/getIpAddress.js.map +1 -1
  888. package/build/types/api.d.ts +2 -2
  889. package/build/types/api.d.ts.map +1 -1
  890. package/build/types/attributes.d.ts +5 -8
  891. package/build/types/attributes.d.ts.map +1 -1
  892. package/build/types/breadcrumbs.d.ts +1 -1
  893. package/build/types/breadcrumbs.d.ts.map +1 -1
  894. package/build/types/browser-exports.d.ts +3 -3
  895. package/build/types/browser-exports.d.ts.map +1 -1
  896. package/build/types/carrier.d.ts +2 -2
  897. package/build/types/carrier.d.ts.map +1 -1
  898. package/build/types/checkin.d.ts +4 -4
  899. package/build/types/checkin.d.ts.map +1 -1
  900. package/build/types/client.d.ts +32 -22
  901. package/build/types/client.d.ts.map +1 -1
  902. package/build/types/currentScopes.d.ts +1 -1
  903. package/build/types/currentScopes.d.ts.map +1 -1
  904. package/build/types/envelope.d.ts +7 -7
  905. package/build/types/envelope.d.ts.map +1 -1
  906. package/build/types/eventProcessors.d.ts +2 -2
  907. package/build/types/eventProcessors.d.ts.map +1 -1
  908. package/build/types/exports.d.ts +8 -8
  909. package/build/types/exports.d.ts.map +1 -1
  910. package/build/types/feedback.d.ts +2 -2
  911. package/build/types/feedback.d.ts.map +1 -1
  912. package/build/types/fetch.d.ts +3 -3
  913. package/build/types/fetch.d.ts.map +1 -1
  914. package/build/types/instrument/console.d.ts +1 -1
  915. package/build/types/instrument/console.d.ts.map +1 -1
  916. package/build/types/instrument/fetch.d.ts +1 -1
  917. package/build/types/instrument/fetch.d.ts.map +1 -1
  918. package/build/types/instrument/globalError.d.ts +1 -1
  919. package/build/types/instrument/globalError.d.ts.map +1 -1
  920. package/build/types/instrument/globalUnhandledRejection.d.ts +1 -1
  921. package/build/types/instrument/globalUnhandledRejection.d.ts.map +1 -1
  922. package/build/types/integration.d.ts +2 -2
  923. package/build/types/integration.d.ts.map +1 -1
  924. package/build/types/integrations/consola.d.ts +1 -1
  925. package/build/types/integrations/consola.d.ts.map +1 -1
  926. package/build/types/integrations/console.d.ts +1 -1
  927. package/build/types/integrations/console.d.ts.map +1 -1
  928. package/build/types/integrations/dedupe.d.ts +1 -1
  929. package/build/types/integrations/dedupe.d.ts.map +1 -1
  930. package/build/types/integrations/express/types.d.ts +2 -2
  931. package/build/types/integrations/express/types.d.ts.map +1 -1
  932. package/build/types/integrations/express/utils.d.ts +1 -1
  933. package/build/types/integrations/express/utils.d.ts.map +1 -1
  934. package/build/types/integrations/featureFlags/featureFlagsIntegration.d.ts +1 -1
  935. package/build/types/integrations/featureFlags/featureFlagsIntegration.d.ts.map +1 -1
  936. package/build/types/integrations/featureFlags/growthbook.d.ts +1 -1
  937. package/build/types/integrations/featureFlags/growthbook.d.ts.map +1 -1
  938. package/build/types/integrations/http/double-wrap-warning.d.ts +1 -1
  939. package/build/types/integrations/http/double-wrap-warning.d.ts.map +1 -1
  940. package/build/types/integrations/http/get-outgoing-span-data.d.ts +2 -2
  941. package/build/types/integrations/http/get-outgoing-span-data.d.ts.map +1 -1
  942. package/build/types/integrations/http/patch-request-to-capture-body.d.ts +12 -0
  943. package/build/types/integrations/http/patch-request-to-capture-body.d.ts.map +1 -0
  944. package/build/types/integrations/http/record-request-session.d.ts +18 -0
  945. package/build/types/integrations/http/record-request-session.d.ts.map +1 -0
  946. package/build/types/integrations/http/server-subscription.d.ts +26 -0
  947. package/build/types/integrations/http/server-subscription.d.ts.map +1 -0
  948. package/build/types/integrations/http/types.d.ts +12 -6
  949. package/build/types/integrations/http/types.d.ts.map +1 -1
  950. package/build/types/integrations/mcp-server/correlation.d.ts +1 -1
  951. package/build/types/integrations/mcp-server/correlation.d.ts.map +1 -1
  952. package/build/types/integrations/mcp-server/piiFiltering.d.ts +1 -1
  953. package/build/types/integrations/mcp-server/piiFiltering.d.ts.map +1 -1
  954. package/build/types/integrations/mcp-server/types.d.ts +1 -1
  955. package/build/types/integrations/mcp-server/types.d.ts.map +1 -1
  956. package/build/types/integrations/postgresjs.d.ts +1 -1
  957. package/build/types/integrations/postgresjs.d.ts.map +1 -1
  958. package/build/types/integrations/rewriteframes.d.ts +1 -1
  959. package/build/types/integrations/rewriteframes.d.ts.map +1 -1
  960. package/build/types/integrations/supabase.d.ts +14 -3
  961. package/build/types/integrations/supabase.d.ts.map +1 -1
  962. package/build/types/integrations/third-party-errors-filter.d.ts.map +1 -1
  963. package/build/types/integrations/zoderrors.d.ts +1 -1
  964. package/build/types/integrations/zoderrors.d.ts.map +1 -1
  965. package/build/types/logs/console-integration.d.ts +1 -1
  966. package/build/types/logs/console-integration.d.ts.map +1 -1
  967. package/build/types/logs/constants.d.ts +1 -1
  968. package/build/types/logs/constants.d.ts.map +1 -1
  969. package/build/types/logs/envelope.d.ts +4 -4
  970. package/build/types/logs/envelope.d.ts.map +1 -1
  971. package/build/types/logs/internal.d.ts +16 -1
  972. package/build/types/logs/internal.d.ts.map +1 -1
  973. package/build/types/logs/public-api.d.ts +2 -2
  974. package/build/types/logs/public-api.d.ts.map +1 -1
  975. package/build/types/metadata.d.ts +2 -2
  976. package/build/types/metadata.d.ts.map +1 -1
  977. package/build/types/metrics/envelope.d.ts +4 -4
  978. package/build/types/metrics/envelope.d.ts.map +1 -1
  979. package/build/types/metrics/internal.d.ts +1 -1
  980. package/build/types/metrics/internal.d.ts.map +1 -1
  981. package/build/types/metrics/public-api.d.ts +1 -1
  982. package/build/types/metrics/public-api.d.ts.map +1 -1
  983. package/build/types/profiling.d.ts +1 -1
  984. package/build/types/profiling.d.ts.map +1 -1
  985. package/build/types/report-dialog.d.ts +1 -1
  986. package/build/types/report-dialog.d.ts.map +1 -1
  987. package/build/types/scope.d.ts +14 -14
  988. package/build/types/scope.d.ts.map +1 -1
  989. package/build/types/sdk.d.ts +1 -1
  990. package/build/types/sdk.d.ts.map +1 -1
  991. package/build/types/semanticAttributes.d.ts +2 -0
  992. package/build/types/semanticAttributes.d.ts.map +1 -1
  993. package/build/types/server-exports.d.ts +3 -1
  994. package/build/types/server-exports.d.ts.map +1 -1
  995. package/build/types/server-runtime-client.d.ts +6 -6
  996. package/build/types/server-runtime-client.d.ts.map +1 -1
  997. package/build/types/session.d.ts +1 -1
  998. package/build/types/session.d.ts.map +1 -1
  999. package/build/types/shared-exports.d.ts +58 -53
  1000. package/build/types/shared-exports.d.ts.map +1 -1
  1001. package/build/types/tracing/ai/utils.d.ts +1 -1
  1002. package/build/types/tracing/ai/utils.d.ts.map +1 -1
  1003. package/build/types/tracing/anthropic-ai/streaming.d.ts +1 -1
  1004. package/build/types/tracing/anthropic-ai/streaming.d.ts.map +1 -1
  1005. package/build/types/tracing/anthropic-ai/utils.d.ts +2 -2
  1006. package/build/types/tracing/anthropic-ai/utils.d.ts.map +1 -1
  1007. package/build/types/tracing/dynamicSamplingContext.d.ts +2 -2
  1008. package/build/types/tracing/dynamicSamplingContext.d.ts.map +1 -1
  1009. package/build/types/tracing/google-genai/streaming.d.ts +1 -1
  1010. package/build/types/tracing/google-genai/streaming.d.ts.map +1 -1
  1011. package/build/types/tracing/idleSpan.d.ts +2 -2
  1012. package/build/types/tracing/idleSpan.d.ts.map +1 -1
  1013. package/build/types/tracing/langchain/utils.d.ts +6 -1
  1014. package/build/types/tracing/langchain/utils.d.ts.map +1 -1
  1015. package/build/types/tracing/langgraph/index.d.ts.map +1 -1
  1016. package/build/types/tracing/langgraph/utils.d.ts +1 -3
  1017. package/build/types/tracing/langgraph/utils.d.ts.map +1 -1
  1018. package/build/types/tracing/logSpans.d.ts +1 -1
  1019. package/build/types/tracing/logSpans.d.ts.map +1 -1
  1020. package/build/types/tracing/measurement.d.ts +2 -2
  1021. package/build/types/tracing/measurement.d.ts.map +1 -1
  1022. package/build/types/tracing/openai/streaming.d.ts +1 -1
  1023. package/build/types/tracing/openai/streaming.d.ts.map +1 -1
  1024. package/build/types/tracing/openai/utils.d.ts +1 -1
  1025. package/build/types/tracing/openai/utils.d.ts.map +1 -1
  1026. package/build/types/tracing/sampling.d.ts +2 -2
  1027. package/build/types/tracing/sampling.d.ts.map +1 -1
  1028. package/build/types/tracing/sentryNonRecordingSpan.d.ts +3 -3
  1029. package/build/types/tracing/sentryNonRecordingSpan.d.ts.map +1 -1
  1030. package/build/types/tracing/sentrySpan.d.ts +4 -4
  1031. package/build/types/tracing/sentrySpan.d.ts.map +1 -1
  1032. package/build/types/tracing/spans/beforeSendSpan.d.ts +3 -3
  1033. package/build/types/tracing/spans/beforeSendSpan.d.ts.map +1 -1
  1034. package/build/types/tracing/spans/captureSpan.d.ts +1 -1
  1035. package/build/types/tracing/spans/captureSpan.d.ts.map +1 -1
  1036. package/build/types/tracing/spans/envelope.d.ts +2 -2
  1037. package/build/types/tracing/spans/envelope.d.ts.map +1 -1
  1038. package/build/types/tracing/spans/estimateSize.d.ts +1 -1
  1039. package/build/types/tracing/spans/estimateSize.d.ts.map +1 -1
  1040. package/build/types/tracing/spans/extractGenAiSpans.d.ts +2 -2
  1041. package/build/types/tracing/spans/extractGenAiSpans.d.ts.map +1 -1
  1042. package/build/types/tracing/spans/scopeContextAttributes.d.ts +9 -0
  1043. package/build/types/tracing/spans/scopeContextAttributes.d.ts.map +1 -0
  1044. package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts +1 -1
  1045. package/build/types/tracing/spans/spanJsonToStreamedSpan.d.ts.map +1 -1
  1046. package/build/types/tracing/spanstatus.d.ts +2 -2
  1047. package/build/types/tracing/spanstatus.d.ts.map +1 -1
  1048. package/build/types/tracing/trace.d.ts +2 -2
  1049. package/build/types/tracing/trace.d.ts.map +1 -1
  1050. package/build/types/tracing/utils.d.ts +1 -1
  1051. package/build/types/tracing/utils.d.ts.map +1 -1
  1052. package/build/types/tracing/vercel-ai/utils.d.ts +2 -2
  1053. package/build/types/tracing/vercel-ai/utils.d.ts.map +1 -1
  1054. package/build/types/transports/base.d.ts +1 -1
  1055. package/build/types/transports/base.d.ts.map +1 -1
  1056. package/build/types/transports/multiplexed.d.ts +3 -3
  1057. package/build/types/transports/multiplexed.d.ts.map +1 -1
  1058. package/build/types/transports/offline.d.ts +2 -2
  1059. package/build/types/transports/offline.d.ts.map +1 -1
  1060. package/build/types/transports/userAgent.d.ts +1 -1
  1061. package/build/types/transports/userAgent.d.ts.map +1 -1
  1062. package/build/types/trpc.d.ts.map +1 -1
  1063. package/build/types/types/attachment.d.ts.map +1 -0
  1064. package/build/types/types/breadcrumb.d.ts.map +1 -0
  1065. package/build/types/types/browseroptions.d.ts.map +1 -0
  1066. package/build/types/types/checkin.d.ts.map +1 -0
  1067. package/build/types/types/clientreport.d.ts.map +1 -0
  1068. package/build/types/types/context.d.ts.map +1 -0
  1069. package/build/types/types/csp.d.ts.map +1 -0
  1070. package/build/types/types/datacategory.d.ts.map +1 -0
  1071. package/build/types/types/datacollection.d.ts +75 -0
  1072. package/build/types/types/datacollection.d.ts.map +1 -0
  1073. package/build/types/types/debugMeta.d.ts.map +1 -0
  1074. package/build/types/types/dsn.d.ts.map +1 -0
  1075. package/build/types/types/envelope.d.ts.map +1 -0
  1076. package/build/types/types/error.d.ts.map +1 -0
  1077. package/build/types/types/event.d.ts.map +1 -0
  1078. package/build/types/types/eventprocessor.d.ts.map +1 -0
  1079. package/build/types/types/exception.d.ts.map +1 -0
  1080. package/build/types/types/extra.d.ts.map +1 -0
  1081. package/build/types/types/feedback/config.d.ts.map +1 -0
  1082. package/build/types/types/feedback/form.d.ts.map +1 -0
  1083. package/build/types/types/feedback/index.d.ts.map +1 -0
  1084. package/build/types/types/feedback/sendFeedback.d.ts.map +1 -0
  1085. package/build/types/types/feedback/theme.d.ts.map +1 -0
  1086. package/build/types/types/instrument.d.ts.map +1 -0
  1087. package/build/types/types/integration.d.ts.map +1 -0
  1088. package/build/types/types/link.d.ts.map +1 -0
  1089. package/build/types/types/log.d.ts.map +1 -0
  1090. package/build/types/types/measurement.d.ts.map +1 -0
  1091. package/build/types/types/mechanism.d.ts.map +1 -0
  1092. package/build/types/types/metric.d.ts.map +1 -0
  1093. package/build/types/types/misc.d.ts.map +1 -0
  1094. package/build/types/types/opentelemetry.d.ts.map +1 -0
  1095. package/build/types/{types-hoist → types}/options.d.ts +17 -0
  1096. package/build/types/types/options.d.ts.map +1 -0
  1097. package/build/types/types/package.d.ts.map +1 -0
  1098. package/build/types/types/parameterize.d.ts.map +1 -0
  1099. package/build/types/types/polymorphics.d.ts.map +1 -0
  1100. package/build/types/types/profiling.d.ts.map +1 -0
  1101. package/build/types/types/replay.d.ts.map +1 -0
  1102. package/build/types/types/request.d.ts.map +1 -0
  1103. package/build/types/types/runtime.d.ts.map +1 -0
  1104. package/build/types/{types-hoist → types}/samplingcontext.d.ts +1 -1
  1105. package/build/types/types/samplingcontext.d.ts.map +1 -0
  1106. package/build/types/types/sdkinfo.d.ts.map +1 -0
  1107. package/build/types/types/sdkmetadata.d.ts.map +1 -0
  1108. package/build/types/types/session.d.ts.map +1 -0
  1109. package/build/types/types/severity.d.ts.map +1 -0
  1110. package/build/types/types/span.d.ts.map +1 -0
  1111. package/build/types/types/spanStatus.d.ts.map +1 -0
  1112. package/build/types/types/stackframe.d.ts.map +1 -0
  1113. package/build/types/types/stacktrace.d.ts.map +1 -0
  1114. package/build/types/{types-hoist → types}/startSpanOptions.d.ts +13 -0
  1115. package/build/types/types/startSpanOptions.d.ts.map +1 -0
  1116. package/build/types/types/thread.d.ts.map +1 -0
  1117. package/build/types/types/timedEvent.d.ts.map +1 -0
  1118. package/build/types/types/tracing.d.ts.map +1 -0
  1119. package/build/types/types/transaction.d.ts.map +1 -0
  1120. package/build/types/types/transport.d.ts.map +1 -0
  1121. package/build/types/types/user.d.ts.map +1 -0
  1122. package/build/types/types/view-hierarchy.d.ts.map +1 -0
  1123. package/build/types/types/vue.d.ts.map +1 -0
  1124. package/build/types/types/webfetchapi.d.ts.map +1 -0
  1125. package/build/types/types/wrappedfunction.d.ts.map +1 -0
  1126. package/build/types/utils/aggregate-errors.d.ts +3 -3
  1127. package/build/types/utils/aggregate-errors.d.ts.map +1 -1
  1128. package/build/types/utils/anr.d.ts +1 -1
  1129. package/build/types/utils/anr.d.ts.map +1 -1
  1130. package/build/types/utils/baggage.d.ts +1 -1
  1131. package/build/types/utils/baggage.d.ts.map +1 -1
  1132. package/build/types/utils/breadcrumb-log-level.d.ts +1 -1
  1133. package/build/types/utils/breadcrumb-log-level.d.ts.map +1 -1
  1134. package/build/types/utils/clientreport.d.ts +2 -2
  1135. package/build/types/utils/clientreport.d.ts.map +1 -1
  1136. package/build/types/utils/data-collection/defaultPiiToCollectionOptions.d.ts +6 -0
  1137. package/build/types/utils/data-collection/defaultPiiToCollectionOptions.d.ts.map +1 -0
  1138. package/build/types/utils/data-collection/filterCookies.d.ts +9 -0
  1139. package/build/types/utils/data-collection/filterCookies.d.ts.map +1 -0
  1140. package/build/types/utils/data-collection/filterKeyValueData.d.ts +11 -0
  1141. package/build/types/utils/data-collection/filterKeyValueData.d.ts.map +1 -0
  1142. package/build/types/utils/data-collection/filterQueryParams.d.ts +9 -0
  1143. package/build/types/utils/data-collection/filterQueryParams.d.ts.map +1 -0
  1144. package/build/types/utils/data-collection/filtering-snippets.d.ts +14 -0
  1145. package/build/types/utils/data-collection/filtering-snippets.d.ts.map +1 -0
  1146. package/build/types/utils/data-collection/resolveDataCollectionOptions.d.ts +14 -0
  1147. package/build/types/utils/data-collection/resolveDataCollectionOptions.d.ts.map +1 -0
  1148. package/build/types/utils/debug-ids.d.ts +2 -2
  1149. package/build/types/utils/debug-ids.d.ts.map +1 -1
  1150. package/build/types/utils/debug-logger.d.ts +1 -1
  1151. package/build/types/utils/debug-logger.d.ts.map +1 -1
  1152. package/build/types/utils/dsn.d.ts +1 -1
  1153. package/build/types/utils/dsn.d.ts.map +1 -1
  1154. package/build/types/utils/env.d.ts.map +1 -1
  1155. package/build/types/utils/envelope.d.ts +8 -8
  1156. package/build/types/utils/envelope.d.ts.map +1 -1
  1157. package/build/types/utils/error.d.ts +1 -1
  1158. package/build/types/utils/error.d.ts.map +1 -1
  1159. package/build/types/utils/eventUtils.d.ts +1 -1
  1160. package/build/types/utils/eventUtils.d.ts.map +1 -1
  1161. package/build/types/utils/eventbuilder.d.ts +6 -6
  1162. package/build/types/utils/eventbuilder.d.ts.map +1 -1
  1163. package/build/types/utils/featureFlags.d.ts +1 -1
  1164. package/build/types/utils/featureFlags.d.ts.map +1 -1
  1165. package/build/types/utils/hasSpansEnabled.d.ts +1 -1
  1166. package/build/types/utils/hasSpansEnabled.d.ts.map +1 -1
  1167. package/build/types/utils/ipAddress.d.ts +2 -2
  1168. package/build/types/utils/ipAddress.d.ts.map +1 -1
  1169. package/build/types/utils/is.d.ts +4 -4
  1170. package/build/types/utils/is.d.ts.map +1 -1
  1171. package/build/types/utils/meta.d.ts +1 -1
  1172. package/build/types/utils/meta.d.ts.map +1 -1
  1173. package/build/types/utils/misc.d.ts +3 -3
  1174. package/build/types/utils/misc.d.ts.map +1 -1
  1175. package/build/types/utils/node-stack-trace.d.ts +1 -1
  1176. package/build/types/utils/node-stack-trace.d.ts.map +1 -1
  1177. package/build/types/utils/object.d.ts +1 -1
  1178. package/build/types/utils/object.d.ts.map +1 -1
  1179. package/build/types/utils/parameterize.d.ts +1 -1
  1180. package/build/types/utils/parameterize.d.ts.map +1 -1
  1181. package/build/types/utils/prepareEvent.d.ts +3 -3
  1182. package/build/types/utils/prepareEvent.d.ts.map +1 -1
  1183. package/build/types/utils/ratelimit.d.ts +2 -2
  1184. package/build/types/utils/ratelimit.d.ts.map +1 -1
  1185. package/build/types/utils/request.d.ts +3 -3
  1186. package/build/types/utils/request.d.ts.map +1 -1
  1187. package/build/types/utils/scopeData.d.ts +1 -1
  1188. package/build/types/utils/scopeData.d.ts.map +1 -1
  1189. package/build/types/utils/sdkMetadata.d.ts +1 -1
  1190. package/build/types/utils/sdkMetadata.d.ts.map +1 -1
  1191. package/build/types/utils/severity.d.ts +1 -1
  1192. package/build/types/utils/severity.d.ts.map +1 -1
  1193. package/build/types/utils/should-ignore-span.d.ts +2 -2
  1194. package/build/types/utils/should-ignore-span.d.ts.map +1 -1
  1195. package/build/types/utils/spanOnScope.d.ts +1 -1
  1196. package/build/types/utils/spanOnScope.d.ts.map +1 -1
  1197. package/build/types/utils/spanUtils.d.ts +4 -4
  1198. package/build/types/utils/spanUtils.d.ts.map +1 -1
  1199. package/build/types/utils/stacktrace.d.ts +4 -4
  1200. package/build/types/utils/stacktrace.d.ts.map +1 -1
  1201. package/build/types/utils/trace-info.d.ts +2 -2
  1202. package/build/types/utils/trace-info.d.ts.map +1 -1
  1203. package/build/types/utils/traceData.d.ts +2 -2
  1204. package/build/types/utils/traceData.d.ts.map +1 -1
  1205. package/build/types/utils/tracePropagationTargets.d.ts +1 -1
  1206. package/build/types/utils/tracePropagationTargets.d.ts.map +1 -1
  1207. package/build/types/utils/tracing.d.ts +2 -2
  1208. package/build/types/utils/tracing.d.ts.map +1 -1
  1209. package/build/types/utils/transactionEvent.d.ts +2 -2
  1210. package/build/types/utils/transactionEvent.d.ts.map +1 -1
  1211. package/build/types/utils/url.d.ts +1 -1
  1212. package/build/types/utils/url.d.ts.map +1 -1
  1213. package/build/types/utils/worldwide.d.ts +1 -0
  1214. package/build/types/utils/worldwide.d.ts.map +1 -1
  1215. package/build/types-ts3.8/api.d.ts +2 -2
  1216. package/build/types-ts3.8/attributes.d.ts +5 -8
  1217. package/build/types-ts3.8/breadcrumbs.d.ts +1 -1
  1218. package/build/types-ts3.8/browser-exports.d.ts +3 -3
  1219. package/build/types-ts3.8/carrier.d.ts +2 -2
  1220. package/build/types-ts3.8/checkin.d.ts +4 -4
  1221. package/build/types-ts3.8/client.d.ts +32 -22
  1222. package/build/types-ts3.8/currentScopes.d.ts +1 -1
  1223. package/build/types-ts3.8/envelope.d.ts +7 -7
  1224. package/build/types-ts3.8/eventProcessors.d.ts +2 -2
  1225. package/build/types-ts3.8/exports.d.ts +8 -8
  1226. package/build/types-ts3.8/feedback.d.ts +2 -2
  1227. package/build/types-ts3.8/fetch.d.ts +3 -3
  1228. package/build/types-ts3.8/instrument/console.d.ts +1 -1
  1229. package/build/types-ts3.8/instrument/fetch.d.ts +1 -1
  1230. package/build/types-ts3.8/instrument/globalError.d.ts +1 -1
  1231. package/build/types-ts3.8/instrument/globalUnhandledRejection.d.ts +1 -1
  1232. package/build/types-ts3.8/integration.d.ts +2 -2
  1233. package/build/types-ts3.8/integrations/consola.d.ts +1 -1
  1234. package/build/types-ts3.8/integrations/console.d.ts +1 -1
  1235. package/build/types-ts3.8/integrations/dedupe.d.ts +1 -1
  1236. package/build/types-ts3.8/integrations/express/types.d.ts +2 -2
  1237. package/build/types-ts3.8/integrations/express/utils.d.ts +1 -1
  1238. package/build/types-ts3.8/integrations/featureFlags/featureFlagsIntegration.d.ts +1 -1
  1239. package/build/types-ts3.8/integrations/featureFlags/growthbook.d.ts +1 -1
  1240. package/build/types-ts3.8/integrations/http/double-wrap-warning.d.ts +1 -1
  1241. package/build/types-ts3.8/integrations/http/get-outgoing-span-data.d.ts +2 -2
  1242. package/build/types-ts3.8/integrations/http/patch-request-to-capture-body.d.ts +12 -0
  1243. package/build/types-ts3.8/integrations/http/record-request-session.d.ts +18 -0
  1244. package/build/types-ts3.8/integrations/http/server-subscription.d.ts +26 -0
  1245. package/build/types-ts3.8/integrations/http/types.d.ts +12 -6
  1246. package/build/types-ts3.8/integrations/mcp-server/correlation.d.ts +1 -1
  1247. package/build/types-ts3.8/integrations/mcp-server/piiFiltering.d.ts +1 -1
  1248. package/build/types-ts3.8/integrations/mcp-server/types.d.ts +1 -1
  1249. package/build/types-ts3.8/integrations/postgresjs.d.ts +1 -1
  1250. package/build/types-ts3.8/integrations/rewriteframes.d.ts +1 -1
  1251. package/build/types-ts3.8/integrations/supabase.d.ts +14 -3
  1252. package/build/types-ts3.8/integrations/zoderrors.d.ts +1 -1
  1253. package/build/types-ts3.8/logs/console-integration.d.ts +1 -1
  1254. package/build/types-ts3.8/logs/constants.d.ts +1 -1
  1255. package/build/types-ts3.8/logs/envelope.d.ts +4 -4
  1256. package/build/types-ts3.8/logs/internal.d.ts +16 -1
  1257. package/build/types-ts3.8/logs/public-api.d.ts +2 -2
  1258. package/build/types-ts3.8/metadata.d.ts +2 -2
  1259. package/build/types-ts3.8/metrics/envelope.d.ts +4 -4
  1260. package/build/types-ts3.8/metrics/internal.d.ts +1 -1
  1261. package/build/types-ts3.8/metrics/public-api.d.ts +1 -1
  1262. package/build/types-ts3.8/profiling.d.ts +1 -1
  1263. package/build/types-ts3.8/report-dialog.d.ts +1 -1
  1264. package/build/types-ts3.8/scope.d.ts +14 -14
  1265. package/build/types-ts3.8/sdk.d.ts +1 -1
  1266. package/build/types-ts3.8/semanticAttributes.d.ts +2 -0
  1267. package/build/types-ts3.8/server-exports.d.ts +3 -1
  1268. package/build/types-ts3.8/server-runtime-client.d.ts +6 -6
  1269. package/build/types-ts3.8/session.d.ts +1 -1
  1270. package/build/types-ts3.8/shared-exports.d.ts +58 -53
  1271. package/build/types-ts3.8/tracing/ai/utils.d.ts +1 -1
  1272. package/build/types-ts3.8/tracing/anthropic-ai/streaming.d.ts +1 -1
  1273. package/build/types-ts3.8/tracing/anthropic-ai/utils.d.ts +2 -2
  1274. package/build/types-ts3.8/tracing/dynamicSamplingContext.d.ts +2 -2
  1275. package/build/types-ts3.8/tracing/google-genai/streaming.d.ts +1 -1
  1276. package/build/types-ts3.8/tracing/idleSpan.d.ts +2 -2
  1277. package/build/types-ts3.8/tracing/langchain/utils.d.ts +6 -1
  1278. package/build/types-ts3.8/tracing/langgraph/utils.d.ts +1 -3
  1279. package/build/types-ts3.8/tracing/logSpans.d.ts +1 -1
  1280. package/build/types-ts3.8/tracing/measurement.d.ts +2 -2
  1281. package/build/types-ts3.8/tracing/openai/streaming.d.ts +1 -1
  1282. package/build/types-ts3.8/tracing/openai/utils.d.ts +1 -1
  1283. package/build/types-ts3.8/tracing/sampling.d.ts +2 -2
  1284. package/build/types-ts3.8/tracing/sentryNonRecordingSpan.d.ts +3 -3
  1285. package/build/types-ts3.8/tracing/sentrySpan.d.ts +4 -4
  1286. package/build/types-ts3.8/tracing/spans/beforeSendSpan.d.ts +3 -3
  1287. package/build/types-ts3.8/tracing/spans/captureSpan.d.ts +1 -1
  1288. package/build/types-ts3.8/tracing/spans/envelope.d.ts +2 -2
  1289. package/build/types-ts3.8/tracing/spans/estimateSize.d.ts +1 -1
  1290. package/build/types-ts3.8/tracing/spans/extractGenAiSpans.d.ts +2 -2
  1291. package/build/types-ts3.8/tracing/spans/scopeContextAttributes.d.ts +9 -0
  1292. package/build/types-ts3.8/tracing/spans/spanJsonToStreamedSpan.d.ts +1 -1
  1293. package/build/types-ts3.8/tracing/spanstatus.d.ts +2 -2
  1294. package/build/types-ts3.8/tracing/trace.d.ts +2 -2
  1295. package/build/types-ts3.8/tracing/utils.d.ts +1 -1
  1296. package/build/types-ts3.8/tracing/vercel-ai/utils.d.ts +2 -2
  1297. package/build/types-ts3.8/transports/base.d.ts +1 -1
  1298. package/build/types-ts3.8/transports/multiplexed.d.ts +3 -3
  1299. package/build/types-ts3.8/transports/offline.d.ts +2 -2
  1300. package/build/types-ts3.8/transports/userAgent.d.ts +1 -1
  1301. package/build/types-ts3.8/types/datacollection.d.ts +75 -0
  1302. package/build/types-ts3.8/{types-hoist → types}/options.d.ts +17 -0
  1303. package/build/types-ts3.8/{types-hoist → types}/samplingcontext.d.ts +1 -1
  1304. package/build/types-ts3.8/{types-hoist → types}/startSpanOptions.d.ts +13 -0
  1305. package/build/types-ts3.8/utils/aggregate-errors.d.ts +3 -3
  1306. package/build/types-ts3.8/utils/anr.d.ts +1 -1
  1307. package/build/types-ts3.8/utils/baggage.d.ts +1 -1
  1308. package/build/types-ts3.8/utils/breadcrumb-log-level.d.ts +1 -1
  1309. package/build/types-ts3.8/utils/clientreport.d.ts +2 -2
  1310. package/build/types-ts3.8/utils/data-collection/defaultPiiToCollectionOptions.d.ts +6 -0
  1311. package/build/types-ts3.8/utils/data-collection/filterCookies.d.ts +9 -0
  1312. package/build/types-ts3.8/utils/data-collection/filterKeyValueData.d.ts +11 -0
  1313. package/build/types-ts3.8/utils/data-collection/filterQueryParams.d.ts +9 -0
  1314. package/build/types-ts3.8/utils/data-collection/filtering-snippets.d.ts +14 -0
  1315. package/build/types-ts3.8/utils/data-collection/resolveDataCollectionOptions.d.ts +14 -0
  1316. package/build/types-ts3.8/utils/debug-ids.d.ts +2 -2
  1317. package/build/types-ts3.8/utils/debug-logger.d.ts +1 -1
  1318. package/build/types-ts3.8/utils/dsn.d.ts +1 -1
  1319. package/build/types-ts3.8/utils/envelope.d.ts +8 -8
  1320. package/build/types-ts3.8/utils/error.d.ts +1 -1
  1321. package/build/types-ts3.8/utils/eventUtils.d.ts +1 -1
  1322. package/build/types-ts3.8/utils/eventbuilder.d.ts +6 -6
  1323. package/build/types-ts3.8/utils/featureFlags.d.ts +1 -1
  1324. package/build/types-ts3.8/utils/hasSpansEnabled.d.ts +1 -1
  1325. package/build/types-ts3.8/utils/ipAddress.d.ts +2 -2
  1326. package/build/types-ts3.8/utils/is.d.ts +4 -4
  1327. package/build/types-ts3.8/utils/meta.d.ts +1 -1
  1328. package/build/types-ts3.8/utils/misc.d.ts +3 -3
  1329. package/build/types-ts3.8/utils/node-stack-trace.d.ts +1 -1
  1330. package/build/types-ts3.8/utils/object.d.ts +1 -1
  1331. package/build/types-ts3.8/utils/parameterize.d.ts +1 -1
  1332. package/build/types-ts3.8/utils/prepareEvent.d.ts +3 -3
  1333. package/build/types-ts3.8/utils/ratelimit.d.ts +2 -2
  1334. package/build/types-ts3.8/utils/request.d.ts +3 -3
  1335. package/build/types-ts3.8/utils/scopeData.d.ts +1 -1
  1336. package/build/types-ts3.8/utils/sdkMetadata.d.ts +1 -1
  1337. package/build/types-ts3.8/utils/severity.d.ts +1 -1
  1338. package/build/types-ts3.8/utils/should-ignore-span.d.ts +2 -2
  1339. package/build/types-ts3.8/utils/spanOnScope.d.ts +1 -1
  1340. package/build/types-ts3.8/utils/spanUtils.d.ts +4 -4
  1341. package/build/types-ts3.8/utils/stacktrace.d.ts +4 -4
  1342. package/build/types-ts3.8/utils/trace-info.d.ts +2 -2
  1343. package/build/types-ts3.8/utils/traceData.d.ts +2 -2
  1344. package/build/types-ts3.8/utils/tracePropagationTargets.d.ts +1 -1
  1345. package/build/types-ts3.8/utils/tracing.d.ts +2 -2
  1346. package/build/types-ts3.8/utils/transactionEvent.d.ts +2 -2
  1347. package/build/types-ts3.8/utils/url.d.ts +1 -1
  1348. package/build/types-ts3.8/utils/worldwide.d.ts +1 -0
  1349. package/package.json +1 -1
  1350. package/build/types/types-hoist/attachment.d.ts.map +0 -1
  1351. package/build/types/types-hoist/breadcrumb.d.ts.map +0 -1
  1352. package/build/types/types-hoist/browseroptions.d.ts.map +0 -1
  1353. package/build/types/types-hoist/checkin.d.ts.map +0 -1
  1354. package/build/types/types-hoist/clientreport.d.ts.map +0 -1
  1355. package/build/types/types-hoist/context.d.ts.map +0 -1
  1356. package/build/types/types-hoist/csp.d.ts.map +0 -1
  1357. package/build/types/types-hoist/datacategory.d.ts.map +0 -1
  1358. package/build/types/types-hoist/debugMeta.d.ts.map +0 -1
  1359. package/build/types/types-hoist/dsn.d.ts.map +0 -1
  1360. package/build/types/types-hoist/envelope.d.ts.map +0 -1
  1361. package/build/types/types-hoist/error.d.ts.map +0 -1
  1362. package/build/types/types-hoist/event.d.ts.map +0 -1
  1363. package/build/types/types-hoist/eventprocessor.d.ts.map +0 -1
  1364. package/build/types/types-hoist/exception.d.ts.map +0 -1
  1365. package/build/types/types-hoist/extra.d.ts.map +0 -1
  1366. package/build/types/types-hoist/feedback/config.d.ts.map +0 -1
  1367. package/build/types/types-hoist/feedback/form.d.ts.map +0 -1
  1368. package/build/types/types-hoist/feedback/index.d.ts.map +0 -1
  1369. package/build/types/types-hoist/feedback/sendFeedback.d.ts.map +0 -1
  1370. package/build/types/types-hoist/feedback/theme.d.ts.map +0 -1
  1371. package/build/types/types-hoist/instrument.d.ts.map +0 -1
  1372. package/build/types/types-hoist/integration.d.ts.map +0 -1
  1373. package/build/types/types-hoist/link.d.ts.map +0 -1
  1374. package/build/types/types-hoist/log.d.ts.map +0 -1
  1375. package/build/types/types-hoist/measurement.d.ts.map +0 -1
  1376. package/build/types/types-hoist/mechanism.d.ts.map +0 -1
  1377. package/build/types/types-hoist/metric.d.ts.map +0 -1
  1378. package/build/types/types-hoist/misc.d.ts.map +0 -1
  1379. package/build/types/types-hoist/opentelemetry.d.ts.map +0 -1
  1380. package/build/types/types-hoist/options.d.ts.map +0 -1
  1381. package/build/types/types-hoist/package.d.ts.map +0 -1
  1382. package/build/types/types-hoist/parameterize.d.ts.map +0 -1
  1383. package/build/types/types-hoist/polymorphics.d.ts.map +0 -1
  1384. package/build/types/types-hoist/profiling.d.ts.map +0 -1
  1385. package/build/types/types-hoist/replay.d.ts.map +0 -1
  1386. package/build/types/types-hoist/request.d.ts.map +0 -1
  1387. package/build/types/types-hoist/runtime.d.ts.map +0 -1
  1388. package/build/types/types-hoist/samplingcontext.d.ts.map +0 -1
  1389. package/build/types/types-hoist/sdkinfo.d.ts.map +0 -1
  1390. package/build/types/types-hoist/sdkmetadata.d.ts.map +0 -1
  1391. package/build/types/types-hoist/session.d.ts.map +0 -1
  1392. package/build/types/types-hoist/severity.d.ts.map +0 -1
  1393. package/build/types/types-hoist/span.d.ts.map +0 -1
  1394. package/build/types/types-hoist/spanStatus.d.ts.map +0 -1
  1395. package/build/types/types-hoist/stackframe.d.ts.map +0 -1
  1396. package/build/types/types-hoist/stacktrace.d.ts.map +0 -1
  1397. package/build/types/types-hoist/startSpanOptions.d.ts.map +0 -1
  1398. package/build/types/types-hoist/thread.d.ts.map +0 -1
  1399. package/build/types/types-hoist/timedEvent.d.ts.map +0 -1
  1400. package/build/types/types-hoist/tracing.d.ts.map +0 -1
  1401. package/build/types/types-hoist/transaction.d.ts.map +0 -1
  1402. package/build/types/types-hoist/transport.d.ts.map +0 -1
  1403. package/build/types/types-hoist/user.d.ts.map +0 -1
  1404. package/build/types/types-hoist/view-hierarchy.d.ts.map +0 -1
  1405. package/build/types/types-hoist/vue.d.ts.map +0 -1
  1406. package/build/types/types-hoist/webfetchapi.d.ts.map +0 -1
  1407. package/build/types/types-hoist/wrappedfunction.d.ts.map +0 -1
  1408. /package/build/types/{types-hoist → types}/attachment.d.ts +0 -0
  1409. /package/build/types/{types-hoist → types}/breadcrumb.d.ts +0 -0
  1410. /package/build/types/{types-hoist → types}/browseroptions.d.ts +0 -0
  1411. /package/build/types/{types-hoist → types}/checkin.d.ts +0 -0
  1412. /package/build/types/{types-hoist → types}/clientreport.d.ts +0 -0
  1413. /package/build/types/{types-hoist → types}/context.d.ts +0 -0
  1414. /package/build/types/{types-hoist → types}/csp.d.ts +0 -0
  1415. /package/build/types/{types-hoist → types}/datacategory.d.ts +0 -0
  1416. /package/build/types/{types-hoist → types}/debugMeta.d.ts +0 -0
  1417. /package/build/types/{types-hoist → types}/dsn.d.ts +0 -0
  1418. /package/build/types/{types-hoist → types}/envelope.d.ts +0 -0
  1419. /package/build/types/{types-hoist → types}/error.d.ts +0 -0
  1420. /package/build/types/{types-hoist → types}/event.d.ts +0 -0
  1421. /package/build/types/{types-hoist → types}/eventprocessor.d.ts +0 -0
  1422. /package/build/types/{types-hoist → types}/exception.d.ts +0 -0
  1423. /package/build/types/{types-hoist → types}/extra.d.ts +0 -0
  1424. /package/build/types/{types-hoist → types}/feedback/config.d.ts +0 -0
  1425. /package/build/types/{types-hoist → types}/feedback/form.d.ts +0 -0
  1426. /package/build/types/{types-hoist → types}/feedback/index.d.ts +0 -0
  1427. /package/build/types/{types-hoist → types}/feedback/sendFeedback.d.ts +0 -0
  1428. /package/build/types/{types-hoist → types}/feedback/theme.d.ts +0 -0
  1429. /package/build/types/{types-hoist → types}/instrument.d.ts +0 -0
  1430. /package/build/types/{types-hoist → types}/integration.d.ts +0 -0
  1431. /package/build/types/{types-hoist → types}/link.d.ts +0 -0
  1432. /package/build/types/{types-hoist → types}/log.d.ts +0 -0
  1433. /package/build/types/{types-hoist → types}/measurement.d.ts +0 -0
  1434. /package/build/types/{types-hoist → types}/mechanism.d.ts +0 -0
  1435. /package/build/types/{types-hoist → types}/metric.d.ts +0 -0
  1436. /package/build/types/{types-hoist → types}/misc.d.ts +0 -0
  1437. /package/build/types/{types-hoist → types}/opentelemetry.d.ts +0 -0
  1438. /package/build/types/{types-hoist → types}/package.d.ts +0 -0
  1439. /package/build/types/{types-hoist → types}/parameterize.d.ts +0 -0
  1440. /package/build/types/{types-hoist → types}/polymorphics.d.ts +0 -0
  1441. /package/build/types/{types-hoist → types}/profiling.d.ts +0 -0
  1442. /package/build/types/{types-hoist → types}/replay.d.ts +0 -0
  1443. /package/build/types/{types-hoist → types}/request.d.ts +0 -0
  1444. /package/build/types/{types-hoist → types}/runtime.d.ts +0 -0
  1445. /package/build/types/{types-hoist → types}/sdkinfo.d.ts +0 -0
  1446. /package/build/types/{types-hoist → types}/sdkmetadata.d.ts +0 -0
  1447. /package/build/types/{types-hoist → types}/session.d.ts +0 -0
  1448. /package/build/types/{types-hoist → types}/severity.d.ts +0 -0
  1449. /package/build/types/{types-hoist → types}/span.d.ts +0 -0
  1450. /package/build/types/{types-hoist → types}/spanStatus.d.ts +0 -0
  1451. /package/build/types/{types-hoist → types}/stackframe.d.ts +0 -0
  1452. /package/build/types/{types-hoist → types}/stacktrace.d.ts +0 -0
  1453. /package/build/types/{types-hoist → types}/thread.d.ts +0 -0
  1454. /package/build/types/{types-hoist → types}/timedEvent.d.ts +0 -0
  1455. /package/build/types/{types-hoist → types}/tracing.d.ts +0 -0
  1456. /package/build/types/{types-hoist → types}/transaction.d.ts +0 -0
  1457. /package/build/types/{types-hoist → types}/transport.d.ts +0 -0
  1458. /package/build/types/{types-hoist → types}/user.d.ts +0 -0
  1459. /package/build/types/{types-hoist → types}/view-hierarchy.d.ts +0 -0
  1460. /package/build/types/{types-hoist → types}/vue.d.ts +0 -0
  1461. /package/build/types/{types-hoist → types}/webfetchapi.d.ts +0 -0
  1462. /package/build/types/{types-hoist → types}/wrappedfunction.d.ts +0 -0
  1463. /package/build/types-ts3.8/{types-hoist → types}/attachment.d.ts +0 -0
  1464. /package/build/types-ts3.8/{types-hoist → types}/breadcrumb.d.ts +0 -0
  1465. /package/build/types-ts3.8/{types-hoist → types}/browseroptions.d.ts +0 -0
  1466. /package/build/types-ts3.8/{types-hoist → types}/checkin.d.ts +0 -0
  1467. /package/build/types-ts3.8/{types-hoist → types}/clientreport.d.ts +0 -0
  1468. /package/build/types-ts3.8/{types-hoist → types}/context.d.ts +0 -0
  1469. /package/build/types-ts3.8/{types-hoist → types}/csp.d.ts +0 -0
  1470. /package/build/types-ts3.8/{types-hoist → types}/datacategory.d.ts +0 -0
  1471. /package/build/types-ts3.8/{types-hoist → types}/debugMeta.d.ts +0 -0
  1472. /package/build/types-ts3.8/{types-hoist → types}/dsn.d.ts +0 -0
  1473. /package/build/types-ts3.8/{types-hoist → types}/envelope.d.ts +0 -0
  1474. /package/build/types-ts3.8/{types-hoist → types}/error.d.ts +0 -0
  1475. /package/build/types-ts3.8/{types-hoist → types}/event.d.ts +0 -0
  1476. /package/build/types-ts3.8/{types-hoist → types}/eventprocessor.d.ts +0 -0
  1477. /package/build/types-ts3.8/{types-hoist → types}/exception.d.ts +0 -0
  1478. /package/build/types-ts3.8/{types-hoist → types}/extra.d.ts +0 -0
  1479. /package/build/types-ts3.8/{types-hoist → types}/feedback/config.d.ts +0 -0
  1480. /package/build/types-ts3.8/{types-hoist → types}/feedback/form.d.ts +0 -0
  1481. /package/build/types-ts3.8/{types-hoist → types}/feedback/index.d.ts +0 -0
  1482. /package/build/types-ts3.8/{types-hoist → types}/feedback/sendFeedback.d.ts +0 -0
  1483. /package/build/types-ts3.8/{types-hoist → types}/feedback/theme.d.ts +0 -0
  1484. /package/build/types-ts3.8/{types-hoist → types}/instrument.d.ts +0 -0
  1485. /package/build/types-ts3.8/{types-hoist → types}/integration.d.ts +0 -0
  1486. /package/build/types-ts3.8/{types-hoist → types}/link.d.ts +0 -0
  1487. /package/build/types-ts3.8/{types-hoist → types}/log.d.ts +0 -0
  1488. /package/build/types-ts3.8/{types-hoist → types}/measurement.d.ts +0 -0
  1489. /package/build/types-ts3.8/{types-hoist → types}/mechanism.d.ts +0 -0
  1490. /package/build/types-ts3.8/{types-hoist → types}/metric.d.ts +0 -0
  1491. /package/build/types-ts3.8/{types-hoist → types}/misc.d.ts +0 -0
  1492. /package/build/types-ts3.8/{types-hoist → types}/opentelemetry.d.ts +0 -0
  1493. /package/build/types-ts3.8/{types-hoist → types}/package.d.ts +0 -0
  1494. /package/build/types-ts3.8/{types-hoist → types}/parameterize.d.ts +0 -0
  1495. /package/build/types-ts3.8/{types-hoist → types}/polymorphics.d.ts +0 -0
  1496. /package/build/types-ts3.8/{types-hoist → types}/profiling.d.ts +0 -0
  1497. /package/build/types-ts3.8/{types-hoist → types}/replay.d.ts +0 -0
  1498. /package/build/types-ts3.8/{types-hoist → types}/request.d.ts +0 -0
  1499. /package/build/types-ts3.8/{types-hoist → types}/runtime.d.ts +0 -0
  1500. /package/build/types-ts3.8/{types-hoist → types}/sdkinfo.d.ts +0 -0
  1501. /package/build/types-ts3.8/{types-hoist → types}/sdkmetadata.d.ts +0 -0
  1502. /package/build/types-ts3.8/{types-hoist → types}/session.d.ts +0 -0
  1503. /package/build/types-ts3.8/{types-hoist → types}/severity.d.ts +0 -0
  1504. /package/build/types-ts3.8/{types-hoist → types}/span.d.ts +0 -0
  1505. /package/build/types-ts3.8/{types-hoist → types}/spanStatus.d.ts +0 -0
  1506. /package/build/types-ts3.8/{types-hoist → types}/stackframe.d.ts +0 -0
  1507. /package/build/types-ts3.8/{types-hoist → types}/stacktrace.d.ts +0 -0
  1508. /package/build/types-ts3.8/{types-hoist → types}/thread.d.ts +0 -0
  1509. /package/build/types-ts3.8/{types-hoist → types}/timedEvent.d.ts +0 -0
  1510. /package/build/types-ts3.8/{types-hoist → types}/tracing.d.ts +0 -0
  1511. /package/build/types-ts3.8/{types-hoist → types}/transaction.d.ts +0 -0
  1512. /package/build/types-ts3.8/{types-hoist → types}/transport.d.ts +0 -0
  1513. /package/build/types-ts3.8/{types-hoist → types}/user.d.ts +0 -0
  1514. /package/build/types-ts3.8/{types-hoist → types}/view-hierarchy.d.ts +0 -0
  1515. /package/build/types-ts3.8/{types-hoist → types}/vue.d.ts +0 -0
  1516. /package/build/types-ts3.8/{types-hoist → types}/webfetchapi.d.ts +0 -0
  1517. /package/build/types-ts3.8/{types-hoist → types}/wrappedfunction.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"scope.js","sources":["../../src/scope.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport type { AttributeObject, RawAttribute, RawAttributes } from './attributes';\nimport type { Client } from './client';\nimport { DEBUG_BUILD } from './debug-build';\nimport { updateSession } from './session';\nimport type { Attachment } from './types-hoist/attachment';\nimport type { Breadcrumb } from './types-hoist/breadcrumb';\nimport type { Context, Contexts } from './types-hoist/context';\nimport type { DynamicSamplingContext } from './types-hoist/envelope';\nimport type { Event, EventHint } from './types-hoist/event';\nimport type { EventProcessor } from './types-hoist/eventprocessor';\nimport type { Extra, Extras } from './types-hoist/extra';\nimport type { Primitive } from './types-hoist/misc';\nimport type { RequestEventData } from './types-hoist/request';\nimport type { Session } from './types-hoist/session';\nimport type { SeverityLevel } from './types-hoist/severity';\nimport type { Span } from './types-hoist/span';\nimport type { PropagationContext } from './types-hoist/tracing';\nimport type { User } from './types-hoist/user';\nimport { debug } from './utils/debug-logger';\nimport { isPlainObject } from './utils/is';\nimport { merge } from './utils/merge';\nimport { uuid4 } from './utils/misc';\nimport { generateTraceId } from './utils/propagationContext';\nimport { safeMathRandom } from './utils/randomSafeContext';\nimport { _getSpanForScope, _setSpanForScope } from './utils/spanOnScope';\nimport { truncate } from './utils/string';\nimport { dateTimestampInSeconds } from './utils/time';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * A context to be used for capturing an event.\n * This can either be a Scope, or a partial ScopeContext,\n * or a callback that receives the current scope and returns a new scope to use.\n */\nexport type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) => Scope);\n\n/**\n * Data that can be converted to a Scope.\n */\nexport interface ScopeContext {\n user: User;\n level: SeverityLevel;\n extra: Extras;\n contexts: Contexts;\n tags: { [key: string]: Primitive };\n attributes?: RawAttributes<Record<string, unknown>>;\n fingerprint: string[];\n propagationContext: PropagationContext;\n conversationId?: string;\n}\n\nexport interface SdkProcessingMetadata {\n [key: string]: unknown;\n requestSession?: {\n status: 'ok' | 'errored' | 'crashed';\n };\n normalizedRequest?: RequestEventData;\n dynamicSamplingContext?: Partial<DynamicSamplingContext>;\n capturedSpanScope?: Scope;\n capturedSpanIsolationScope?: Scope;\n spanCountBeforeProcessing?: number;\n ipAddress?: string;\n}\n\n/**\n * Normalized data of the Scope, ready to be used.\n */\nexport interface ScopeData {\n eventProcessors: EventProcessor[];\n breadcrumbs: Breadcrumb[];\n user: User;\n tags: { [key: string]: Primitive };\n // TODO(v11): Make this a required field (could be subtly breaking if we did it today)\n attributes?: RawAttributes<Record<string, unknown>>;\n extra: Extras;\n contexts: Contexts;\n attachments: Attachment[];\n propagationContext: PropagationContext;\n sdkProcessingMetadata: SdkProcessingMetadata;\n fingerprint: string[];\n level?: SeverityLevel;\n transactionName?: string;\n span?: Span;\n conversationId?: string;\n}\n\n/**\n * Holds additional event information.\n */\nexport class Scope {\n /** Flag if notifying is happening. */\n protected _notifyingListeners: boolean;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void>;\n\n /** Callback list that will be called during event processing. */\n protected _eventProcessors: EventProcessor[];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[];\n\n /** User */\n protected _user: User;\n\n /** Tags */\n protected _tags: { [key: string]: Primitive };\n\n /** Attributes */\n protected _attributes: RawAttributes<Record<string, unknown>>;\n\n /** Extra */\n protected _extra: Extras;\n\n /** Contexts */\n protected _contexts: Contexts;\n\n /** Attachments */\n protected _attachments: Attachment[];\n\n /** Propagation Context for distributed tracing */\n protected _propagationContext: PropagationContext;\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n protected _sdkProcessingMetadata: SdkProcessingMetadata;\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n protected _level?: SeverityLevel;\n\n /**\n * Transaction Name\n *\n * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.\n * It's purpose is to assign a transaction to the scope that's added to non-transaction events.\n */\n protected _transactionName?: string;\n\n /** Session */\n protected _session?: Session;\n\n /** The client on this scope */\n protected _client?: Client;\n\n /** Contains the last event id of a captured event. */\n protected _lastEventId?: string;\n\n /** Conversation ID */\n protected _conversationId?: string;\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n public constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._attributes = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = {\n traceId: generateTraceId(),\n sampleRand: safeMathRandom(),\n };\n }\n\n /**\n * Clone all data from this scope into a new scope.\n */\n public clone(): Scope {\n const newScope = new Scope();\n newScope._breadcrumbs = [...this._breadcrumbs];\n newScope._tags = { ...this._tags };\n newScope._attributes = { ...this._attributes };\n newScope._extra = { ...this._extra };\n newScope._contexts = { ...this._contexts };\n if (this._contexts.flags) {\n // We need to copy the `values` array so insertions on a cloned scope\n // won't affect the original array.\n newScope._contexts.flags = {\n values: [...this._contexts.flags.values],\n };\n }\n\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = [...this._eventProcessors];\n newScope._attachments = [...this._attachments];\n newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n newScope._propagationContext = { ...this._propagationContext };\n newScope._client = this._client;\n newScope._lastEventId = this._lastEventId;\n newScope._conversationId = this._conversationId;\n\n _setSpanForScope(newScope, _getSpanForScope(this));\n\n return newScope;\n }\n\n /**\n * Update the client assigned to this scope.\n * Note that not every scope will have a client assigned - isolation scopes & the global scope will generally not have a client,\n * as well as manually created scopes.\n */\n public setClient(client: Client | undefined): void {\n this._client = client;\n }\n\n /**\n * Set the ID of the last captured error event.\n * This is generally only captured on the isolation scope.\n */\n public setLastEventId(lastEventId: string | undefined): void {\n this._lastEventId = lastEventId;\n }\n\n /**\n * Get the client assigned to this scope.\n */\n public getClient<C extends Client>(): C | undefined {\n return this._client as C | undefined;\n }\n\n /**\n * Get the ID of the last captured error event.\n * This is generally only available on the isolation scope.\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * Add an event processor that will be called before an event is sent.\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * Set the user for this scope.\n * Set to `null` to unset the user.\n */\n public setUser(user: User | null): this {\n // If null is passed we want to unset everything, but still define keys,\n // so that later down in the pipeline any existing values are cleared.\n this._user = user || {\n email: undefined,\n id: undefined,\n ip_address: undefined,\n username: undefined,\n };\n\n if (this._session) {\n updateSession(this._session, { user });\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Get the user from this scope.\n */\n public getUser(): User | undefined {\n return this._user;\n }\n\n /**\n * Set the conversation ID for this scope.\n * Set to `null` to unset the conversation ID.\n */\n public setConversationId(conversationId: string | null | undefined): this {\n this._conversationId = conversationId || undefined;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set an object that will be merged into existing tags on the scope,\n * and will be sent as tags data with the event.\n */\n public setTags(tags: { [key: string]: Primitive }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set a single tag that will be sent as tags data with the event.\n */\n public setTag(key: string, value: Primitive): this {\n return this.setTags({ [key]: value });\n }\n\n /**\n * Sets attributes onto the scope.\n *\n * These attributes are currently applied to logs and metrics.\n * In the future, they will also be applied to spans.\n *\n * Important: For now, only strings, numbers and boolean attributes are supported, despite types allowing for\n * more complex attribute types. We'll add this support in the future but already specify the wider type to\n * avoid a breaking change in the future.\n *\n * @param newAttributes - The attributes to set on the scope. You can either pass in key-value pairs, or\n * an object with a `value` and an optional `unit` (if applicable to your attribute).\n *\n * @example\n * ```typescript\n * scope.setAttributes({\n * is_admin: true,\n * payment_selection: 'credit_card',\n * render_duration: { value: 'render_duration', unit: 'ms' },\n * });\n * ```\n */\n public setAttributes<T extends Record<string, unknown>>(newAttributes: RawAttributes<T>): this {\n this._attributes = {\n ...this._attributes,\n ...newAttributes,\n };\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets an attribute onto the scope.\n *\n * These attributes are currently applied to logs and metrics.\n * In the future, they will also be applied to spans.\n *\n * Important: For now, only strings, numbers and boolean attributes are supported, despite types allowing for\n * more complex attribute types. We'll add this support in the future but already specify the wider type to\n * avoid a breaking change in the future.\n *\n * @param key - The attribute key.\n * @param value - the attribute value. You can either pass in a raw value, or an attribute\n * object with a `value` and an optional `unit` (if applicable to your attribute).\n *\n * @example\n * ```typescript\n * scope.setAttribute('is_admin', true);\n * scope.setAttribute('render_duration', { value: 'render_duration', unit: 'ms' });\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public setAttribute<T extends RawAttribute<T> extends { value: any } | { unit: any } ? AttributeObject : unknown>(\n key: string,\n value: RawAttribute<T>,\n ): this {\n return this.setAttributes({ [key]: value });\n }\n\n /**\n * Removes the attribute with the given key from the scope.\n *\n * @param key - The attribute key.\n *\n * @example\n * ```typescript\n * scope.removeAttribute('is_admin');\n * ```\n */\n public removeAttribute(key: string): this {\n if (key in this._attributes) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._attributes[key];\n this._notifyScopeListeners();\n }\n return this;\n }\n\n /**\n * Set an object that will be merged into existing extra on the scope,\n * and will be sent as extra data with the event.\n */\n public setExtras(extras: Extras): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set a single key:value extra entry that will be sent as extra data with the event.\n */\n public setExtra(key: string, extra: Extra): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param {string[]} fingerprint Fingerprint to group events in Sentry.\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the level on the scope for future events.\n */\n public setLevel(level: SeverityLevel): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the transaction name on the scope so that the name of e.g. taken server route or\n * the page location is attached to future events.\n *\n * IMPORTANT: Calling this function does NOT change the name of the currently active\n * root span. If you want to change the name of the active root span, use\n * `Sentry.updateSpanName(rootSpan, 'new name')` instead.\n *\n * By default, the SDK updates the scope's transaction name automatically on sensible\n * occasions, such as a page navigation or when handling a new request on the server.\n */\n public setTransactionName(name?: string): this {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets context data with the given name.\n * Data passed as context will be normalized. You can also pass `null` to unset the context.\n * Note that context data will not be merged - calling `setContext` will overwrite an existing context with the same key.\n */\n public setContext(key: string, context: Context | null): this {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set the session for the scope.\n */\n public setSession(session?: Session): this {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Get the session from the scope.\n */\n public getSession(): Session | undefined {\n return this._session;\n }\n\n /**\n * Updates the scope with provided data. Can work in three variations:\n * - plain object containing updatable attributes\n * - Scope instance that'll extract the attributes from\n * - callback function that'll receive the current scope as an argument and allow for modifications\n */\n public update(captureContext?: CaptureContext): this {\n if (!captureContext) {\n return this;\n }\n\n const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n const scopeInstance =\n scopeToMerge instanceof Scope\n ? scopeToMerge.getScopeData()\n : isPlainObject(scopeToMerge)\n ? (captureContext as ScopeContext)\n : undefined;\n\n const {\n tags,\n attributes,\n extra,\n user,\n contexts,\n level,\n fingerprint = [],\n propagationContext,\n conversationId,\n } = scopeInstance || {};\n\n this._tags = { ...this._tags, ...tags };\n this._attributes = { ...this._attributes, ...attributes };\n this._extra = { ...this._extra, ...extra };\n this._contexts = { ...this._contexts, ...contexts };\n\n if (user && Object.keys(user).length) {\n this._user = user;\n }\n\n if (level) {\n this._level = level;\n }\n\n if (fingerprint.length) {\n this._fingerprint = fingerprint;\n }\n\n if (propagationContext) {\n this._propagationContext = propagationContext;\n }\n\n if (conversationId) {\n this._conversationId = conversationId;\n }\n\n return this;\n }\n\n /**\n * Clears the current scope and resets its properties.\n * Note: The client will not be cleared.\n */\n public clear(): this {\n // client is not cleared here on purpose!\n this._breadcrumbs = [];\n this._tags = {};\n this._attributes = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._session = undefined;\n this._conversationId = undefined;\n _setSpanForScope(this, undefined);\n this._attachments = [];\n this.setPropagationContext({\n traceId: generateTraceId(),\n sampleRand: safeMathRandom(),\n });\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Adds a breadcrumb to the scope.\n * By default, the last 100 breadcrumbs are kept.\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb: Breadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n // Breadcrumb messages can theoretically be infinitely large and they're held in memory so we truncate them not to leak (too much) memory\n message: breadcrumb.message ? truncate(breadcrumb.message, 2048) : breadcrumb.message,\n };\n\n this._breadcrumbs.push(mergedBreadcrumb);\n if (this._breadcrumbs.length > maxCrumbs) {\n this._breadcrumbs = this._breadcrumbs.slice(-maxCrumbs);\n this._client?.recordDroppedEvent('buffer_overflow', 'log_item');\n }\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * Get the last breadcrumb of the scope.\n */\n public getLastBreadcrumb(): Breadcrumb | undefined {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * Clear all breadcrumbs from the scope.\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Add an attachment to the scope.\n */\n public addAttachment(attachment: Attachment): this {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * Clear all attachments from the scope.\n */\n public clearAttachments(): this {\n this._attachments = [];\n return this;\n }\n\n /**\n * Get the data of this scope, which should be applied to an event during processing.\n */\n public getScopeData(): ScopeData {\n return {\n breadcrumbs: this._breadcrumbs,\n attachments: this._attachments,\n contexts: this._contexts,\n tags: this._tags,\n attributes: this._attributes,\n extra: this._extra,\n user: this._user,\n level: this._level,\n fingerprint: this._fingerprint || [],\n eventProcessors: this._eventProcessors,\n propagationContext: this._propagationContext,\n sdkProcessingMetadata: this._sdkProcessingMetadata,\n transactionName: this._transactionName,\n span: _getSpanForScope(this),\n conversationId: this._conversationId,\n };\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry.\n */\n public setSDKProcessingMetadata(newData: SdkProcessingMetadata): this {\n this._sdkProcessingMetadata = merge(this._sdkProcessingMetadata, newData, 2);\n return this;\n }\n\n /**\n * Add propagation context to the scope, used for distributed tracing\n */\n public setPropagationContext(context: PropagationContext): this {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * Get propagation context from the scope, used for distributed tracing\n */\n public getPropagationContext(): PropagationContext {\n return this._propagationContext;\n }\n\n /**\n * Capture an exception for this scope.\n *\n * @returns {string} The id of the captured Sentry event.\n */\n public captureException(exception: unknown, hint?: EventHint): string {\n const eventId = hint?.event_id || uuid4();\n\n if (!this._client) {\n DEBUG_BUILD && debug.warn('No client configured on scope - will not capture exception!');\n return eventId;\n }\n\n const syntheticException = new Error('Sentry syntheticException');\n\n this._client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Capture a message for this scope.\n *\n * @returns {string} The id of the captured message.\n */\n public captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string {\n const eventId = hint?.event_id || uuid4();\n\n if (!this._client) {\n DEBUG_BUILD && debug.warn('No client configured on scope - will not capture message!');\n return eventId;\n }\n\n const syntheticException = hint?.syntheticException ?? new Error(message);\n\n this._client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Capture a Sentry event for this scope.\n *\n * @returns {string} The id of the captured event.\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = event.event_id || hint?.event_id || uuid4();\n\n if (!this._client) {\n DEBUG_BUILD && debug.warn('No client configured on scope - will not capture event!');\n return eventId;\n }\n\n this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n return eventId;\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n}\n"],"names":["generateTraceId","safeMathRandom","_setSpanForScope","_getSpanForScope","updateSession","isPlainObject","dateTimestampInSeconds","truncate","merge","uuid4","DEBUG_BUILD","debug"],"mappings":";;;;;;;;;;;;;;AA6BA;AACA;AACA;AACA,MAAM,uBAAA,GAA0B,GAAG;;AAEnC;AACA;AACA;AACA;AACA;;AAqDA;AACA;AACA;AACO,MAAM,KAAA,CAAM;AACnB;;AAGA;;AAGA;;AAGA;;AAGA;;AAGA;;AAGA;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Y,qBAAqB,GAAS;AAC1C;AACA;AACA;AACA,IAAI,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE;AACnC,MAAM,IAAI,CAAC,mBAAA,GAAsB,IAAI;AACrC,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,YAAY;AAC/C,QAAQ,QAAQ,CAAC,IAAI,CAAC;AACtB,MAAM,CAAC,CAAC;AACR,MAAM,IAAI,CAAC,mBAAA,GAAsB,KAAK;AACtC,IAAI;AACJ,EAAE;AACF;;;;"}
1
+ {"version":3,"file":"scope.js","sources":["../../src/scope.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport type { AttributeObject, RawAttribute, RawAttributes } from './attributes';\nimport type { Client } from './client';\nimport { DEBUG_BUILD } from './debug-build';\nimport { updateSession } from './session';\nimport type { Attachment } from './types/attachment';\nimport type { Breadcrumb } from './types/breadcrumb';\nimport type { Context, Contexts } from './types/context';\nimport type { DynamicSamplingContext } from './types/envelope';\nimport type { Event, EventHint } from './types/event';\nimport type { EventProcessor } from './types/eventprocessor';\nimport type { Extra, Extras } from './types/extra';\nimport type { Primitive } from './types/misc';\nimport type { RequestEventData } from './types/request';\nimport type { Session } from './types/session';\nimport type { SeverityLevel } from './types/severity';\nimport type { Span } from './types/span';\nimport type { PropagationContext } from './types/tracing';\nimport type { User } from './types/user';\nimport { debug } from './utils/debug-logger';\nimport { isPlainObject } from './utils/is';\nimport { merge } from './utils/merge';\nimport { uuid4 } from './utils/misc';\nimport { generateTraceId } from './utils/propagationContext';\nimport { safeMathRandom } from './utils/randomSafeContext';\nimport { _getSpanForScope, _setSpanForScope } from './utils/spanOnScope';\nimport { truncate } from './utils/string';\nimport { dateTimestampInSeconds } from './utils/time';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * A context to be used for capturing an event.\n * This can either be a Scope, or a partial ScopeContext,\n * or a callback that receives the current scope and returns a new scope to use.\n */\nexport type CaptureContext = Scope | Partial<ScopeContext> | ((scope: Scope) => Scope);\n\n/**\n * Data that can be converted to a Scope.\n */\nexport interface ScopeContext {\n user: User;\n level: SeverityLevel;\n extra: Extras;\n contexts: Contexts;\n tags: { [key: string]: Primitive };\n attributes?: RawAttributes<Record<string, unknown>>;\n fingerprint: string[];\n propagationContext: PropagationContext;\n conversationId?: string;\n}\n\nexport interface SdkProcessingMetadata {\n [key: string]: unknown;\n requestSession?: {\n status: 'ok' | 'errored' | 'crashed';\n };\n normalizedRequest?: RequestEventData;\n dynamicSamplingContext?: Partial<DynamicSamplingContext>;\n capturedSpanScope?: Scope;\n capturedSpanIsolationScope?: Scope;\n spanCountBeforeProcessing?: number;\n ipAddress?: string;\n}\n\n/**\n * Normalized data of the Scope, ready to be used.\n */\nexport interface ScopeData {\n eventProcessors: EventProcessor[];\n breadcrumbs: Breadcrumb[];\n user: User;\n tags: { [key: string]: Primitive };\n // TODO(v11): Make this a required field (could be subtly breaking if we did it today)\n attributes?: RawAttributes<Record<string, unknown>>;\n extra: Extras;\n contexts: Contexts;\n attachments: Attachment[];\n propagationContext: PropagationContext;\n sdkProcessingMetadata: SdkProcessingMetadata;\n fingerprint: string[];\n level?: SeverityLevel;\n transactionName?: string;\n span?: Span;\n conversationId?: string;\n}\n\n/**\n * Holds additional event information.\n */\nexport class Scope {\n /** Flag if notifying is happening. */\n protected _notifyingListeners: boolean;\n\n /** Callback for client to receive scope changes. */\n protected _scopeListeners: Array<(scope: Scope) => void>;\n\n /** Callback list that will be called during event processing. */\n protected _eventProcessors: EventProcessor[];\n\n /** Array of breadcrumbs. */\n protected _breadcrumbs: Breadcrumb[];\n\n /** User */\n protected _user: User;\n\n /** Tags */\n protected _tags: { [key: string]: Primitive };\n\n /** Attributes */\n protected _attributes: RawAttributes<Record<string, unknown>>;\n\n /** Extra */\n protected _extra: Extras;\n\n /** Contexts */\n protected _contexts: Contexts;\n\n /** Attachments */\n protected _attachments: Attachment[];\n\n /** Propagation Context for distributed tracing */\n protected _propagationContext: PropagationContext;\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n protected _sdkProcessingMetadata: SdkProcessingMetadata;\n\n /** Fingerprint */\n protected _fingerprint?: string[];\n\n /** Severity */\n protected _level?: SeverityLevel;\n\n /**\n * Transaction Name\n *\n * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.\n * It's purpose is to assign a transaction to the scope that's added to non-transaction events.\n */\n protected _transactionName?: string;\n\n /** Session */\n protected _session?: Session;\n\n /** The client on this scope */\n protected _client?: Client;\n\n /** Contains the last event id of a captured event. */\n protected _lastEventId?: string;\n\n /** Conversation ID */\n protected _conversationId?: string;\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n public constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._attributes = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = {\n traceId: generateTraceId(),\n sampleRand: safeMathRandom(),\n };\n }\n\n /**\n * Clone all data from this scope into a new scope.\n */\n public clone(): Scope {\n const newScope = new Scope();\n newScope._breadcrumbs = [...this._breadcrumbs];\n newScope._tags = { ...this._tags };\n newScope._attributes = { ...this._attributes };\n newScope._extra = { ...this._extra };\n newScope._contexts = { ...this._contexts };\n if (this._contexts.flags) {\n // We need to copy the `values` array so insertions on a cloned scope\n // won't affect the original array.\n newScope._contexts.flags = {\n values: [...this._contexts.flags.values],\n };\n }\n\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = [...this._eventProcessors];\n newScope._attachments = [...this._attachments];\n newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n newScope._propagationContext = { ...this._propagationContext };\n newScope._client = this._client;\n newScope._lastEventId = this._lastEventId;\n newScope._conversationId = this._conversationId;\n\n _setSpanForScope(newScope, _getSpanForScope(this));\n\n return newScope;\n }\n\n /**\n * Update the client assigned to this scope.\n * Note that not every scope will have a client assigned - isolation scopes & the global scope will generally not have a client,\n * as well as manually created scopes.\n */\n public setClient(client: Client | undefined): void {\n this._client = client;\n }\n\n /**\n * Set the ID of the last captured error event.\n * This is generally only captured on the isolation scope.\n */\n public setLastEventId(lastEventId: string | undefined): void {\n this._lastEventId = lastEventId;\n }\n\n /**\n * Get the client assigned to this scope.\n */\n public getClient<C extends Client>(): C | undefined {\n return this._client as C | undefined;\n }\n\n /**\n * Get the ID of the last captured error event.\n * This is generally only available on the isolation scope.\n */\n public lastEventId(): string | undefined {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n public addScopeListener(callback: (scope: Scope) => void): void {\n this._scopeListeners.push(callback);\n }\n\n /**\n * Add an event processor that will be called before an event is sent.\n */\n public addEventProcessor(callback: EventProcessor): this {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * Set the user for this scope.\n * Set to `null` to unset the user.\n */\n public setUser(user: User | null): this {\n // If null is passed we want to unset everything, but still define keys,\n // so that later down in the pipeline any existing values are cleared.\n this._user = user || {\n email: undefined,\n id: undefined,\n ip_address: undefined,\n username: undefined,\n };\n\n if (this._session) {\n updateSession(this._session, { user });\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Get the user from this scope.\n */\n public getUser(): User | undefined {\n return this._user;\n }\n\n /**\n * Set the conversation ID for this scope.\n * Set to `null` to unset the conversation ID.\n */\n public setConversationId(conversationId: string | null | undefined): this {\n this._conversationId = conversationId || undefined;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set an object that will be merged into existing tags on the scope,\n * and will be sent as tags data with the event.\n */\n public setTags(tags: { [key: string]: Primitive }): this {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set a single tag that will be sent as tags data with the event.\n */\n public setTag(key: string, value: Primitive): this {\n return this.setTags({ [key]: value });\n }\n\n /**\n * Sets attributes onto the scope.\n *\n * These attributes are currently applied to logs and metrics.\n * In the future, they will also be applied to spans.\n *\n * Important: For now, only strings, numbers and boolean attributes are supported, despite types allowing for\n * more complex attribute types. We'll add this support in the future but already specify the wider type to\n * avoid a breaking change in the future.\n *\n * @param newAttributes - The attributes to set on the scope. You can either pass in key-value pairs, or\n * an object with a `value` and an optional `unit` (if applicable to your attribute).\n *\n * @example\n * ```typescript\n * scope.setAttributes({\n * is_admin: true,\n * payment_selection: 'credit_card',\n * render_duration: { value: 'render_duration', unit: 'ms' },\n * });\n * ```\n */\n public setAttributes<T extends Record<string, unknown>>(newAttributes: RawAttributes<T>): this {\n this._attributes = {\n ...this._attributes,\n ...newAttributes,\n };\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets an attribute onto the scope.\n *\n * These attributes are currently applied to logs and metrics.\n * In the future, they will also be applied to spans.\n *\n * Important: For now, only strings, numbers and boolean attributes are supported, despite types allowing for\n * more complex attribute types. We'll add this support in the future but already specify the wider type to\n * avoid a breaking change in the future.\n *\n * @param key - The attribute key.\n * @param value - the attribute value. You can either pass in a raw value, or an attribute\n * object with a `value` and an optional `unit` (if applicable to your attribute).\n *\n * @example\n * ```typescript\n * scope.setAttribute('is_admin', true);\n * scope.setAttribute('render_duration', { value: 'render_duration', unit: 'ms' });\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public setAttribute<T extends RawAttribute<T> extends { value: any } | { unit: any } ? AttributeObject : unknown>(\n key: string,\n value: RawAttribute<T>,\n ): this {\n return this.setAttributes({ [key]: value });\n }\n\n /**\n * Removes the attribute with the given key from the scope.\n *\n * @param key - The attribute key.\n *\n * @example\n * ```typescript\n * scope.removeAttribute('is_admin');\n * ```\n */\n public removeAttribute(key: string): this {\n if (key in this._attributes) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._attributes[key];\n this._notifyScopeListeners();\n }\n return this;\n }\n\n /**\n * Set an object that will be merged into existing extra on the scope,\n * and will be sent as extra data with the event.\n */\n public setExtras(extras: Extras): this {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set a single key:value extra entry that will be sent as extra data with the event.\n */\n public setExtra(key: string, extra: Extra): this {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param {string[]} fingerprint Fingerprint to group events in Sentry.\n */\n public setFingerprint(fingerprint: string[]): this {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the level on the scope for future events.\n */\n public setLevel(level: SeverityLevel): this {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the transaction name on the scope so that the name of e.g. taken server route or\n * the page location is attached to future events.\n *\n * IMPORTANT: Calling this function does NOT change the name of the currently active\n * root span. If you want to change the name of the active root span, use\n * `Sentry.updateSpanName(rootSpan, 'new name')` instead.\n *\n * By default, the SDK updates the scope's transaction name automatically on sensible\n * occasions, such as a page navigation or when handling a new request on the server.\n */\n public setTransactionName(name?: string): this {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets context data with the given name.\n * Data passed as context will be normalized. You can also pass `null` to unset the context.\n * Note that context data will not be merged - calling `setContext` will overwrite an existing context with the same key.\n */\n public setContext(key: string, context: Context | null): this {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Set the session for the scope.\n */\n public setSession(session?: Session): this {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Get the session from the scope.\n */\n public getSession(): Session | undefined {\n return this._session;\n }\n\n /**\n * Updates the scope with provided data. Can work in three variations:\n * - plain object containing updatable attributes\n * - Scope instance that'll extract the attributes from\n * - callback function that'll receive the current scope as an argument and allow for modifications\n */\n public update(captureContext?: CaptureContext): this {\n if (!captureContext) {\n return this;\n }\n\n const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n const scopeInstance =\n scopeToMerge instanceof Scope\n ? scopeToMerge.getScopeData()\n : isPlainObject(scopeToMerge)\n ? (captureContext as ScopeContext)\n : undefined;\n\n const {\n tags,\n attributes,\n extra,\n user,\n contexts,\n level,\n fingerprint = [],\n propagationContext,\n conversationId,\n } = scopeInstance || {};\n\n this._tags = { ...this._tags, ...tags };\n this._attributes = { ...this._attributes, ...attributes };\n this._extra = { ...this._extra, ...extra };\n this._contexts = { ...this._contexts, ...contexts };\n\n if (user && Object.keys(user).length) {\n this._user = user;\n }\n\n if (level) {\n this._level = level;\n }\n\n if (fingerprint.length) {\n this._fingerprint = fingerprint;\n }\n\n if (propagationContext) {\n this._propagationContext = propagationContext;\n }\n\n if (conversationId) {\n this._conversationId = conversationId;\n }\n\n return this;\n }\n\n /**\n * Clears the current scope and resets its properties.\n * Note: The client will not be cleared.\n */\n public clear(): this {\n // client is not cleared here on purpose!\n this._breadcrumbs = [];\n this._tags = {};\n this._attributes = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._session = undefined;\n this._conversationId = undefined;\n _setSpanForScope(this, undefined);\n this._attachments = [];\n this.setPropagationContext({\n traceId: generateTraceId(),\n sampleRand: safeMathRandom(),\n });\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Adds a breadcrumb to the scope.\n * By default, the last 100 breadcrumbs are kept.\n */\n public addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb: Breadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n // Breadcrumb messages can theoretically be infinitely large and they're held in memory so we truncate them not to leak (too much) memory\n message: breadcrumb.message ? truncate(breadcrumb.message, 2048) : breadcrumb.message,\n };\n\n this._breadcrumbs.push(mergedBreadcrumb);\n if (this._breadcrumbs.length > maxCrumbs) {\n this._breadcrumbs = this._breadcrumbs.slice(-maxCrumbs);\n this._client?.recordDroppedEvent('buffer_overflow', 'log_item');\n }\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * Get the last breadcrumb of the scope.\n */\n public getLastBreadcrumb(): Breadcrumb | undefined {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * Clear all breadcrumbs from the scope.\n */\n public clearBreadcrumbs(): this {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Add an attachment to the scope.\n */\n public addAttachment(attachment: Attachment): this {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * Clear all attachments from the scope.\n */\n public clearAttachments(): this {\n this._attachments = [];\n return this;\n }\n\n /**\n * Get the data of this scope, which should be applied to an event during processing.\n */\n public getScopeData(): ScopeData {\n return {\n breadcrumbs: this._breadcrumbs,\n attachments: this._attachments,\n contexts: this._contexts,\n tags: this._tags,\n attributes: this._attributes,\n extra: this._extra,\n user: this._user,\n level: this._level,\n fingerprint: this._fingerprint || [],\n eventProcessors: this._eventProcessors,\n propagationContext: this._propagationContext,\n sdkProcessingMetadata: this._sdkProcessingMetadata,\n transactionName: this._transactionName,\n span: _getSpanForScope(this),\n conversationId: this._conversationId,\n };\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry.\n */\n public setSDKProcessingMetadata(newData: SdkProcessingMetadata): this {\n this._sdkProcessingMetadata = merge(this._sdkProcessingMetadata, newData, 2);\n return this;\n }\n\n /**\n * Add propagation context to the scope, used for distributed tracing\n */\n public setPropagationContext(context: PropagationContext): this {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * Get propagation context from the scope, used for distributed tracing\n */\n public getPropagationContext(): PropagationContext {\n return this._propagationContext;\n }\n\n /**\n * Capture an exception for this scope.\n *\n * @returns {string} The id of the captured Sentry event.\n */\n public captureException(exception: unknown, hint?: EventHint): string {\n const eventId = hint?.event_id || uuid4();\n\n if (!this._client) {\n DEBUG_BUILD && debug.warn('No client configured on scope - will not capture exception!');\n return eventId;\n }\n\n const syntheticException = new Error('Sentry syntheticException');\n\n this._client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Capture a message for this scope.\n *\n * @returns {string} The id of the captured message.\n */\n public captureMessage(message: string, level?: SeverityLevel, hint?: EventHint): string {\n const eventId = hint?.event_id || uuid4();\n\n if (!this._client) {\n DEBUG_BUILD && debug.warn('No client configured on scope - will not capture message!');\n return eventId;\n }\n\n const syntheticException = hint?.syntheticException ?? new Error(message);\n\n this._client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Capture a Sentry event for this scope.\n *\n * @returns {string} The id of the captured event.\n */\n public captureEvent(event: Event, hint?: EventHint): string {\n const eventId = event.event_id || hint?.event_id || uuid4();\n\n if (!this._client) {\n DEBUG_BUILD && debug.warn('No client configured on scope - will not capture event!');\n return eventId;\n }\n\n this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n return eventId;\n }\n\n /**\n * This will be called on every set call.\n */\n protected _notifyScopeListeners(): void {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n}\n"],"names":["generateTraceId","safeMathRandom","_setSpanForScope","_getS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A;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,YAAA,CAAa,OAAc,IAAA,EAA0B;AAC1D,IAAA,MAAM,OAAA,GAAU,KAAA,CAAM,QAAA,IAAY,IAAA,EAAM,YAAYF,UAAA,EAAM;AAE1D,IAAA,IAAI,CAAC,KAAK,OAAA,EAAS;AACjB,MAAAC,sBAAA,IAAeC,iBAAA,CAAM,KAAK,yDAAyD,CAAA;AACnF,MAAA,OAAO,OAAA;AAAA,IACT;AAEA,IAAA,IAAA,CAAK,OAAA,CAAQ,aAAa,KAAA,EAAO,EAAE,GAAG,IAAA,EAAM,QAAA,EAAU,OAAA,EAAQ,EAAG,IAAI,CAAA;AAErE,IAAA,OAAO,OAAA;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKU,qBAAA,GAA8B;AAItC,IAAA,IAAI,CAAC,KAAK,mBAAA,EAAqB;AAC7B,MAAA,IAAA,CAAK,mBAAA,GAAsB,IAAA;AAC3B,MAAA,IAAA,CAAK,eAAA,CAAgB,QAAQ,CAAA,QAAA,KAAY;AACvC,QAAA,QAAA,CAAS,IAAI,CAAA;AAAA,MACf,CAAC,CAAA;AACD,MAAA,IAAA,CAAK,mBAAA,GAAsB,KAAA;AAAA,IAC7B;AAAA,EACF;AACF;;;;"}
package/build/cjs/sdk.js CHANGED
@@ -4,42 +4,23 @@ const currentScopes = require('./currentScopes.js');
4
4
  const debugBuild = require('./debug-build.js');
5
5
  const debugLogger = require('./utils/debug-logger.js');
6
6
 
7
- /** A class object that can instantiate Client objects. */
8
-
9
- /**
10
- * Internal function to create a new SDK client instance. The client is
11
- * installed and then bound to the current scope.
12
- *
13
- * @param clientClass The client class to instantiate.
14
- * @param options Options to pass to the client.
15
- */
16
- function initAndBind(
17
- clientClass,
18
- options,
19
- ) {
7
+ function initAndBind(clientClass, options) {
20
8
  if (options.debug === true) {
21
9
  if (debugBuild.DEBUG_BUILD) {
22
10
  debugLogger.debug.enable();
23
11
  } else {
24
- // use `console.warn` rather than `debug.warn` since by non-debug bundles have all `debug.x` statements stripped
25
12
  debugLogger.consoleSandbox(() => {
26
- // eslint-disable-next-line no-console
27
- console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');
13
+ console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");
28
14
  });
29
15
  }
30
16
  }
31
17
  const scope = currentScopes.getCurrentScope();
32
18
  scope.update(options.initialScope);
33
-
34
19
  const client = new clientClass(options);
35
20
  setCurrentClient(client);
36
21
  client.init();
37
22
  return client;
38
23
  }
39
-
40
- /**
41
- * Make the given client the current client.
42
- */
43
24
  function setCurrentClient(client) {
44
25
  currentScopes.getCurrentScope().setClient(client);
45
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { Client } from './client';\nimport { getCurrentScope } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport type { ClientOptions } from './types-hoist/options';\nimport { consoleSandbox, debug } from './utils/debug-logger';\n\n/** A class object that can instantiate Client objects. */\nexport type ClientClass<F extends Client, O extends ClientOptions> = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind<F extends Client, O extends ClientOptions>(\n clientClass: ClientClass<F, O>,\n options: O,\n): Client {\n if (options.debug === true) {\n if (DEBUG_BUILD) {\n debug.enable();\n } else {\n // use `console.warn` rather than `debug.warn` since by non-debug bundles have all `debug.x` statements stripped\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n });\n }\n }\n const scope = getCurrentScope();\n scope.update(options.initialScope);\n\n const client = new clientClass(options);\n setCurrentClient(client);\n client.init();\n return client;\n}\n\n/**\n * Make the given client the current client.\n */\nexport function setCurrentClient(client: Client): void {\n getCurrentScope().setClient(client);\n}\n"],"names":["DEBUG_BUILD","debug","consoleSandbox","getCurrentScope"],"mappings":";;;;;;AAMA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,WAAW;AAC3B,EAAE,WAAW;AACb,EAAE,OAAO;AACT,EAAU;AACV,EAAE,IAAI,OAAO,CAAC,KAAA,KAAU,IAAI,EAAE;AAC9B,IAAI,IAAIA,sBAAW,EAAE;AACrB,MAAMC,iBAAK,CAAC,MAAM,EAAE;AACpB,IAAI,OAAO;AACX;AACA,MAAMC,0BAAc,CAAC,MAAM;AAC3B;AACA,QAAQ,OAAO,CAAC,IAAI,CAAC,8EAA8E,CAAC;AACpG,MAAM,CAAC,CAAC;AACR,IAAI;AACJ,EAAE;AACF,EAAE,MAAM,KAAA,GAAQC,6BAAe,EAAE;AACjC,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC;;AAEpC,EAAE,MAAM,MAAA,GAAS,IAAI,WAAW,CAAC,OAAO,CAAC;AACzC,EAAE,gBAAgB,CAAC,MAAM,CAAC;AAC1B,EAAE,MAAM,CAAC,IAAI,EAAE;AACf,EAAE,OAAO,MAAM;AACf;;AAEA;AACA;AACA;AACO,SAAS,gBAAgB,CAAC,MAAM,EAAgB;AACvD,EAAEA,6BAAe,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC;AACrC;;;;;"}
1
+ {"version":3,"file":"sdk.js","sources":["../../src/sdk.ts"],"sourcesContent":["import type { Client } from './client';\nimport { getCurrentScope } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport type { ClientOptions } from './types/options';\nimport { consoleSandbox, debug } from './utils/debug-logger';\n\n/** A class object that can instantiate Client objects. */\nexport type ClientClass<F extends Client, O extends ClientOptions> = new (options: O) => F;\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind<F extends Client, O extends ClientOptions>(\n clientClass: ClientClass<F, O>,\n options: O,\n): Client {\n if (options.debug === true) {\n if (DEBUG_BUILD) {\n debug.enable();\n } else {\n // use `console.warn` rather than `debug.warn` since by non-debug bundles have all `debug.x` statements stripped\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n });\n }\n }\n const scope = getCurrentScope();\n scope.update(options.initialScope);\n\n const client = new clientClass(options);\n setCurrentClient(client);\n client.init();\n return client;\n}\n\n/**\n * Make the given client the current client.\n */\nexport function setCurrentClient(client: Client): void {\n getCurrentScope().setClient(client);\n}\n"],"names":["DEBUG_BUILD","debug","consoleSandbox","getCurrentScope"],"mappings":";;;;;;AAgBO,SAAS,WAAA,CACd,aACA,OAAA,EACQ;AACR,EAAA,IAAI,OAAA,CAAQ,UAAU,IAAA,EAAM;AAC1B,IAAA,IAAIA,sBAAA,EAAa;AACf,MAAAC,iBAAA,CAAM,MAAA,EAAO;AAAA,IACf,CAAA,MAAO;AAEL,MAAAC,0BAAA,CAAe,MAAM;AAEnB,QAAA,OAAA,CAAQ,KAAK,8EAA8E,CAAA;AAAA,MAC7F,CAAC,CAAA;AAAA,IACH;AAAA,EACF;AACA,EAAA,MAAM,QAAQC,6BAAA,EAAgB;AAC9B,EAAA,KAAA,CAAM,MAAA,CAAO,QAAQ,YAAY,CAAA;AAEjC,EAAA,MAAM,MAAA,GAAS,IAAI,WAAA,CAAY,OAAO,CAAA;AACtC,EAAA,gBAAA,CAAiB,MAAM,CAAA;AACvB,EAAA,MAAA,CAAO,IAAA,EAAK;AACZ,EAAA,OAAO,MAAA;AACT;AAKO,SAAS,iBAAiB,MAAA,EAAsB;AACrD,EAAAA,6BAAA,EAAgB,CAAE,UAAU,MAAM,CAAA;AACpC;;;;;"}
@@ -1,121 +1,34 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
- /**
4
- * Use this attribute to represent the source of a span name.
5
- * Must be one of: custom, url, route, view, component, task
6
- * TODO(v11): rename this to sentry.span.source'
7
- */
8
- const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';
9
-
10
- /**
11
- * Attributes that holds the sample rate that was locally applied to a span.
12
- * If this attribute is not defined, it means that the span inherited a sampling decision.
13
- *
14
- * NOTE: Is only defined on root spans.
15
- */
16
- const SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';
17
-
18
- /**
19
- * Attribute holding the sample rate of the previous trace.
20
- * This is used to sample consistently across subsequent traces in the browser SDK.
21
- *
22
- * Note: Only defined on root spans, if opted into consistent sampling
23
- */
24
- const SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE = 'sentry.previous_trace_sample_rate';
25
-
26
- /**
27
- * Use this attribute to represent the operation of a span.
28
- */
29
- const SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';
30
-
31
- /**
32
- * Use this attribute to represent the origin of a span.
33
- */
34
- const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';
35
-
36
- /** The reason why an idle span finished. */
37
- const SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason';
38
-
39
- /** The unit of a measurement, which may be stored as a TimedEvent. */
40
- const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = 'sentry.measurement_unit';
41
-
42
- /** The value of a measurement, which may be stored as a TimedEvent. */
43
- const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = 'sentry.measurement_value';
44
-
45
- /** The release version of the application */
46
- const SEMANTIC_ATTRIBUTE_SENTRY_RELEASE = 'sentry.release';
47
- /** The environment name (e.g., "production", "staging", "development") */
48
- const SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT = 'sentry.environment';
49
- /** The segment name (e.g., "GET /users") */
50
- const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME = 'sentry.segment.name';
51
- /** The id of the segment that this span belongs to. */
52
- const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID = 'sentry.segment.id';
53
- /** The name of the Sentry SDK (e.g., "sentry.php", "sentry.javascript") */
54
- const SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME = 'sentry.sdk.name';
55
- /** The version of the Sentry SDK */
56
- const SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION = 'sentry.sdk.version';
57
-
58
- /** The user ID */
59
- const SEMANTIC_ATTRIBUTE_USER_ID = 'user.id';
60
- /** The user email */
61
- const SEMANTIC_ATTRIBUTE_USER_EMAIL = 'user.email';
62
- /** The user IP address */
63
- const SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS = 'user.ip_address';
64
- /** The user username */
65
- const SEMANTIC_ATTRIBUTE_USER_USERNAME = 'user.name';
66
-
67
- /**
68
- * A custom span name set by users guaranteed to be taken over any automatically
69
- * inferred name. This attribute is removed before the span is sent.
70
- *
71
- * @internal only meant for internal SDK usage
72
- * @hidden
73
- */
74
- const SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = 'sentry.custom_span_name';
75
-
76
- /**
77
- * The id of the profile that this span occurred in.
78
- */
79
- const SEMANTIC_ATTRIBUTE_PROFILE_ID = 'sentry.profile_id';
80
-
81
- const SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = 'sentry.exclusive_time';
82
-
83
- const SEMANTIC_ATTRIBUTE_CACHE_HIT = 'cache.hit';
84
-
85
- const SEMANTIC_ATTRIBUTE_CACHE_KEY = 'cache.key';
86
-
87
- const SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = 'cache.item_size';
88
-
89
- /** TODO: Remove these once we update to latest semantic conventions */
90
- const SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = 'http.request.method';
91
- const SEMANTIC_ATTRIBUTE_URL_FULL = 'url.full';
92
-
93
- /**
94
- * A span link attribute to mark the link as a special span link.
95
- *
96
- * Known values:
97
- * - `previous_trace`: The span links to the frontend root span of the previous trace.
98
- * - `next_trace`: The span links to the frontend root span of the next trace. (Not set by the SDK)
99
- *
100
- * Other values may be set as appropriate.
101
- * @see https://develop.sentry.dev/sdk/telemetry/traces/span-links/#link-types
102
- */
103
- const SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE = 'sentry.link.type';
104
-
105
- /**
106
- * =============================================================================
107
- * GEN AI ATTRIBUTES
108
- * Based on OpenTelemetry Semantic Conventions for Generative AI
109
- * @see https://opentelemetry.io/docs/specs/semconv/gen-ai/
110
- * =============================================================================
111
- */
112
-
113
- /**
114
- * The conversation ID for linking messages across API calls.
115
- * For OpenAI Assistants API: thread_id
116
- * For LangGraph: configurable.thread_id
117
- */
118
- const GEN_AI_CONVERSATION_ID_ATTRIBUTE = 'gen_ai.conversation.id';
3
+ const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = "sentry.source";
4
+ const SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = "sentry.sample_rate";
5
+ const SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE = "sentry.previous_trace_sample_rate";
6
+ const SEMANTIC_ATTRIBUTE_SENTRY_OP = "sentry.op";
7
+ const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = "sentry.origin";
8
+ const SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = "sentry.idle_span_finish_reason";
9
+ const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = "sentry.measurement_unit";
10
+ const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = "sentry.measurement_value";
11
+ const SEMANTIC_ATTRIBUTE_SENTRY_RELEASE = "sentry.release";
12
+ const SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT = "sentry.environment";
13
+ const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME = "sentry.segment.name";
14
+ const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID = "sentry.segment.id";
15
+ const SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME = "sentry.sdk.name";
16
+ const SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION = "sentry.sdk.version";
17
+ const SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS = "sentry.sdk.integrations";
18
+ const SEMANTIC_ATTRIBUTE_USER_ID = "user.id";
19
+ const SEMANTIC_ATTRIBUTE_USER_EMAIL = "user.email";
20
+ const SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS = "user.ip_address";
21
+ const SEMANTIC_ATTRIBUTE_USER_USERNAME = "user.name";
22
+ const SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = "sentry.custom_span_name";
23
+ const SEMANTIC_ATTRIBUTE_PROFILE_ID = "sentry.profile_id";
24
+ const SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = "sentry.exclusive_time";
25
+ const SEMANTIC_ATTRIBUTE_CACHE_HIT = "cache.hit";
26
+ const SEMANTIC_ATTRIBUTE_CACHE_KEY = "cache.key";
27
+ const SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = "cache.item_size";
28
+ const SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = "http.request.method";
29
+ const SEMANTIC_ATTRIBUTE_URL_FULL = "url.full";
30
+ const SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE = "sentry.link.type";
31
+ const GEN_AI_CONVERSATION_ID_ATTRIBUTE = "gen_ai.conversation.id";
119
32
 
120
33
  exports.GEN_AI_CONVERSATION_ID_ATTRIBUTE = GEN_AI_CONVERSATION_ID_ATTRIBUTE;
121
34
  exports.SEMANTIC_ATTRIBUTE_CACHE_HIT = SEMANTIC_ATTRIBUTE_CACHE_HIT;
@@ -134,6 +47,7 @@ exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
134
47
  exports.SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE = SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE;
135
48
  exports.SEMANTIC_ATTRIBUTE_SENTRY_RELEASE = SEMANTIC_ATTRIBUTE_SENTRY_RELEASE;
136
49
  exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE;
50
+ exports.SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS = SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS;
137
51
  exports.SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME = SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME;
138
52
  exports.SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION = SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION;
139
53
  exports.SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID = SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID;
@@ -1 +1 @@
1
- {"version":3,"file":"semanticAttributes.js","sources":["../../src/semanticAttributes.ts"],"sourcesContent":["/**\n * Use this attribute to represent the source of a span name.\n * Must be one of: custom, url, route, view, component, task\n * TODO(v11): rename this to sentry.span.source'\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';\n\n/**\n * Attributes that holds the sample rate that was locally applied to a span.\n * If this attribute is not defined, it means that the span inherited a sampling decision.\n *\n * NOTE: Is only defined on root spans.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';\n\n/**\n * Attribute holding the sample rate of the previous trace.\n * This is used to sample consistently across subsequent traces in the browser SDK.\n *\n * Note: Only defined on root spans, if opted into consistent sampling\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE = 'sentry.previous_trace_sample_rate';\n\n/**\n * Use this attribute to represent the operation of a span.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';\n\n/**\n * Use this attribute to represent the origin of a span.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';\n\n/** The reason why an idle span finished. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason';\n\n/** The unit of a measurement, which may be stored as a TimedEvent. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = 'sentry.measurement_unit';\n\n/** The value of a measurement, which may be stored as a TimedEvent. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = 'sentry.measurement_value';\n\n/** The release version of the application */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_RELEASE = 'sentry.release';\n/** The environment name (e.g., \"production\", \"staging\", \"development\") */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT = 'sentry.environment';\n/** The segment name (e.g., \"GET /users\") */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME = 'sentry.segment.name';\n/** The id of the segment that this span belongs to. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID = 'sentry.segment.id';\n/** The name of the Sentry SDK (e.g., \"sentry.php\", \"sentry.javascript\") */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME = 'sentry.sdk.name';\n/** The version of the Sentry SDK */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION = 'sentry.sdk.version';\n\n/** The user ID */\nexport const SEMANTIC_ATTRIBUTE_USER_ID = 'user.id';\n/** The user email */\nexport const SEMANTIC_ATTRIBUTE_USER_EMAIL = 'user.email';\n/** The user IP address */\nexport const SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS = 'user.ip_address';\n/** The user username */\nexport const SEMANTIC_ATTRIBUTE_USER_USERNAME = 'user.name';\n\n/**\n * A custom span name set by users guaranteed to be taken over any automatically\n * inferred name. This attribute is removed before the span is sent.\n *\n * @internal only meant for internal SDK usage\n * @hidden\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = 'sentry.custom_span_name';\n\n/**\n * The id of the profile that this span occurred in.\n */\nexport const SEMANTIC_ATTRIBUTE_PROFILE_ID = 'sentry.profile_id';\n\nexport const SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = 'sentry.exclusive_time';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_HIT = 'cache.hit';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_KEY = 'cache.key';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = 'cache.item_size';\n\n/** TODO: Remove these once we update to latest semantic conventions */\nexport const SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = 'http.request.method';\nexport const SEMANTIC_ATTRIBUTE_URL_FULL = 'url.full';\n\n/**\n * A span link attribute to mark the link as a special span link.\n *\n * Known values:\n * - `previous_trace`: The span links to the frontend root span of the previous trace.\n * - `next_trace`: The span links to the frontend root span of the next trace. (Not set by the SDK)\n *\n * Other values may be set as appropriate.\n * @see https://develop.sentry.dev/sdk/telemetry/traces/span-links/#link-types\n */\nexport const SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE = 'sentry.link.type';\n\n/**\n * =============================================================================\n * GEN AI ATTRIBUTES\n * Based on OpenTelemetry Semantic Conventions for Generative AI\n * @see https://opentelemetry.io/docs/specs/semconv/gen-ai/\n * =============================================================================\n */\n\n/**\n * The conversation ID for linking messages across API calls.\n * For OpenAI Assistants API: thread_id\n * For LangGraph: configurable.thread_id\n */\nexport const GEN_AI_CONVERSATION_ID_ATTRIBUTE = 'gen_ai.conversation.id';\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACO,MAAM,gCAAA,GAAmC;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,qCAAA,GAAwC;;AAErD;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,oDAAA,GAAuD;;AAEpE;AACA;AACA;AACO,MAAM,4BAAA,GAA+B;;AAE5C;AACA;AACA;AACO,MAAM,gCAAA,GAAmC;;AAEhD;AACO,MAAM,iDAAA,GAAoD;;AAEjE;AACO,MAAM,0CAAA,GAA6C;;AAE1D;AACO,MAAM,2CAAA,GAA8C;;AAE3D;AACO,MAAM,iCAAA,GAAoC;AACjD;AACO,MAAM,qCAAA,GAAwC;AACrD;AACO,MAAM,sCAAA,GAAyC;AACtD;AACO,MAAM,oCAAA,GAAuC;AACpD;AACO,MAAM,kCAAA,GAAqC;AAClD;AACO,MAAM,qCAAA,GAAwC;;AAErD;AACO,MAAM,0BAAA,GAA6B;AAC1C;AACO,MAAM,6BAAA,GAAgC;AAC7C;AACO,MAAM,kCAAA,GAAqC;AAClD;AACO,MAAM,gCAAA,GAAmC;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,0CAAA,GAA6C;;AAE1D;AACA;AACA;AACO,MAAM,6BAAA,GAAgC;;AAEtC,MAAM,iCAAA,GAAoC;;AAE1C,MAAM,4BAAA,GAA+B;;AAErC,MAAM,4BAAA,GAA+B;;AAErC,MAAM,kCAAA,GAAqC;;AAElD;AACO,MAAM,sCAAA,GAAyC;AAC/C,MAAM,2BAAA,GAA8B;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,iCAAA,GAAoC;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAM,gCAAA,GAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"semanticAttributes.js","sources":["../../src/semanticAttributes.ts"],"sourcesContent":["/**\n * Use this attribute to represent the source of a span name.\n * Must be one of: custom, url, route, view, component, task\n * TODO(v11): rename this to sentry.span.source'\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';\n\n/**\n * Attributes that holds the sample rate that was locally applied to a span.\n * If this attribute is not defined, it means that the span inherited a sampling decision.\n *\n * NOTE: Is only defined on root spans.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';\n\n/**\n * Attribute holding the sample rate of the previous trace.\n * This is used to sample consistently across subsequent traces in the browser SDK.\n *\n * Note: Only defined on root spans, if opted into consistent sampling\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE = 'sentry.previous_trace_sample_rate';\n\n/**\n * Use this attribute to represent the operation of a span.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';\n\n/**\n * Use this attribute to represent the origin of a span.\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';\n\n/** The reason why an idle span finished. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason';\n\n/** The unit of a measurement, which may be stored as a TimedEvent. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = 'sentry.measurement_unit';\n\n/** The value of a measurement, which may be stored as a TimedEvent. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = 'sentry.measurement_value';\n\n/** The release version of the application */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_RELEASE = 'sentry.release';\n/** The environment name (e.g., \"production\", \"staging\", \"development\") */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT = 'sentry.environment';\n/** The segment name (e.g., \"GET /users\") */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME = 'sentry.segment.name';\n/** The id of the segment that this span belongs to. */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID = 'sentry.segment.id';\n/** The name of the Sentry SDK (e.g., \"sentry.php\", \"sentry.javascript\") */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME = 'sentry.sdk.name';\n/** The version of the Sentry SDK */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION = 'sentry.sdk.version';\n/** The list of integrations enabled in the Sentry SDK (e.g., [\"InboundFilters\", \"BrowserTracing\"]) */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS = 'sentry.sdk.integrations';\n\n/** The user ID */\nexport const SEMANTIC_ATTRIBUTE_USER_ID = 'user.id';\n/** The user email */\nexport const SEMANTIC_ATTRIBUTE_USER_EMAIL = 'user.email';\n/** The user IP address */\nexport const SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS = 'user.ip_address';\n/** The user username */\nexport const SEMANTIC_ATTRIBUTE_USER_USERNAME = 'user.name';\n\n/**\n * A custom span name set by users guaranteed to be taken over any automatically\n * inferred name. This attribute is removed before the span is sent.\n *\n * @internal only meant for internal SDK usage\n * @hidden\n */\nexport const SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = 'sentry.custom_span_name';\n\n/**\n * The id of the profile that this span occurred in.\n */\nexport const SEMANTIC_ATTRIBUTE_PROFILE_ID = 'sentry.profile_id';\n\nexport const SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = 'sentry.exclusive_time';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_HIT = 'cache.hit';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_KEY = 'cache.key';\n\nexport const SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = 'cache.item_size';\n\n/** TODO: Remove these once we update to latest semantic conventions */\nexport const SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = 'http.request.method';\nexport const SEMANTIC_ATTRIBUTE_URL_FULL = 'url.full';\n\n/**\n * A span link attribute to mark the link as a special span link.\n *\n * Known values:\n * - `previous_trace`: The span links to the frontend root span of the previous trace.\n * - `next_trace`: The span links to the frontend root span of the next trace. (Not set by the SDK)\n *\n * Other values may be set as appropriate.\n * @see https://develop.sentry.dev/sdk/telemetry/traces/span-links/#link-types\n */\nexport const SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE = 'sentry.link.type';\n\n/**\n * =============================================================================\n * GEN AI ATTRIBUTES\n * Based on OpenTelemetry Semantic Conventions for Generative AI\n * @see https://opentelemetry.io/docs/specs/semconv/gen-ai/\n * =============================================================================\n */\n\n/**\n * The conversation ID for linking messages across API calls.\n * For OpenAI Assistants API: thread_id\n * For LangGraph: configurable.thread_id\n */\nexport const GEN_AI_CONVERSATION_ID_ATTRIBUTE = 'gen_ai.conversation.id';\n"],"names":[],"mappings":";;AAKO,MAAM,gCAAA,GAAmC;AAQzC,MAAM,qCAAA,GAAwC;AAQ9C,MAAM,oDAAA,GAAuD;AAK7D,MAAM,4BAAA,GAA+B;AAKrC,MAAM,gCAAA,GAAmC;AAGzC,MAAM,iDAAA,GAAoD;AAG1D,MAAM,0CAAA,GAA6C;AAGnD,MAAM,2CAAA,GAA8C;AAGpD,MAAM,iCAAA,GAAoC;AAE1C,MAAM,qCAAA,GAAwC;AAE9C,MAAM,sCAAA,GAAyC;AAE/C,MAAM,oCAAA,GAAuC;AAE7C,MAAM,kCAAA,GAAqC;AAE3C,MAAM,qCAAA,GAAwC;AAE9C,MAAM,0CAAA,GAA6C;AAGnD,MAAM,0BAAA,GAA6B;AAEnC,MAAM,6BAAA,GAAgC;AAEtC,MAAM,kCAAA,GAAqC;AAE3C,MAAM,gCAAA,GAAmC;AASzC,MAAM,0CAAA,GAA6C;AAKnD,MAAM,6BAAA,GAAgC;AAEtC,MAAM,iCAAA,GAAoC;AAE1C,MAAM,4BAAA,GAA+B;AAErC,MAAM,4BAAA,GAA+B;AAErC,MAAM,kCAAA,GAAqC;AAG3C,MAAM,sCAAA,GAAyC;AAC/C,MAAM,2BAAA,GAA8B;AAYpC,MAAM,iCAAA,GAAoC;AAe1C,MAAM,gCAAA,GAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}