@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
@@ -12,72 +12,51 @@ import { makePromiseBuffer } from './utils/promisebuffer.js';
12
12
  import { resolvedSyncPromise } from './utils/syncpromise.js';
13
13
  import { _getTraceInfoFromScope } from './utils/trace-info.js';
14
14
 
15
- /**
16
- * The Sentry Server Runtime Client SDK.
17
- */
18
- class ServerRuntimeClient
19
-
20
- extends Client {
21
- __init() {this._disposeCallbacks = [];}
22
-
15
+ class ServerRuntimeClient extends Client {
23
16
  /**
24
17
  * Creates a new Edge SDK instance.
25
18
  * @param options Configuration options for this SDK.
26
19
  */
27
- constructor(options) {
28
- // Server clients always support tracing
20
+ constructor(options) {
29
21
  registerSpanErrorInstrumentation();
30
-
31
22
  addUserAgentToTransportHeaders(options);
32
-
33
- super(options);ServerRuntimeClient.prototype.__init.call(this);
23
+ super(options);
24
+ this._disposeCallbacks = [];
34
25
  this._setUpMetricsProcessing();
35
26
  }
36
-
37
27
  /**
38
28
  * @inheritDoc
39
29
  */
40
- eventFromException(exception, hint) {
30
+ eventFromException(exception, hint) {
41
31
  const event = eventFromUnknownInput(this, this._options.stackParser, exception, hint);
42
- event.level = 'error';
43
-
32
+ event.level = "error";
44
33
  return resolvedSyncPromise(event);
45
34
  }
46
-
47
35
  /**
48
36
  * @inheritDoc
49
37
  */
50
- eventFromMessage(
51
- message,
52
- level = 'info',
53
- hint,
54
- ) {
38
+ eventFromMessage(message, level = "info", hint) {
55
39
  return resolvedSyncPromise(
56
- eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace),
40
+ eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace)
57
41
  );
58
42
  }
59
-
60
43
  /**
61
44
  * @inheritDoc
62
45
  */
63
- captureException(exception, hint, scope) {
46
+ captureException(exception, hint, scope) {
64
47
  setCurrentRequestSessionErroredOrCrashed(hint);
65
48
  return super.captureException(exception, hint, scope);
66
49
  }
67
-
68
50
  /**
69
51
  * @inheritDoc
70
52
  */
71
- captureEvent(event, hint, scope) {
72
- // If the event is of type Exception, then a request session should be captured
53
+ captureEvent(event, hint, scope) {
73
54
  const isException = !event.type && event.exception?.values && event.exception.values.length > 0;
74
55
  if (isException) {
75
56
  setCurrentRequestSessionErroredOrCrashed(hint);
76
57
  }
77
-
78
58
  return super.captureEvent(event, hint, scope);
79
59
  }
80
-
81
60
  /**
82
61
  * Create a cron monitor check in and send it to Sentry.
83
62
  *
@@ -85,28 +64,24 @@ class ServerRuntimeClient
85
64
  * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want
86
65
  * to create a monitor automatically when sending a check in.
87
66
  */
88
- captureCheckIn(checkIn, monitorConfig, scope) {
89
- const id = 'checkInId' in checkIn && checkIn.checkInId ? checkIn.checkInId : uuid4();
67
+ captureCheckIn(checkIn, monitorConfig, scope) {
68
+ const id = "checkInId" in checkIn && checkIn.checkInId ? checkIn.checkInId : uuid4();
90
69
  if (!this._isEnabled()) {
91
- DEBUG_BUILD && debug.warn('SDK not enabled, will not capture check-in.');
70
+ DEBUG_BUILD && debug.warn("SDK not enabled, will not capture check-in.");
92
71
  return id;
93
72
  }
94
-
95
73
  const options = this.getOptions();
96
74
  const { release, environment, tunnel } = options;
97
-
98
75
  const serializedCheckIn = {
99
76
  check_in_id: id,
100
77
  monitor_slug: checkIn.monitorSlug,
101
78
  status: checkIn.status,
102
79
  release,
103
- environment,
80
+ environment
104
81
  };
105
-
106
- if ('duration' in checkIn) {
82
+ if ("duration" in checkIn) {
107
83
  serializedCheckIn.duration = checkIn.duration;
108
84
  }
109
-
110
85
  if (monitorConfig) {
111
86
  serializedCheckIn.monitor_config = {
112
87
  schedule: monitorConfig.schedule,
@@ -114,41 +89,32 @@ class ServerRuntimeClient
114
89
  max_runtime: monitorConfig.maxRuntime,
115
90
  timezone: monitorConfig.timezone,
116
91
  failure_issue_threshold: monitorConfig.failureIssueThreshold,
117
- recovery_threshold: monitorConfig.recoveryThreshold,
92
+ recovery_threshold: monitorConfig.recoveryThreshold
118
93
  };
119
94
  }
120
-
121
95
  const [dynamicSamplingContext, traceContext] = _getTraceInfoFromScope(this, scope);
122
96
  if (traceContext) {
123
97
  serializedCheckIn.contexts = {
124
- trace: traceContext,
98
+ trace: traceContext
125
99
  };
126
100
  }
127
-
128
101
  const envelope = createCheckInEnvelope(
129
102
  serializedCheckIn,
130
103
  dynamicSamplingContext,
131
104
  this.getSdkMetadata(),
132
105
  tunnel,
133
- this.getDsn(),
106
+ this.getDsn()
134
107
  );
135
-
136
- DEBUG_BUILD && debug.log('Sending checkin:', checkIn.monitorSlug, checkIn.status);
137
-
138
- // sendEnvelope should not throw
139
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
108
+ DEBUG_BUILD && debug.log("Sending checkin:", checkIn.monitorSlug, checkIn.status);
140
109
  this.sendEnvelope(envelope);
141
-
142
110
  return id;
143
111
  }
144
-
145
112
  /**
146
113
  * @inheritDoc
147
114
  */
148
- registerCleanup(callback) {
115
+ registerCleanup(callback) {
149
116
  this._disposeCallbacks.push(callback);
150
117
  }
151
-
152
118
  /**
153
119
  * Disposes of the client and releases all resources.
154
120
  *
@@ -160,86 +126,65 @@ class ServerRuntimeClient
160
126
  *
161
127
  * Subclasses should override this method to clean up their own resources and call `super.dispose()`.
162
128
  */
163
- dispose() {
164
- DEBUG_BUILD && debug.log('Disposing client...');
165
-
166
- // Run all registered cleanup callbacks
129
+ dispose() {
130
+ DEBUG_BUILD && debug.log("Disposing client...");
167
131
  for (const callback of this._disposeCallbacks) {
168
132
  try {
169
133
  callback();
170
134
  } catch {
171
- // Ignore errors in cleanup callbacks
172
135
  }
173
136
  }
174
137
  this._disposeCallbacks.length = 0;
175
-
176
138
  for (const hookName of Object.keys(this._hooks)) {
177
139
  this._hooks[hookName]?.clear();
178
140
  }
179
-
180
141
  this._hooks = {};
181
142
  this._eventProcessors.length = 0;
182
143
  this._integrations = {};
183
144
  this._outcomes = {};
184
- (this )._transport = undefined;
145
+ this._transport = void 0;
185
146
  this._promiseBuffer = makePromiseBuffer(DEFAULT_TRANSPORT_BUFFER_SIZE);
186
147
  }
187
-
188
148
  /**
189
149
  * @inheritDoc
190
150
  */
191
- _prepareEvent(
192
- event,
193
- hint,
194
- currentScope,
195
- isolationScope,
196
- ) {
151
+ _prepareEvent(event, hint, currentScope, isolationScope) {
197
152
  if (this._options.platform) {
198
153
  event.platform = event.platform || this._options.platform;
199
154
  }
200
-
201
155
  if (this._options.runtime) {
202
156
  event.contexts = {
203
157
  ...event.contexts,
204
- runtime: event.contexts?.runtime || this._options.runtime,
158
+ runtime: event.contexts?.runtime || this._options.runtime
205
159
  };
206
160
  }
207
-
208
161
  if (this._options.serverName) {
209
162
  event.server_name = event.server_name || this._options.serverName;
210
163
  }
211
-
212
164
  return super._prepareEvent(event, hint, currentScope, isolationScope);
213
165
  }
214
-
215
166
  /**
216
167
  * Process a server-side metric before it is captured.
217
168
  */
218
- _setUpMetricsProcessing() {
219
- this.on('processMetric', metric => {
169
+ _setUpMetricsProcessing() {
170
+ this.on("processMetric", (metric) => {
220
171
  if (this._options.serverName) {
221
172
  metric.attributes = {
222
- 'server.address': this._options.serverName,
223
- ...metric.attributes,
173
+ "server.address": this._options.serverName,
174
+ ...metric.attributes
224
175
  };
225
176
  }
226
177
  });
227
178
  }
228
179
  }
229
-
230
180
  function setCurrentRequestSessionErroredOrCrashed(eventHint) {
231
181
  const requestSession = getIsolationScope().getScopeData().sdkProcessingMetadata.requestSession;
232
182
  if (requestSession) {
233
- // We mutate instead of doing `setSdkProcessingMetadata` because the http integration stores away a particular
234
- // isolationScope. If that isolation scope is forked, setting the processing metadata here will not mutate the
235
- // original isolation scope that the http integration stored away.
236
183
  const isHandledException = eventHint?.mechanism?.handled ?? true;
237
- // A request session can go from "errored" -> "crashed" but not "crashed" -> "errored".
238
- // Crashed (unhandled exception) is worse than errored (handled exception).
239
- if (isHandledException && requestSession.status !== 'crashed') {
240
- requestSession.status = 'errored';
184
+ if (isHandledException && requestSession.status !== "crashed") {
185
+ requestSession.status = "errored";
241
186
  } else if (!isHandledException) {
242
- requestSession.status = 'crashed';
187
+ requestSession.status = "crashed";
243
188
  }
244
189
  }
245
190
  }
@@ -1 +1 @@
1
- {"version":3,"file":"server-runtime-client.js","sources":["../../src/server-runtime-client.ts"],"sourcesContent":["import { createCheckInEnvelope } from './checkin';\nimport { Client } from './client';\nimport { getIsolationScope } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport type { Scope } from './scope';\nimport { registerSpanErrorInstrumentation } from './tracing';\nimport { DEFAULT_TRANSPORT_BUFFER_SIZE } from './transports/base';\nimport { addUserAgentToTransportHeaders } from './transports/userAgent';\nimport type { CheckIn, MonitorConfig, SerializedCheckIn } from './types-hoist/checkin';\nimport type { Event, EventHint } from './types-hoist/event';\nimport type { ClientOptions } from './types-hoist/options';\nimport type { ParameterizedString } from './types-hoist/parameterize';\nimport type { SeverityLevel } from './types-hoist/severity';\nimport type { BaseTransportOptions, Transport } from './types-hoist/transport';\nimport { debug } from './utils/debug-logger';\nimport { eventFromMessage, eventFromUnknownInput } from './utils/eventbuilder';\nimport { uuid4 } from './utils/misc';\nimport { makePromiseBuffer } from './utils/promisebuffer';\nimport { resolvedSyncPromise } from './utils/syncpromise';\nimport { _getTraceInfoFromScope } from './utils/trace-info';\n\nexport interface ServerRuntimeClientOptions extends ClientOptions<BaseTransportOptions> {\n platform?: string;\n runtime?: { name: string; version?: string };\n serverName?: string;\n}\n\n/**\n * The Sentry Server Runtime Client SDK.\n */\nexport class ServerRuntimeClient<\n O extends ClientOptions & ServerRuntimeClientOptions = ServerRuntimeClientOptions,\n> extends Client<O> {\n private _disposeCallbacks: (() => void)[] = [];\n\n /**\n * Creates a new Edge SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: O) {\n // Server clients always support tracing\n registerSpanErrorInstrumentation();\n\n addUserAgentToTransportHeaders(options);\n\n super(options);\n\n this._setUpMetricsProcessing();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event> {\n const event = eventFromUnknownInput(this, this._options.stackParser, exception, hint);\n event.level = 'error';\n\n return resolvedSyncPromise(event);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(\n message: ParameterizedString,\n level: SeverityLevel = 'info',\n hint?: EventHint,\n ): PromiseLike<Event> {\n return resolvedSyncPromise(\n eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace),\n );\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: unknown, hint?: EventHint, scope?: Scope): string {\n setCurrentRequestSessionErroredOrCrashed(hint);\n return super.captureException(exception, hint, scope);\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string {\n // If the event is of type Exception, then a request session should be captured\n const isException = !event.type && event.exception?.values && event.exception.values.length > 0;\n if (isException) {\n setCurrentRequestSessionErroredOrCrashed(hint);\n }\n\n return super.captureEvent(event, hint, scope);\n }\n\n /**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\n public captureCheckIn(checkIn: CheckIn, monitorConfig?: MonitorConfig, scope?: Scope): string {\n const id = 'checkInId' in checkIn && checkIn.checkInId ? checkIn.checkInId : uuid4();\n if (!this._isEnabled()) {\n DEBUG_BUILD && debug.warn('SDK not enabled, will not capture check-in.');\n return id;\n }\n\n const options = this.getOptions();\n const { release, environment, tunnel } = options;\n\n const serializedCheckIn: SerializedCheckIn = {\n check_in_id: id,\n monitor_slug: checkIn.monitorSlug,\n status: checkIn.status,\n release,\n environment,\n };\n\n if ('duration' in checkIn) {\n serializedCheckIn.duration = checkIn.duration;\n }\n\n if (monitorConfig) {\n serializedCheckIn.monitor_config = {\n schedule: monitorConfig.schedule,\n checkin_margin: monitorConfig.checkinMargin,\n max_runtime: monitorConfig.maxRuntime,\n timezone: monitorConfig.timezone,\n failure_issue_threshold: monitorConfig.failureIssueThreshold,\n recovery_threshold: monitorConfig.recoveryThreshold,\n };\n }\n\n const [dynamicSamplingContext, traceContext] = _getTraceInfoFromScope(this, scope);\n if (traceContext) {\n serializedCheckIn.contexts = {\n trace: traceContext,\n };\n }\n\n const envelope = createCheckInEnvelope(\n serializedCheckIn,\n dynamicSamplingContext,\n this.getSdkMetadata(),\n tunnel,\n this.getDsn(),\n );\n\n DEBUG_BUILD && debug.log('Sending checkin:', checkIn.monitorSlug, checkIn.status);\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(envelope);\n\n return id;\n }\n\n /**\n * @inheritDoc\n */\n public override registerCleanup(callback: () => void): void {\n this._disposeCallbacks.push(callback);\n }\n\n /**\n * Disposes of the client and releases all resources.\n *\n * This method clears all internal state to allow the client to be garbage collected.\n * It clears hooks, event processors, integrations, transport, and other internal references.\n *\n * Call this method after flushing to allow the client to be garbage collected.\n * After calling dispose(), the client should not be used anymore.\n *\n * Subclasses should override this method to clean up their own resources and call `super.dispose()`.\n */\n public override dispose(): void {\n DEBUG_BUILD && debug.log('Disposing client...');\n\n // Run all registered cleanup callbacks\n for (const callback of this._disposeCallbacks) {\n try {\n callback();\n } catch {\n // Ignore errors in cleanup callbacks\n }\n }\n this._disposeCallbacks.length = 0;\n\n for (const hookName of Object.keys(this._hooks)) {\n this._hooks[hookName]?.clear();\n }\n\n this._hooks = {};\n this._eventProcessors.length = 0;\n this._integrations = {};\n this._outcomes = {};\n (this as unknown as { _transport?: Transport })._transport = undefined;\n this._promiseBuffer = makePromiseBuffer(DEFAULT_TRANSPORT_BUFFER_SIZE);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(\n event: Event,\n hint: EventHint,\n currentScope: Scope,\n isolationScope: Scope,\n ): PromiseLike<Event | null> {\n if (this._options.platform) {\n event.platform = event.platform || this._options.platform;\n }\n\n if (this._options.runtime) {\n event.contexts = {\n ...event.contexts,\n runtime: event.contexts?.runtime || this._options.runtime,\n };\n }\n\n if (this._options.serverName) {\n event.server_name = event.server_name || this._options.serverName;\n }\n\n return super._prepareEvent(event, hint, currentScope, isolationScope);\n }\n\n /**\n * Process a server-side metric before it is captured.\n */\n private _setUpMetricsProcessing(): void {\n this.on('processMetric', metric => {\n if (this._options.serverName) {\n metric.attributes = {\n 'server.address': this._options.serverName,\n ...metric.attributes,\n };\n }\n });\n }\n}\n\nfunction setCurrentRequestSessionErroredOrCrashed(eventHint?: EventHint): void {\n const requestSession = getIsolationScope().getScopeData().sdkProcessingMetadata.requestSession;\n if (requestSession) {\n // We mutate instead of doing `setSdkProcessingMetadata` because the http integration stores away a particular\n // isolationScope. If that isolation scope is forked, setting the processing metadata here will not mutate the\n // original isolation scope that the http integration stored away.\n const isHandledException = eventHint?.mechanism?.handled ?? true;\n // A request session can go from \"errored\" -> \"crashed\" but not \"crashed\" -> \"errored\".\n // Crashed (unhandled exception) is worse than errored (handled exception).\n if (isHandledException && requestSession.status !== 'crashed') {\n requestSession.status = 'errored';\n } else if (!isHandledException) {\n requestSession.status = 'crashed';\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AA2BA;AACA;AACA;AACO,MAAM;;AAEb,SAAU,MAAM,CAAI;AACpB,GAAE,MAAA,GAAA,CAAA,IAAA,CAAQ,iBAAiB,GAAmB,GAAC;;AAE/C;AACA;AACA;AACA;AACA,GAAS,WAAW,CAAC,OAAO,EAAK;AACjC;AACA,IAAI,gCAAgC,EAAE;;AAEtC,IAAI,8BAA8B,CAAC,OAAO,CAAC;;AAE3C,IAAI,KAAK,CAAC,OAAO,CAAA,CAAA,mBAAA,CAAA,SAAA,CAAA,MAAA,CAAA,IAAA,CAAA,IAAA,CAAA;AAEjB,IAAI,IAAI,CAAC,uBAAuB,EAAE;AAClC,EAAE;;AAEF;AACA;AACA;AACA,GAAS,kBAAkB,CAAC,SAAS,EAAW,IAAI,EAAkC;AACtF,IAAI,MAAM,KAAA,GAAQ,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,SAAS,EAA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;AACF;;AAEA,SAAS,wCAAwC,CAAC,SAAS,EAAoB;AAC/E,EAAE,MAAM,cAAA,GAAiB,iBAAiB,EAAE,CAAC,YAAY,EAAE,CAAC,qBAAqB,CAAC,cAAc;AAChG,EAAE,IAAI,cAAc,EAAE;AACtB;AACA;AACA;AACA,IAAI,MAAM,qBAAqB,SAAS,EAAE,SAAS,EAAE,OAAA,IAAW,IAAI;AACpE;AACA;AACA,IAAI,IAAI,kBAAA,IAAsB,cAAc,CAAC,MAAA,KAAW,SAAS,EAAE;AACnE,MAAM,cAAc,CAAC,MAAA,GAAS,SAAS;AACvC,IAAI,OAAO,IAAI,CAAC,kBAAkB,EAAE;AACpC,MAAM,cAAc,CAAC,MAAA,GAAS,SAAS;AACvC,IAAI;AACJ,EAAE;AACF;;;;"}
1
+ {"version":3,"file":"server-runtime-client.js","sources":["../../src/server-runtime-client.ts"],"sourcesContent":["import { createCheckInEnvelope } from './checkin';\nimport { Client } from './client';\nimport { getIsolationScope } from './currentScopes';\nimport { DEBUG_BUILD } from './debug-build';\nimport type { Scope } from './scope';\nimport { registerSpanErrorInstrumentation } from './tracing';\nimport { DEFAULT_TRANSPORT_BUFFER_SIZE } from './transports/base';\nimport { addUserAgentToTransportHeaders } from './transports/userAgent';\nimport type { CheckIn, MonitorConfig, SerializedCheckIn } from './types/checkin';\nimport type { Event, EventHint } from './types/event';\nimport type { ClientOptions } from './types/options';\nimport type { ParameterizedString } from './types/parameterize';\nimport type { SeverityLevel } from './types/severity';\nimport type { BaseTransportOptions, Transport } from './types/transport';\nimport { debug } from './utils/debug-logger';\nimport { eventFromMessage, eventFromUnknownInput } from './utils/eventbuilder';\nimport { uuid4 } from './utils/misc';\nimport { makePromiseBuffer } from './utils/promisebuffer';\nimport { resolvedSyncPromise } from './utils/syncpromise';\nimport { _getTraceInfoFromScope } from './utils/trace-info';\n\nexport interface ServerRuntimeClientOptions extends ClientOptions<BaseTransportOptions> {\n platform?: string;\n runtime?: { name: string; version?: string };\n serverName?: string;\n}\n\n/**\n * The Sentry Server Runtime Client SDK.\n */\nexport class ServerRuntimeClient<\n O extends ClientOptions & ServerRuntimeClientOptions = ServerRuntimeClientOptions,\n> extends Client<O> {\n private _disposeCallbacks: (() => void)[] = [];\n\n /**\n * Creates a new Edge SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: O) {\n // Server clients always support tracing\n registerSpanErrorInstrumentation();\n\n addUserAgentToTransportHeaders(options);\n\n super(options);\n\n this._setUpMetricsProcessing();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event> {\n const event = eventFromUnknownInput(this, this._options.stackParser, exception, hint);\n event.level = 'error';\n\n return resolvedSyncPromise(event);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(\n message: ParameterizedString,\n level: SeverityLevel = 'info',\n hint?: EventHint,\n ): PromiseLike<Event> {\n return resolvedSyncPromise(\n eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace),\n );\n }\n\n /**\n * @inheritDoc\n */\n public captureException(exception: unknown, hint?: EventHint, scope?: Scope): string {\n setCurrentRequestSessionErroredOrCrashed(hint);\n return super.captureException(exception, hint, scope);\n }\n\n /**\n * @inheritDoc\n */\n public captureEvent(event: Event, hint?: EventHint, scope?: Scope): string {\n // If the event is of type Exception, then a request session should be captured\n const isException = !event.type && event.exception?.values && event.exception.values.length > 0;\n if (isException) {\n setCurrentRequestSessionErroredOrCrashed(hint);\n }\n\n return super.captureEvent(event, hint, scope);\n }\n\n /**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\n public captureCheckIn(checkIn: CheckIn, monitorConfig?: MonitorConfig, scope?: Scope): string {\n const id = 'checkInId' in checkIn && checkIn.checkInId ? checkIn.checkInId : uuid4();\n if (!this._isEnabled()) {\n DEBUG_BUILD && debug.warn('SDK not enabled, will not capture check-in.');\n return id;\n }\n\n const options = this.getOptions();\n const { release, environment, tunnel } = options;\n\n const serializedCheckIn: SerializedCheckIn = {\n check_in_id: id,\n monitor_slug: checkIn.monitorSlug,\n status: checkIn.status,\n release,\n environment,\n };\n\n if ('duration' in checkIn) {\n serializedCheckIn.duration = checkIn.duration;\n }\n\n if (monitorConfig) {\n serializedCheckIn.monitor_config = {\n schedule: monitorConfig.schedule,\n checkin_margin: monitorConfig.checkinMargin,\n max_runtime: monitorConfig.maxRuntime,\n timezone: monitorConfig.timezone,\n failure_issue_threshold: monitorConfig.failureIssueThreshold,\n recovery_threshold: monitorConfig.recoveryThreshold,\n };\n }\n\n const [dynamicSamplingContext, traceContext] = _getTraceInfoFromScope(this, scope);\n if (traceContext) {\n serializedCheckIn.contexts = {\n trace: traceContext,\n };\n }\n\n const envelope = createCheckInEnvelope(\n serializedCheckIn,\n dynamicSamplingContext,\n this.getSdkMetadata(),\n tunnel,\n this.getDsn(),\n );\n\n DEBUG_BUILD && debug.log('Sending checkin:', checkIn.monitorSlug, checkIn.status);\n\n // sendEnvelope should not throw\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.sendEnvelope(envelope);\n\n return id;\n }\n\n /**\n * @inheritDoc\n */\n public override registerCleanup(callback: () => void): void {\n this._disposeCallbacks.push(callback);\n }\n\n /**\n * Disposes of the client and releases all resources.\n *\n * This method clears all internal state to allow the client to be garbage collected.\n * It clears hooks, event processors, integrations, transport, and other internal references.\n *\n * Call this method after flushing to allow the client to be garbage collected.\n * After calling dispose(), the client should not be used anymore.\n *\n * Subclasses should override this method to clean up their own resources and call `super.dispose()`.\n */\n public override dispose(): void {\n DEBUG_BUILD && debug.log('Disposing client...');\n\n // Run all registered cleanup callbacks\n for (const callback of this._disposeCallbacks) {\n try {\n callback();\n } catch {\n // Ignore errors in cleanup callbacks\n }\n }\n this._disposeCallbacks.length = 0;\n\n for (const hookName of Object.keys(this._hooks)) {\n this._hooks[hookName]?.clear();\n }\n\n this._hooks = {};\n this._eventProcessors.length = 0;\n this._integrations = {};\n this._outcomes = {};\n (this as unknown as { _transport?: Transport })._transport = undefined;\n this._promiseBuffer = makePromiseBuffer(DEFAULT_TRANSPORT_BUFFER_SIZE);\n }\n\n /**\n * @inheritDoc\n */\n protected _prepareEvent(\n event: Event,\n hint: EventHint,\n currentScope: Scope,\n isolationScope: Scope,\n ): PromiseLike<Event | null> {\n if (this._options.platform) {\n event.platform = event.platform || this._options.platform;\n }\n\n if (this._options.runtime) {\n event.contexts = {\n ...event.contexts,\n runtime: event.contexts?.runtime || this._options.runtime,\n };\n }\n\n if (this._options.serverName) {\n event.server_name = event.server_name || this._options.serverName;\n }\n\n return super._prepareEvent(event, hint, currentScope, isolationScope);\n }\n\n /**\n * Process a server-side metric before it is captured.\n */\n private _setUpMetricsProcessing(): void {\n this.on('processMetric', metric => {\n if (this._options.serverName) {\n metric.attributes = {\n 'server.address': this._options.serverName,\n ...metric.attributes,\n };\n }\n });\n }\n}\n\nfunction setCurrentRequestSessionErroredOrCrashed(eventHint?: EventHint): void {\n const requestSession = getIsolationScope().getScopeData().sdkProcessingMetadata.requestSession;\n if (requestSession) {\n // We mutate instead of doing `setSdkProcessingMetadata` because the http integration stores away a particular\n // isolationScope. If that isolation scope is forked, setting the processing metadata here will not mutate the\n // original isolation scope that the http integration stored away.\n const isHandledException = eventHint?.mechanism?.handled ?? true;\n // A request session can go from \"errored\" -> \"crashed\" but not \"crashed\" -> \"errored\".\n // Crashed (unhandled exception) is worse than errored (handled exception).\n if (isHandledException && requestSession.status !== 'crashed') {\n requestSession.status = 'errored';\n } else if (!isHandledException) {\n requestSession.status = 'crashed';\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AA8BO,MAAM,4BAEH,MAAA,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA,EAOX,YAAY,OAAA,EAAY;AAE7B,IAAA,gCAAA,EAAiC;AAEjC,IAAA,8BAAA,CAA+B,OAAO,CAAA;AAEtC,IAAA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cAAA;AAChF,EAAA,IAAI,cAAA,EAAgB;AAIlB,IAAA,MAAM,kBAAA,GAAqB,SAAA,EAAW,SAAA,EAAW,OAAA,IAAW,IAAA;AAG5D,IAAA,IAAI,kBAAA,IAAsB,cAAA,CAAe,MAAA,KAAW,SAAA,EAAW;AAC7D,MAAA,cAAA,CAAe,MAAA,GAAS,SAAA;AAAA,IAC1B,CAAA,MAAA,IAAW,CAAC,kBAAA,EAAoB;AAC9B,MAAA,cAAA,CAAe,MAAA,GAAS,SAAA;AAAA,IAC1B;AAAA,EACF;AACF;;;;"}
@@ -10,7 +10,7 @@ export { setMeasurement, timedEventsToMeasurements } from './tracing/measurement
10
10
  export { sampleSpan } from './tracing/sampling.js';
11
11
  export { logSpanEnd, logSpanStart } from './tracing/logSpans.js';
12
12
  export { captureSpan, safeSetSpanJSONAttributes } from './tracing/spans/captureSpan.js';
13
- export { GEN_AI_CONVERSATION_ID_ATTRIBUTE, SEMANTIC_ATTRIBUTE_CACHE_HIT, SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, SEMANTIC_ATTRIBUTE_CACHE_KEY, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_RELEASE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME, SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID, SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_URL_FULL, SEMANTIC_ATTRIBUTE_USER_EMAIL, SEMANTIC_ATTRIBUTE_USER_ID, SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS, SEMANTIC_ATTRIBUTE_USER_USERNAME, SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE } from './semanticAttributes.js';
13
+ export { GEN_AI_CONVERSATION_ID_ATTRIBUTE, SEMANTIC_ATTRIBUTE_CACHE_HIT, SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, SEMANTIC_ATTRIBUTE_CACHE_KEY, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_RELEASE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS, SEMANTIC_ATTRIBUTE_SENTRY_SDK_NAME, SEMANTIC_ATTRIBUTE_SENTRY_SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_ID, SEMANTIC_ATTRIBUTE_SENTRY_SEGMENT_NAME, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_URL_FULL, SEMANTIC_ATTRIBUTE_USER_EMAIL, SEMANTIC_ATTRIBUTE_USER_ID, SEMANTIC_ATTRIBUTE_USER_IP_ADDRESS, SEMANTIC_ATTRIBUTE_USER_USERNAME, SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE } from './semanticAttributes.js';
14
14
  export { createEventEnvelope, createSessionEnvelope, createSpanEnvelope } from './envelope.js';
15
15
  export { addEventProcessor, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, endSession, flush, isEnabled, isInitialized, lastEventId, setContext, setConversationId, setExtra, setExtras, setTag, setTags, setUser, startSession, withMonitor } from './exports.js';
16
16
  export { getClient, getCurrentScope, getExternalPropagationContext, getGlobalScope, getIsolationScope, getTraceContextFromScope, hasExternalPropagationContext, registerExternalPropagationContext, withIsolationScope, withScope } from './currentScopes.js';
@@ -28,6 +28,9 @@ export { makeOfflineTransport } from './transports/offline.js';
28
28
  export { MULTIPLEXED_TRANSPORT_EXTRA_KEY, makeMultiplexedTransport } from './transports/multiplexed.js';
29
29
  export { addIntegration, defineIntegration, getIntegrationsToSetup, installedIntegrations } from './integration.js';
30
30
  export { _INTERNAL_clearAiProviderSkips, _INTERNAL_shouldSkipAiProviderWrapping, _INTERNAL_skipAiProviderWrapping } from './utils/ai/providerSkip.js';
31
+ export { filterKeyValueData as _INTERNAL_filterKeyValueData } from './utils/data-collection/filterKeyValueData.js';
32
+ export { filterCookies as _INTERNAL_filterCookies } from './utils/data-collection/filterCookies.js';
33
+ export { filterQueryParams as _INTERNAL_filterQueryParams } from './utils/data-collection/filterQueryParams.js';
31
34
  export { envToBool } from './utils/envToBool.js';
32
35
  export { applyScopeDataToEvent, getCombinedScopeData, mergeScopeData } from './utils/scopeData.js';
33
36
  export { prepareEvent } from './utils/prepareEvent.js';
@@ -89,6 +92,7 @@ export { ANTHROPIC_AI_INTEGRATION_NAME } from './tracing/anthropic-ai/constants.
89
92
  export { instrumentGoogleGenAIClient } from './tracing/google-genai/index.js';
90
93
  export { GOOGLE_GENAI_INTEGRATION_NAME } from './tracing/google-genai/constants.js';
91
94
  export { createLangChainCallbackHandler } from './tracing/langchain/index.js';
95
+ export { _INTERNAL_mergeLangChainCallbackHandler } from './tracing/langchain/utils.js';
92
96
  export { LANGCHAIN_INTEGRATION_NAME } from './tracing/langchain/constants.js';
93
97
  export { instrumentCreateReactAgent, instrumentLangGraph, instrumentStateGraphCompile } from './tracing/langgraph/index.js';
94
98
  export { LANGGRAPH_INTEGRATION_NAME } from './tracing/langgraph/constants.js';
@@ -150,6 +154,8 @@ export { expressErrorHandler, patchExpressModule, setupExpressErrorHandler } fro
150
154
  export { instrumentPostgresJsSql } from './integrations/postgresjs.js';
151
155
  export { patchHttpModuleClient } from './integrations/http/client-patch.js';
152
156
  export { getHttpClientSubscriptions } from './integrations/http/client-subscriptions.js';
157
+ export { getHttpServerSubscriptions, isStaticAssetRequest } from './integrations/http/server-subscription.js';
158
+ export { recordRequestSession } from './integrations/http/record-request-session.js';
153
159
  export { addOutgoingRequestBreadcrumb } from './integrations/http/add-outgoing-request-breadcrumb.js';
154
160
  export { getRequestOptions, getRequestUrl, getRequestUrlFromClientRequest, getRequestUrlObject } from './integrations/http/get-request-url.js';
155
161
  export { HTTP_ON_CLIENT_REQUEST, HTTP_ON_SERVER_REQUEST } from './integrations/http/constants.js';
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,85 +1,55 @@
1
1
  import { uuid4 } from './utils/misc.js';
2
2
  import { timestampInSeconds } from './utils/time.js';
3
3
 
4
- /**
5
- * Creates a new `Session` object by setting certain default parameters. If optional @param context
6
- * is passed, the passed properties are applied to the session object.
7
- *
8
- * @param context (optional) additional properties to be applied to the returned session object
9
- *
10
- * @returns a new `Session` object
11
- */
12
4
  function makeSession(context) {
13
- // Both timestamp and started are in seconds since the UNIX epoch.
14
5
  const startingTime = timestampInSeconds();
15
-
16
6
  const session = {
17
7
  sid: uuid4(),
18
8
  init: true,
19
9
  timestamp: startingTime,
20
10
  started: startingTime,
21
11
  duration: 0,
22
- status: 'ok',
12
+ status: "ok",
23
13
  errors: 0,
24
14
  ignoreDuration: false,
25
- toJSON: () => sessionToJSON(session),
15
+ toJSON: () => sessionToJSON(session)
26
16
  };
27
-
28
17
  if (context) {
29
18
  updateSession(session, context);
30
19
  }
31
-
32
20
  return session;
33
21
  }
34
-
35
- /**
36
- * Updates a session object with the properties passed in the context.
37
- *
38
- * Note that this function mutates the passed object and returns void.
39
- * (Had to do this instead of returning a new and updated session because closing and sending a session
40
- * makes an update to the session after it was passed to the sending logic.
41
- * @see Client.captureSession )
42
- *
43
- * @param session the `Session` to update
44
- * @param context the `SessionContext` holding the properties that should be updated in @param session
45
- */
46
- // eslint-disable-next-line complexity
47
22
  function updateSession(session, context = {}) {
48
23
  if (context.user) {
49
24
  if (!session.ipAddress && context.user.ip_address) {
50
25
  session.ipAddress = context.user.ip_address;
51
26
  }
52
-
53
27
  if (!session.did && !context.did) {
54
28
  session.did = context.user.id || context.user.email || context.user.username;
55
29
  }
56
30
  }
57
-
58
31
  session.timestamp = context.timestamp || timestampInSeconds();
59
-
60
32
  if (context.abnormal_mechanism) {
61
33
  session.abnormal_mechanism = context.abnormal_mechanism;
62
34
  }
63
-
64
35
  if (context.ignoreDuration) {
65
36
  session.ignoreDuration = context.ignoreDuration;
66
37
  }
67
38
  if (context.sid) {
68
- // Good enough uuid validation. — Kamil
69
39
  session.sid = context.sid.length === 32 ? context.sid : uuid4();
70
40
  }
71
- if (context.init !== undefined) {
41
+ if (context.init !== void 0) {
72
42
  session.init = context.init;
73
43
  }
74
44
  if (!session.did && context.did) {
75
45
  session.did = `${context.did}`;
76
46
  }
77
- if (typeof context.started === 'number') {
47
+ if (typeof context.started === "number") {
78
48
  session.started = context.started;
79
49
  }
80
50
  if (session.ignoreDuration) {
81
- session.duration = undefined;
82
- } else if (typeof context.duration === 'number') {
51
+ session.duration = void 0;
52
+ } else if (typeof context.duration === "number") {
83
53
  session.duration = context.duration;
84
54
  } else {
85
55
  const duration = session.timestamp - session.started;
@@ -97,63 +67,40 @@ function updateSession(session, context = {}) {
97
67
  if (!session.userAgent && context.userAgent) {
98
68
  session.userAgent = context.userAgent;
99
69
  }
100
- if (typeof context.errors === 'number') {
70
+ if (typeof context.errors === "number") {
101
71
  session.errors = context.errors;
102
72
  }
103
73
  if (context.status) {
104
74
  session.status = context.status;
105
75
  }
106
76
  }
107
-
108
- /**
109
- * Closes a session by setting its status and updating the session object with it.
110
- * Internally calls `updateSession` to update the passed session object.
111
- *
112
- * Note that this function mutates the passed session (@see updateSession for explanation).
113
- *
114
- * @param session the `Session` object to be closed
115
- * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,
116
- * this function will keep the previously set status, unless it was `'ok'` in which case
117
- * it is changed to `'exited'`.
118
- */
119
77
  function closeSession(session, status) {
120
78
  let context = {};
121
79
  if (status) {
122
80
  context = { status };
123
- } else if (session.status === 'ok') {
124
- context = { status: 'exited' };
81
+ } else if (session.status === "ok") {
82
+ context = { status: "exited" };
125
83
  }
126
-
127
84
  updateSession(session, context);
128
85
  }
129
-
130
- /**
131
- * Serializes a passed session object to a JSON object with a slightly different structure.
132
- * This is necessary because the Sentry backend requires a slightly different schema of a session
133
- * than the one the JS SDKs use internally.
134
- *
135
- * @param session the session to be converted
136
- *
137
- * @returns a JSON object of the passed session
138
- */
139
86
  function sessionToJSON(session) {
140
87
  return {
141
88
  sid: `${session.sid}`,
142
89
  init: session.init,
143
90
  // Make sure that sec is converted to ms for date constructor
144
- started: new Date(session.started * 1000).toISOString(),
145
- timestamp: new Date(session.timestamp * 1000).toISOString(),
91
+ started: new Date(session.started * 1e3).toISOString(),
92
+ timestamp: new Date(session.timestamp * 1e3).toISOString(),
146
93
  status: session.status,
147
94
  errors: session.errors,
148
- did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,
95
+ did: typeof session.did === "number" || typeof session.did === "string" ? `${session.did}` : void 0,
149
96
  duration: session.duration,
150
97
  abnormal_mechanism: session.abnormal_mechanism,
151
98
  attrs: {
152
99
  release: session.release,
153
100
  environment: session.environment,
154
101
  ip_address: session.ipAddress,
155
- user_agent: session.userAgent,
156
- },
102
+ user_agent: session.userAgent
103
+ }
157
104
  };
158
105
  }
159
106
 
@@ -1 +1 @@
1
- {"version":3,"file":"session.js","sources":["../../src/session.ts"],"sourcesContent":["import type { SerializedSession, Session, SessionContext, SessionStatus } from './types-hoist/session';\nimport { uuid4 } from './utils/misc';\nimport { timestampInSeconds } from './utils/time';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nexport function makeSession(context?: Omit<SessionContext, 'started' | 'status'>): Session {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n\n const session: Session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see Client.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nexport function updateSession(session: Session, context: SessionContext = {}): void {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || timestampInSeconds();\n\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nexport function closeSession(session: Session, status?: Exclude<SessionStatus, 'ok'>): void {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session: Session): SerializedSession {\n return {\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n };\n}\n"],"names":[],"mappings":";;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,WAAW,CAAC,OAAO,EAAwD;AAC3F;AACA,EAAE,MAAM,YAAA,GAAe,kBAAkB,EAAE;;AAE3C,EAAE,MAAM,OAAO,GAAY;AAC3B,IAAI,GAAG,EAAE,KAAK,EAAE;AAChB,IAAI,IAAI,EAAE,IAAI;AACd,IAAI,SAAS,EAAE,YAAY;AAC3B,IAAI,OAAO,EAAE,YAAY;AACzB,IAAI,QAAQ,EAAE,CAAC;AACf,IAAI,MAAM,EAAE,IAAI;AAChB,IAAI,MAAM,EAAE,CAAC;AACb,IAAI,cAAc,EAAE,KAAK;AACzB,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC,OAAO,CAAC;AACxC,GAAG;;AAEH,EAAE,IAAI,OAAO,EAAE;AACf,IAAI,aAAa,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AAA,kBAAA,EAAA,OAAA,CAAA,kBAAA;AACA,IAAA,KAAA,EAAA;AACA,MAAA,OAAA,EAAA,OAAA,CAAA,OAAA;AACA,MAAA,WAAA,EAAA,OAAA,CAAA,WAAA;AACA,MAAA,UAAA,EAAA,OAAA,CAAA,SAAA;AACA,MAAA,UAAA,EAAA,OAAA,CAAA,SAAA;AACA,KAAA;AACA,GAAA;AACA;;;;"}
1
+ {"version":3,"file":"session.js","sources":["../../src/session.ts"],"sourcesContent":["import type { SerializedSession, Session, SessionContext, SessionStatus } from './types/session';\nimport { uuid4 } from './utils/misc';\nimport { timestampInSeconds } from './utils/time';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nexport function makeSession(context?: Omit<SessionContext, 'started' | 'status'>): Session {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n\n const session: Session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see Client.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nexport function updateSession(session: Session, context: SessionContext = {}): void {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || timestampInSeconds();\n\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nexport function closeSession(session: Session, status?: Exclude<SessionStatus, 'ok'>): void {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session: Session): SerializedSession {\n return {\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n };\n}\n"],"names":[],"mappings":";;;AAYO,SAAS,YAAY,OAAA,EAA+D;AAEzF,EAAA,MAAM,eAAe,kBAAA,EAAmB;AAExC,EAAA,MAAM,OAAA,GAAmB;AAAA,IACvB,KAAK,KAAA,EAAM;AAAA,IACX,IAAA,EAAM,IAAA;AAAA,IACN,SAAA,EAAW,YAAA;AAAA,IACX,OAAA,EAAS,YAAA;AAAA,IACT,QAAA,EAAU,CAAA;AAAA,IACV,MAAA,EAAQ,IAAA;AAAA,IACR,MAAA,EAAQ,CAAA;AAAA,IACR,cAAA,EAAgB,KAAA;AAAA,IAChB,MAAA,EAAQ,MAAM,aAAA,CAAc,OAAO;AAAA,GACrC;AAEA,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,aAAA,CAAc,SAAS,OAAO,CAAA;AAAA,EAChC;AAEA,EAAA,OAAO,OAAA;AACT;AAcO,SAAS,aAAA,CAAc,OAAA,EAAkB,OAAA,GAA0B,EAAC,EAAS;AAClF,EAAA,IAAI,QAAQ,IAAA,EAAM;AAChB,IAAA,IAAI,CAAC,OAAA,CAAQ,SAAA,IAAa,OAAA,CAAQ,KAAK,UAAA,EAAY;AACjD,MAAA,OAAA,CAAQ,SAAA,GAAY,QAAQ,IAAA,CAAK,UAAA;AAAA,IACnC;AAEA,IAAA,IAAI,CAAC,OAAA,CAAQ,GAAA,IAAO,CAAC,QAAQ,GAAA,EAAK;AAChC,MAAA,OAAA,CAAQ,GAAA,GAAM,QAAQ,IAAA,CAAK,EAAA,IAAM,QAAQ,IAAA,CAAK,KAAA,IAAS,QAAQ,IAAA,CAAK,QAAA;AAAA,IACtE;AAAA,EACF;AAEA,EAAA,OAAA,CAAQ,SAAA,GAAY,OAAA,CAAQ,SAAA,IAA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