@sentry/browser 10.53.1 → 10.55.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 (457) hide show
  1. package/build/npm/cjs/dev/client.js +15 -54
  2. package/build/npm/cjs/dev/client.js.map +1 -1
  3. package/build/npm/cjs/dev/debug-build.js +0 -5
  4. package/build/npm/cjs/dev/debug-build.js.map +1 -1
  5. package/build/npm/cjs/dev/diagnose-sdk.js +15 -37
  6. package/build/npm/cjs/dev/diagnose-sdk.js.map +1 -1
  7. package/build/npm/cjs/dev/eventbuilder.js +59 -217
  8. package/build/npm/cjs/dev/eventbuilder.js.map +1 -1
  9. package/build/npm/cjs/dev/feedbackAsync.js +1 -5
  10. package/build/npm/cjs/dev/feedbackAsync.js.map +1 -1
  11. package/build/npm/cjs/dev/feedbackSync.js +1 -2
  12. package/build/npm/cjs/dev/feedbackSync.js.map +1 -1
  13. package/build/npm/cjs/dev/helpers.js +24 -102
  14. package/build/npm/cjs/dev/helpers.js.map +1 -1
  15. package/build/npm/cjs/dev/index.js +4 -0
  16. package/build/npm/cjs/dev/index.js.map +1 -1
  17. package/build/npm/cjs/dev/integrations/breadcrumbs.js +53 -135
  18. package/build/npm/cjs/dev/integrations/breadcrumbs.js.map +1 -1
  19. package/build/npm/cjs/dev/integrations/browserapierrors.js +45 -111
  20. package/build/npm/cjs/dev/integrations/browserapierrors.js.map +1 -1
  21. package/build/npm/cjs/dev/integrations/browsersession.js +7 -35
  22. package/build/npm/cjs/dev/integrations/browsersession.js.map +1 -1
  23. package/build/npm/cjs/dev/integrations/contextlines.js +9 -45
  24. package/build/npm/cjs/dev/integrations/contextlines.js.map +1 -1
  25. package/build/npm/cjs/dev/integrations/culturecontext.js +11 -36
  26. package/build/npm/cjs/dev/integrations/culturecontext.js.map +1 -1
  27. package/build/npm/cjs/dev/integrations/featureFlags/growthbook/integration.js +1 -22
  28. package/build/npm/cjs/dev/integrations/featureFlags/growthbook/integration.js.map +1 -1
  29. package/build/npm/cjs/dev/integrations/featureFlags/launchdarkly/integration.js +6 -31
  30. package/build/npm/cjs/dev/integrations/featureFlags/launchdarkly/integration.js.map +1 -1
  31. package/build/npm/cjs/dev/integrations/featureFlags/openfeature/integration.js +6 -12
  32. package/build/npm/cjs/dev/integrations/featureFlags/openfeature/integration.js.map +1 -1
  33. package/build/npm/cjs/dev/integrations/featureFlags/statsig/integration.js +5 -30
  34. package/build/npm/cjs/dev/integrations/featureFlags/statsig/integration.js.map +1 -1
  35. package/build/npm/cjs/dev/integrations/featureFlags/unleash/integration.js +10 -47
  36. package/build/npm/cjs/dev/integrations/featureFlags/unleash/integration.js.map +1 -1
  37. package/build/npm/cjs/dev/integrations/fetchStreamPerformance.js +60 -0
  38. package/build/npm/cjs/dev/integrations/fetchStreamPerformance.js.map +1 -0
  39. package/build/npm/cjs/dev/integrations/globalhandlers.js +38 -99
  40. package/build/npm/cjs/dev/integrations/globalhandlers.js.map +1 -1
  41. package/build/npm/cjs/dev/integrations/graphqlClient.js +31 -119
  42. package/build/npm/cjs/dev/integrations/graphqlClient.js.map +1 -1
  43. package/build/npm/cjs/dev/integrations/httpclient.js +43 -203
  44. package/build/npm/cjs/dev/integrations/httpclient.js.map +1 -1
  45. package/build/npm/cjs/dev/integrations/httpcontext.js +7 -17
  46. package/build/npm/cjs/dev/integrations/httpcontext.js.map +1 -1
  47. package/build/npm/cjs/dev/integrations/linkederrors.js +7 -15
  48. package/build/npm/cjs/dev/integrations/linkederrors.js.map +1 -1
  49. package/build/npm/cjs/dev/integrations/reportingobserver.js +19 -44
  50. package/build/npm/cjs/dev/integrations/reportingobserver.js.map +1 -1
  51. package/build/npm/cjs/dev/integrations/spanstreaming.js +11 -29
  52. package/build/npm/cjs/dev/integrations/spanstreaming.js.map +1 -1
  53. package/build/npm/cjs/dev/integrations/spotlight.js +17 -30
  54. package/build/npm/cjs/dev/integrations/spotlight.js.map +1 -1
  55. package/build/npm/cjs/dev/integrations/view-hierarchy.js +19 -46
  56. package/build/npm/cjs/dev/integrations/view-hierarchy.js.map +1 -1
  57. package/build/npm/cjs/dev/integrations/webWorker.js +40 -211
  58. package/build/npm/cjs/dev/integrations/webWorker.js.map +1 -1
  59. package/build/npm/cjs/dev/normalizeStringifyValue.js +27 -0
  60. package/build/npm/cjs/dev/normalizeStringifyValue.js.map +1 -0
  61. package/build/npm/cjs/dev/profiling/UIProfiler.js +87 -190
  62. package/build/npm/cjs/dev/profiling/UIProfiler.js.map +1 -1
  63. package/build/npm/cjs/dev/profiling/index.js +9 -30
  64. package/build/npm/cjs/dev/profiling/index.js.map +1 -1
  65. package/build/npm/cjs/dev/profiling/integration.js +30 -64
  66. package/build/npm/cjs/dev/profiling/integration.js.map +1 -1
  67. package/build/npm/cjs/dev/profiling/startProfileForSpan.js +28 -84
  68. package/build/npm/cjs/dev/profiling/startProfileForSpan.js.map +1 -1
  69. package/build/npm/cjs/dev/profiling/utils.js +131 -398
  70. package/build/npm/cjs/dev/profiling/utils.js.map +1 -1
  71. package/build/npm/cjs/dev/report-dialog.js +10 -25
  72. package/build/npm/cjs/dev/report-dialog.js.map +1 -1
  73. package/build/npm/cjs/dev/sdk.js +10 -76
  74. package/build/npm/cjs/dev/sdk.js.map +1 -1
  75. package/build/npm/cjs/dev/stack-parsers.js +42 -126
  76. package/build/npm/cjs/dev/stack-parsers.js.map +1 -1
  77. package/build/npm/cjs/dev/tracing/backgroundtab.js +4 -16
  78. package/build/npm/cjs/dev/tracing/backgroundtab.js.map +1 -1
  79. package/build/npm/cjs/dev/tracing/browserTracingIntegration.js +102 -291
  80. package/build/npm/cjs/dev/tracing/browserTracingIntegration.js.map +1 -1
  81. package/build/npm/cjs/dev/tracing/linkedTraces.js +25 -116
  82. package/build/npm/cjs/dev/tracing/linkedTraces.js.map +1 -1
  83. package/build/npm/cjs/dev/tracing/reportPageLoaded.js +1 -9
  84. package/build/npm/cjs/dev/tracing/reportPageLoaded.js.map +1 -1
  85. package/build/npm/cjs/dev/tracing/request.js +58 -223
  86. package/build/npm/cjs/dev/tracing/request.js.map +1 -1
  87. package/build/npm/cjs/dev/tracing/setActiveSpan.js +1 -48
  88. package/build/npm/cjs/dev/tracing/setActiveSpan.js.map +1 -1
  89. package/build/npm/cjs/dev/tracing/utils.js +4 -27
  90. package/build/npm/cjs/dev/tracing/utils.js.map +1 -1
  91. package/build/npm/cjs/dev/transports/fetch.js +10 -23
  92. package/build/npm/cjs/dev/transports/fetch.js.map +1 -1
  93. package/build/npm/cjs/dev/transports/offline.js +27 -84
  94. package/build/npm/cjs/dev/transports/offline.js.map +1 -1
  95. package/build/npm/cjs/dev/userfeedback.js +12 -22
  96. package/build/npm/cjs/dev/userfeedback.js.map +1 -1
  97. package/build/npm/cjs/dev/utils/detectBrowserExtension.js +5 -26
  98. package/build/npm/cjs/dev/utils/detectBrowserExtension.js.map +1 -1
  99. package/build/npm/cjs/dev/utils/lazyLoadIntegration.js +40 -75
  100. package/build/npm/cjs/dev/utils/lazyLoadIntegration.js.map +1 -1
  101. package/build/npm/cjs/prod/client.js +15 -54
  102. package/build/npm/cjs/prod/client.js.map +1 -1
  103. package/build/npm/cjs/prod/debug-build.js +0 -5
  104. package/build/npm/cjs/prod/debug-build.js.map +1 -1
  105. package/build/npm/cjs/prod/diagnose-sdk.js +15 -37
  106. package/build/npm/cjs/prod/diagnose-sdk.js.map +1 -1
  107. package/build/npm/cjs/prod/eventbuilder.js +59 -217
  108. package/build/npm/cjs/prod/eventbuilder.js.map +1 -1
  109. package/build/npm/cjs/prod/feedbackAsync.js +1 -5
  110. package/build/npm/cjs/prod/feedbackAsync.js.map +1 -1
  111. package/build/npm/cjs/prod/feedbackSync.js +1 -2
  112. package/build/npm/cjs/prod/feedbackSync.js.map +1 -1
  113. package/build/npm/cjs/prod/helpers.js +24 -102
  114. package/build/npm/cjs/prod/helpers.js.map +1 -1
  115. package/build/npm/cjs/prod/index.js +4 -0
  116. package/build/npm/cjs/prod/index.js.map +1 -1
  117. package/build/npm/cjs/prod/integrations/breadcrumbs.js +53 -135
  118. package/build/npm/cjs/prod/integrations/breadcrumbs.js.map +1 -1
  119. package/build/npm/cjs/prod/integrations/browserapierrors.js +45 -111
  120. package/build/npm/cjs/prod/integrations/browserapierrors.js.map +1 -1
  121. package/build/npm/cjs/prod/integrations/browsersession.js +7 -35
  122. package/build/npm/cjs/prod/integrations/browsersession.js.map +1 -1
  123. package/build/npm/cjs/prod/integrations/contextlines.js +9 -45
  124. package/build/npm/cjs/prod/integrations/contextlines.js.map +1 -1
  125. package/build/npm/cjs/prod/integrations/culturecontext.js +11 -36
  126. package/build/npm/cjs/prod/integrations/culturecontext.js.map +1 -1
  127. package/build/npm/cjs/prod/integrations/featureFlags/growthbook/integration.js +1 -22
  128. package/build/npm/cjs/prod/integrations/featureFlags/growthbook/integration.js.map +1 -1
  129. package/build/npm/cjs/prod/integrations/featureFlags/launchdarkly/integration.js +6 -31
  130. package/build/npm/cjs/prod/integrations/featureFlags/launchdarkly/integration.js.map +1 -1
  131. package/build/npm/cjs/prod/integrations/featureFlags/openfeature/integration.js +6 -12
  132. package/build/npm/cjs/prod/integrations/featureFlags/openfeature/integration.js.map +1 -1
  133. package/build/npm/cjs/prod/integrations/featureFlags/statsig/integration.js +5 -30
  134. package/build/npm/cjs/prod/integrations/featureFlags/statsig/integration.js.map +1 -1
  135. package/build/npm/cjs/prod/integrations/featureFlags/unleash/integration.js +10 -47
  136. package/build/npm/cjs/prod/integrations/featureFlags/unleash/integration.js.map +1 -1
  137. package/build/npm/cjs/prod/integrations/fetchStreamPerformance.js +60 -0
  138. package/build/npm/cjs/prod/integrations/fetchStreamPerformance.js.map +1 -0
  139. package/build/npm/cjs/prod/integrations/globalhandlers.js +38 -99
  140. package/build/npm/cjs/prod/integrations/globalhandlers.js.map +1 -1
  141. package/build/npm/cjs/prod/integrations/graphqlClient.js +31 -119
  142. package/build/npm/cjs/prod/integrations/graphqlClient.js.map +1 -1
  143. package/build/npm/cjs/prod/integrations/httpclient.js +43 -203
  144. package/build/npm/cjs/prod/integrations/httpclient.js.map +1 -1
  145. package/build/npm/cjs/prod/integrations/httpcontext.js +7 -17
  146. package/build/npm/cjs/prod/integrations/httpcontext.js.map +1 -1
  147. package/build/npm/cjs/prod/integrations/linkederrors.js +7 -15
  148. package/build/npm/cjs/prod/integrations/linkederrors.js.map +1 -1
  149. package/build/npm/cjs/prod/integrations/reportingobserver.js +19 -44
  150. package/build/npm/cjs/prod/integrations/reportingobserver.js.map +1 -1
  151. package/build/npm/cjs/prod/integrations/spanstreaming.js +11 -29
  152. package/build/npm/cjs/prod/integrations/spanstreaming.js.map +1 -1
  153. package/build/npm/cjs/prod/integrations/spotlight.js +17 -30
  154. package/build/npm/cjs/prod/integrations/spotlight.js.map +1 -1
  155. package/build/npm/cjs/prod/integrations/view-hierarchy.js +19 -46
  156. package/build/npm/cjs/prod/integrations/view-hierarchy.js.map +1 -1
  157. package/build/npm/cjs/prod/integrations/webWorker.js +40 -211
  158. package/build/npm/cjs/prod/integrations/webWorker.js.map +1 -1
  159. package/build/npm/cjs/prod/normalizeStringifyValue.js +27 -0
  160. package/build/npm/cjs/prod/normalizeStringifyValue.js.map +1 -0
  161. package/build/npm/cjs/prod/profiling/UIProfiler.js +87 -190
  162. package/build/npm/cjs/prod/profiling/UIProfiler.js.map +1 -1
  163. package/build/npm/cjs/prod/profiling/index.js +9 -30
  164. package/build/npm/cjs/prod/profiling/index.js.map +1 -1
  165. package/build/npm/cjs/prod/profiling/integration.js +30 -64
  166. package/build/npm/cjs/prod/profiling/integration.js.map +1 -1
  167. package/build/npm/cjs/prod/profiling/startProfileForSpan.js +28 -84
  168. package/build/npm/cjs/prod/profiling/startProfileForSpan.js.map +1 -1
  169. package/build/npm/cjs/prod/profiling/utils.js +131 -398
  170. package/build/npm/cjs/prod/profiling/utils.js.map +1 -1
  171. package/build/npm/cjs/prod/report-dialog.js +10 -25
  172. package/build/npm/cjs/prod/report-dialog.js.map +1 -1
  173. package/build/npm/cjs/prod/sdk.js +7 -73
  174. package/build/npm/cjs/prod/sdk.js.map +1 -1
  175. package/build/npm/cjs/prod/stack-parsers.js +42 -126
  176. package/build/npm/cjs/prod/stack-parsers.js.map +1 -1
  177. package/build/npm/cjs/prod/tracing/backgroundtab.js +4 -16
  178. package/build/npm/cjs/prod/tracing/backgroundtab.js.map +1 -1
  179. package/build/npm/cjs/prod/tracing/browserTracingIntegration.js +102 -291
  180. package/build/npm/cjs/prod/tracing/browserTracingIntegration.js.map +1 -1
  181. package/build/npm/cjs/prod/tracing/linkedTraces.js +25 -117
  182. package/build/npm/cjs/prod/tracing/linkedTraces.js.map +1 -1
  183. package/build/npm/cjs/prod/tracing/reportPageLoaded.js +1 -9
  184. package/build/npm/cjs/prod/tracing/reportPageLoaded.js.map +1 -1
  185. package/build/npm/cjs/prod/tracing/request.js +58 -223
  186. package/build/npm/cjs/prod/tracing/request.js.map +1 -1
  187. package/build/npm/cjs/prod/tracing/setActiveSpan.js +1 -48
  188. package/build/npm/cjs/prod/tracing/setActiveSpan.js.map +1 -1
  189. package/build/npm/cjs/prod/tracing/utils.js +4 -27
  190. package/build/npm/cjs/prod/tracing/utils.js.map +1 -1
  191. package/build/npm/cjs/prod/transports/fetch.js +10 -23
  192. package/build/npm/cjs/prod/transports/fetch.js.map +1 -1
  193. package/build/npm/cjs/prod/transports/offline.js +27 -84
  194. package/build/npm/cjs/prod/transports/offline.js.map +1 -1
  195. package/build/npm/cjs/prod/userfeedback.js +12 -22
  196. package/build/npm/cjs/prod/userfeedback.js.map +1 -1
  197. package/build/npm/cjs/prod/utils/detectBrowserExtension.js +5 -26
  198. package/build/npm/cjs/prod/utils/detectBrowserExtension.js.map +1 -1
  199. package/build/npm/cjs/prod/utils/lazyLoadIntegration.js +40 -75
  200. package/build/npm/cjs/prod/utils/lazyLoadIntegration.js.map +1 -1
  201. package/build/npm/esm/dev/client.js +15 -54
  202. package/build/npm/esm/dev/client.js.map +1 -1
  203. package/build/npm/esm/dev/debug-build.js +0 -5
  204. package/build/npm/esm/dev/debug-build.js.map +1 -1
  205. package/build/npm/esm/dev/diagnose-sdk.js +15 -37
  206. package/build/npm/esm/dev/diagnose-sdk.js.map +1 -1
  207. package/build/npm/esm/dev/eventbuilder.js +59 -217
  208. package/build/npm/esm/dev/eventbuilder.js.map +1 -1
  209. package/build/npm/esm/dev/feedbackAsync.js +1 -5
  210. package/build/npm/esm/dev/feedbackAsync.js.map +1 -1
  211. package/build/npm/esm/dev/feedbackSync.js +1 -2
  212. package/build/npm/esm/dev/feedbackSync.js.map +1 -1
  213. package/build/npm/esm/dev/helpers.js +24 -102
  214. package/build/npm/esm/dev/helpers.js.map +1 -1
  215. package/build/npm/esm/dev/index.js +2 -0
  216. package/build/npm/esm/dev/index.js.map +1 -1
  217. package/build/npm/esm/dev/integrations/breadcrumbs.js +54 -136
  218. package/build/npm/esm/dev/integrations/breadcrumbs.js.map +1 -1
  219. package/build/npm/esm/dev/integrations/browserapierrors.js +45 -111
  220. package/build/npm/esm/dev/integrations/browserapierrors.js.map +1 -1
  221. package/build/npm/esm/dev/integrations/browsersession.js +7 -35
  222. package/build/npm/esm/dev/integrations/browsersession.js.map +1 -1
  223. package/build/npm/esm/dev/integrations/contextlines.js +9 -45
  224. package/build/npm/esm/dev/integrations/contextlines.js.map +1 -1
  225. package/build/npm/esm/dev/integrations/culturecontext.js +11 -36
  226. package/build/npm/esm/dev/integrations/culturecontext.js.map +1 -1
  227. package/build/npm/esm/dev/integrations/featureFlags/growthbook/integration.js +1 -22
  228. package/build/npm/esm/dev/integrations/featureFlags/growthbook/integration.js.map +1 -1
  229. package/build/npm/esm/dev/integrations/featureFlags/launchdarkly/integration.js +6 -31
  230. package/build/npm/esm/dev/integrations/featureFlags/launchdarkly/integration.js.map +1 -1
  231. package/build/npm/esm/dev/integrations/featureFlags/openfeature/integration.js +6 -12
  232. package/build/npm/esm/dev/integrations/featureFlags/openfeature/integration.js.map +1 -1
  233. package/build/npm/esm/dev/integrations/featureFlags/statsig/integration.js +5 -30
  234. package/build/npm/esm/dev/integrations/featureFlags/statsig/integration.js.map +1 -1
  235. package/build/npm/esm/dev/integrations/featureFlags/unleash/integration.js +10 -47
  236. package/build/npm/esm/dev/integrations/featureFlags/unleash/integration.js.map +1 -1
  237. package/build/npm/esm/dev/integrations/fetchStreamPerformance.js +58 -0
  238. package/build/npm/esm/dev/integrations/fetchStreamPerformance.js.map +1 -0
  239. package/build/npm/esm/dev/integrations/globalhandlers.js +38 -99
  240. package/build/npm/esm/dev/integrations/globalhandlers.js.map +1 -1
  241. package/build/npm/esm/dev/integrations/graphqlClient.js +31 -119
  242. package/build/npm/esm/dev/integrations/graphqlClient.js.map +1 -1
  243. package/build/npm/esm/dev/integrations/httpclient.js +43 -203
  244. package/build/npm/esm/dev/integrations/httpclient.js.map +1 -1
  245. package/build/npm/esm/dev/integrations/httpcontext.js +7 -17
  246. package/build/npm/esm/dev/integrations/httpcontext.js.map +1 -1
  247. package/build/npm/esm/dev/integrations/linkederrors.js +7 -15
  248. package/build/npm/esm/dev/integrations/linkederrors.js.map +1 -1
  249. package/build/npm/esm/dev/integrations/reportingobserver.js +19 -44
  250. package/build/npm/esm/dev/integrations/reportingobserver.js.map +1 -1
  251. package/build/npm/esm/dev/integrations/spanstreaming.js +11 -29
  252. package/build/npm/esm/dev/integrations/spanstreaming.js.map +1 -1
  253. package/build/npm/esm/dev/integrations/spotlight.js +17 -30
  254. package/build/npm/esm/dev/integrations/spotlight.js.map +1 -1
  255. package/build/npm/esm/dev/integrations/view-hierarchy.js +19 -46
  256. package/build/npm/esm/dev/integrations/view-hierarchy.js.map +1 -1
  257. package/build/npm/esm/dev/integrations/webWorker.js +40 -211
  258. package/build/npm/esm/dev/integrations/webWorker.js.map +1 -1
  259. package/build/npm/esm/dev/normalizeStringifyValue.js +25 -0
  260. package/build/npm/esm/dev/normalizeStringifyValue.js.map +1 -0
  261. package/build/npm/esm/dev/package.json +1 -1
  262. package/build/npm/esm/dev/profiling/UIProfiler.js +87 -190
  263. package/build/npm/esm/dev/profiling/UIProfiler.js.map +1 -1
  264. package/build/npm/esm/dev/profiling/index.js +9 -30
  265. package/build/npm/esm/dev/profiling/index.js.map +1 -1
  266. package/build/npm/esm/dev/profiling/integration.js +30 -64
  267. package/build/npm/esm/dev/profiling/integration.js.map +1 -1
  268. package/build/npm/esm/dev/profiling/startProfileForSpan.js +28 -84
  269. package/build/npm/esm/dev/profiling/startProfileForSpan.js.map +1 -1
  270. package/build/npm/esm/dev/profiling/utils.js +131 -398
  271. package/build/npm/esm/dev/profiling/utils.js.map +1 -1
  272. package/build/npm/esm/dev/report-dialog.js +10 -25
  273. package/build/npm/esm/dev/report-dialog.js.map +1 -1
  274. package/build/npm/esm/dev/sdk.js +11 -77
  275. package/build/npm/esm/dev/sdk.js.map +1 -1
  276. package/build/npm/esm/dev/stack-parsers.js +42 -126
  277. package/build/npm/esm/dev/stack-parsers.js.map +1 -1
  278. package/build/npm/esm/dev/tracing/backgroundtab.js +4 -16
  279. package/build/npm/esm/dev/tracing/backgroundtab.js.map +1 -1
  280. package/build/npm/esm/dev/tracing/browserTracingIntegration.js +102 -291
  281. package/build/npm/esm/dev/tracing/browserTracingIntegration.js.map +1 -1
  282. package/build/npm/esm/dev/tracing/linkedTraces.js +25 -116
  283. package/build/npm/esm/dev/tracing/linkedTraces.js.map +1 -1
  284. package/build/npm/esm/dev/tracing/reportPageLoaded.js +1 -9
  285. package/build/npm/esm/dev/tracing/reportPageLoaded.js.map +1 -1
  286. package/build/npm/esm/dev/tracing/request.js +59 -224
  287. package/build/npm/esm/dev/tracing/request.js.map +1 -1
  288. package/build/npm/esm/dev/tracing/setActiveSpan.js +1 -48
  289. package/build/npm/esm/dev/tracing/setActiveSpan.js.map +1 -1
  290. package/build/npm/esm/dev/tracing/utils.js +4 -27
  291. package/build/npm/esm/dev/tracing/utils.js.map +1 -1
  292. package/build/npm/esm/dev/transports/fetch.js +10 -23
  293. package/build/npm/esm/dev/transports/fetch.js.map +1 -1
  294. package/build/npm/esm/dev/transports/offline.js +27 -84
  295. package/build/npm/esm/dev/transports/offline.js.map +1 -1
  296. package/build/npm/esm/dev/userfeedback.js +12 -22
  297. package/build/npm/esm/dev/userfeedback.js.map +1 -1
  298. package/build/npm/esm/dev/utils/detectBrowserExtension.js +5 -26
  299. package/build/npm/esm/dev/utils/detectBrowserExtension.js.map +1 -1
  300. package/build/npm/esm/dev/utils/lazyLoadIntegration.js +40 -75
  301. package/build/npm/esm/dev/utils/lazyLoadIntegration.js.map +1 -1
  302. package/build/npm/esm/prod/client.js +15 -54
  303. package/build/npm/esm/prod/client.js.map +1 -1
  304. package/build/npm/esm/prod/debug-build.js +0 -5
  305. package/build/npm/esm/prod/debug-build.js.map +1 -1
  306. package/build/npm/esm/prod/diagnose-sdk.js +15 -37
  307. package/build/npm/esm/prod/diagnose-sdk.js.map +1 -1
  308. package/build/npm/esm/prod/eventbuilder.js +59 -217
  309. package/build/npm/esm/prod/eventbuilder.js.map +1 -1
  310. package/build/npm/esm/prod/feedbackAsync.js +1 -5
  311. package/build/npm/esm/prod/feedbackAsync.js.map +1 -1
  312. package/build/npm/esm/prod/feedbackSync.js +1 -2
  313. package/build/npm/esm/prod/feedbackSync.js.map +1 -1
  314. package/build/npm/esm/prod/helpers.js +24 -102
  315. package/build/npm/esm/prod/helpers.js.map +1 -1
  316. package/build/npm/esm/prod/index.js +2 -0
  317. package/build/npm/esm/prod/index.js.map +1 -1
  318. package/build/npm/esm/prod/integrations/breadcrumbs.js +54 -136
  319. package/build/npm/esm/prod/integrations/breadcrumbs.js.map +1 -1
  320. package/build/npm/esm/prod/integrations/browserapierrors.js +45 -111
  321. package/build/npm/esm/prod/integrations/browserapierrors.js.map +1 -1
  322. package/build/npm/esm/prod/integrations/browsersession.js +7 -35
  323. package/build/npm/esm/prod/integrations/browsersession.js.map +1 -1
  324. package/build/npm/esm/prod/integrations/contextlines.js +9 -45
  325. package/build/npm/esm/prod/integrations/contextlines.js.map +1 -1
  326. package/build/npm/esm/prod/integrations/culturecontext.js +11 -36
  327. package/build/npm/esm/prod/integrations/culturecontext.js.map +1 -1
  328. package/build/npm/esm/prod/integrations/featureFlags/growthbook/integration.js +1 -22
  329. package/build/npm/esm/prod/integrations/featureFlags/growthbook/integration.js.map +1 -1
  330. package/build/npm/esm/prod/integrations/featureFlags/launchdarkly/integration.js +6 -31
  331. package/build/npm/esm/prod/integrations/featureFlags/launchdarkly/integration.js.map +1 -1
  332. package/build/npm/esm/prod/integrations/featureFlags/openfeature/integration.js +6 -12
  333. package/build/npm/esm/prod/integrations/featureFlags/openfeature/integration.js.map +1 -1
  334. package/build/npm/esm/prod/integrations/featureFlags/statsig/integration.js +5 -30
  335. package/build/npm/esm/prod/integrations/featureFlags/statsig/integration.js.map +1 -1
  336. package/build/npm/esm/prod/integrations/featureFlags/unleash/integration.js +10 -47
  337. package/build/npm/esm/prod/integrations/featureFlags/unleash/integration.js.map +1 -1
  338. package/build/npm/esm/prod/integrations/fetchStreamPerformance.js +58 -0
  339. package/build/npm/esm/prod/integrations/fetchStreamPerformance.js.map +1 -0
  340. package/build/npm/esm/prod/integrations/globalhandlers.js +38 -99
  341. package/build/npm/esm/prod/integrations/globalhandlers.js.map +1 -1
  342. package/build/npm/esm/prod/integrations/graphqlClient.js +31 -119
  343. package/build/npm/esm/prod/integrations/graphqlClient.js.map +1 -1
  344. package/build/npm/esm/prod/integrations/httpclient.js +43 -203
  345. package/build/npm/esm/prod/integrations/httpclient.js.map +1 -1
  346. package/build/npm/esm/prod/integrations/httpcontext.js +7 -17
  347. package/build/npm/esm/prod/integrations/httpcontext.js.map +1 -1
  348. package/build/npm/esm/prod/integrations/linkederrors.js +7 -15
  349. package/build/npm/esm/prod/integrations/linkederrors.js.map +1 -1
  350. package/build/npm/esm/prod/integrations/reportingobserver.js +19 -44
  351. package/build/npm/esm/prod/integrations/reportingobserver.js.map +1 -1
  352. package/build/npm/esm/prod/integrations/spanstreaming.js +11 -29
  353. package/build/npm/esm/prod/integrations/spanstreaming.js.map +1 -1
  354. package/build/npm/esm/prod/integrations/spotlight.js +17 -30
  355. package/build/npm/esm/prod/integrations/spotlight.js.map +1 -1
  356. package/build/npm/esm/prod/integrations/view-hierarchy.js +19 -46
  357. package/build/npm/esm/prod/integrations/view-hierarchy.js.map +1 -1
  358. package/build/npm/esm/prod/integrations/webWorker.js +40 -211
  359. package/build/npm/esm/prod/integrations/webWorker.js.map +1 -1
  360. package/build/npm/esm/prod/normalizeStringifyValue.js +25 -0
  361. package/build/npm/esm/prod/normalizeStringifyValue.js.map +1 -0
  362. package/build/npm/esm/prod/package.json +1 -1
  363. package/build/npm/esm/prod/profiling/UIProfiler.js +87 -190
  364. package/build/npm/esm/prod/profiling/UIProfiler.js.map +1 -1
  365. package/build/npm/esm/prod/profiling/index.js +9 -30
  366. package/build/npm/esm/prod/profiling/index.js.map +1 -1
  367. package/build/npm/esm/prod/profiling/integration.js +30 -64
  368. package/build/npm/esm/prod/profiling/integration.js.map +1 -1
  369. package/build/npm/esm/prod/profiling/startProfileForSpan.js +28 -84
  370. package/build/npm/esm/prod/profiling/startProfileForSpan.js.map +1 -1
  371. package/build/npm/esm/prod/profiling/utils.js +131 -398
  372. package/build/npm/esm/prod/profiling/utils.js.map +1 -1
  373. package/build/npm/esm/prod/report-dialog.js +10 -25
  374. package/build/npm/esm/prod/report-dialog.js.map +1 -1
  375. package/build/npm/esm/prod/sdk.js +8 -74
  376. package/build/npm/esm/prod/sdk.js.map +1 -1
  377. package/build/npm/esm/prod/stack-parsers.js +42 -126
  378. package/build/npm/esm/prod/stack-parsers.js.map +1 -1
  379. package/build/npm/esm/prod/tracing/backgroundtab.js +4 -16
  380. package/build/npm/esm/prod/tracing/backgroundtab.js.map +1 -1
  381. package/build/npm/esm/prod/tracing/browserTracingIntegration.js +102 -291
  382. package/build/npm/esm/prod/tracing/browserTracingIntegration.js.map +1 -1
  383. package/build/npm/esm/prod/tracing/linkedTraces.js +25 -117
  384. package/build/npm/esm/prod/tracing/linkedTraces.js.map +1 -1
  385. package/build/npm/esm/prod/tracing/reportPageLoaded.js +1 -9
  386. package/build/npm/esm/prod/tracing/reportPageLoaded.js.map +1 -1
  387. package/build/npm/esm/prod/tracing/request.js +59 -224
  388. package/build/npm/esm/prod/tracing/request.js.map +1 -1
  389. package/build/npm/esm/prod/tracing/setActiveSpan.js +1 -48
  390. package/build/npm/esm/prod/tracing/setActiveSpan.js.map +1 -1
  391. package/build/npm/esm/prod/tracing/utils.js +4 -27
  392. package/build/npm/esm/prod/tracing/utils.js.map +1 -1
  393. package/build/npm/esm/prod/transports/fetch.js +10 -23
  394. package/build/npm/esm/prod/transports/fetch.js.map +1 -1
  395. package/build/npm/esm/prod/transports/offline.js +27 -84
  396. package/build/npm/esm/prod/transports/offline.js.map +1 -1
  397. package/build/npm/esm/prod/userfeedback.js +12 -22
  398. package/build/npm/esm/prod/userfeedback.js.map +1 -1
  399. package/build/npm/esm/prod/utils/detectBrowserExtension.js +5 -26
  400. package/build/npm/esm/prod/utils/detectBrowserExtension.js.map +1 -1
  401. package/build/npm/esm/prod/utils/lazyLoadIntegration.js +40 -75
  402. package/build/npm/esm/prod/utils/lazyLoadIntegration.js.map +1 -1
  403. package/build/npm/types/eventbuilder.d.ts.map +1 -1
  404. package/build/npm/types/helpers.d.ts.map +1 -1
  405. package/build/npm/types/index.bundle.d.ts +2 -2
  406. package/build/npm/types/index.bundle.d.ts.map +1 -1
  407. package/build/npm/types/index.bundle.feedback.d.ts +2 -2
  408. package/build/npm/types/index.bundle.feedback.d.ts.map +1 -1
  409. package/build/npm/types/index.bundle.logs.metrics.d.ts +2 -2
  410. package/build/npm/types/index.bundle.logs.metrics.d.ts.map +1 -1
  411. package/build/npm/types/index.bundle.replay.d.ts +2 -2
  412. package/build/npm/types/index.bundle.replay.d.ts.map +1 -1
  413. package/build/npm/types/index.bundle.replay.feedback.d.ts +2 -2
  414. package/build/npm/types/index.bundle.replay.feedback.d.ts.map +1 -1
  415. package/build/npm/types/index.bundle.replay.logs.metrics.d.ts +2 -2
  416. package/build/npm/types/index.bundle.replay.logs.metrics.d.ts.map +1 -1
  417. package/build/npm/types/index.bundle.tracing.d.ts +1 -0
  418. package/build/npm/types/index.bundle.tracing.d.ts.map +1 -1
  419. package/build/npm/types/index.bundle.tracing.logs.metrics.d.ts +1 -0
  420. package/build/npm/types/index.bundle.tracing.logs.metrics.d.ts.map +1 -1
  421. package/build/npm/types/index.bundle.tracing.replay.d.ts +1 -0
  422. package/build/npm/types/index.bundle.tracing.replay.d.ts.map +1 -1
  423. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts +1 -0
  424. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts.map +1 -1
  425. package/build/npm/types/index.bundle.tracing.replay.feedback.logs.metrics.d.ts +1 -0
  426. package/build/npm/types/index.bundle.tracing.replay.feedback.logs.metrics.d.ts.map +1 -1
  427. package/build/npm/types/index.bundle.tracing.replay.logs.metrics.d.ts +1 -0
  428. package/build/npm/types/index.bundle.tracing.replay.logs.metrics.d.ts.map +1 -1
  429. package/build/npm/types/index.d.ts +2 -0
  430. package/build/npm/types/index.d.ts.map +1 -1
  431. package/build/npm/types/integrations/fetchStreamPerformance.d.ts +14 -0
  432. package/build/npm/types/integrations/fetchStreamPerformance.d.ts.map +1 -0
  433. package/build/npm/types/normalizeStringifyValue.d.ts +15 -0
  434. package/build/npm/types/normalizeStringifyValue.d.ts.map +1 -0
  435. package/build/npm/types/sdk.d.ts.map +1 -1
  436. package/build/npm/types/tracing/browserTracingIntegration.d.ts +3 -0
  437. package/build/npm/types/tracing/browserTracingIntegration.d.ts.map +1 -1
  438. package/build/npm/types/tracing/request.d.ts +3 -0
  439. package/build/npm/types/tracing/request.d.ts.map +1 -1
  440. package/build/npm/types-ts3.8/index.bundle.d.ts +2 -2
  441. package/build/npm/types-ts3.8/index.bundle.feedback.d.ts +2 -2
  442. package/build/npm/types-ts3.8/index.bundle.logs.metrics.d.ts +2 -2
  443. package/build/npm/types-ts3.8/index.bundle.replay.d.ts +2 -2
  444. package/build/npm/types-ts3.8/index.bundle.replay.feedback.d.ts +2 -2
  445. package/build/npm/types-ts3.8/index.bundle.replay.logs.metrics.d.ts +2 -2
  446. package/build/npm/types-ts3.8/index.bundle.tracing.d.ts +1 -0
  447. package/build/npm/types-ts3.8/index.bundle.tracing.logs.metrics.d.ts +1 -0
  448. package/build/npm/types-ts3.8/index.bundle.tracing.replay.d.ts +1 -0
  449. package/build/npm/types-ts3.8/index.bundle.tracing.replay.feedback.d.ts +1 -0
  450. package/build/npm/types-ts3.8/index.bundle.tracing.replay.feedback.logs.metrics.d.ts +1 -0
  451. package/build/npm/types-ts3.8/index.bundle.tracing.replay.logs.metrics.d.ts +1 -0
  452. package/build/npm/types-ts3.8/index.d.ts +2 -0
  453. package/build/npm/types-ts3.8/integrations/fetchStreamPerformance.d.ts +14 -0
  454. package/build/npm/types-ts3.8/normalizeStringifyValue.d.ts +15 -0
  455. package/build/npm/types-ts3.8/tracing/browserTracingIntegration.d.ts +3 -0
  456. package/build/npm/types-ts3.8/tracing/request.d.ts +3 -0
  457. package/package.json +7 -7
@@ -2,232 +2,127 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const browser = require('@sentry/core/browser');
4
4
 
5
- /**
6
- * This function creates an exception from a JavaScript Error
7
- */
8
5
  function exceptionFromError(stackParser, ex) {
9
- // Get the frames first since Opera can lose the stack if we touch anything else first
10
6
  const frames = parseStackFrames(stackParser, ex);
11
-
12
7
  const exception = {
13
8
  type: extractType(ex),
14
- value: extractMessage(ex),
9
+ value: extractMessage(ex)
15
10
  };
16
-
17
11
  if (frames.length) {
18
12
  exception.stacktrace = { frames };
19
13
  }
20
-
21
- if (exception.type === undefined && exception.value === '') {
22
- exception.value = 'Unrecoverable error caught';
14
+ if (exception.type === void 0 && exception.value === "") {
15
+ exception.value = "Unrecoverable error caught";
23
16
  }
24
-
25
17
  return exception;
26
18
  }
27
-
28
- function eventFromPlainObject(
29
- stackParser,
30
- exception,
31
- syntheticException,
32
- isUnhandledRejection,
33
- ) {
19
+ function eventFromPlainObject(stackParser, exception, syntheticException, isUnhandledRejection) {
34
20
  const client = browser.getClient();
35
21
  const normalizeDepth = client?.getOptions().normalizeDepth;
36
-
37
- // If we can, we extract an exception from the object properties
38
22
  const errorFromProp = getErrorPropertyFromObject(exception);
39
-
40
23
  const extra = {
41
- __serialized__: browser.normalizeToSize(exception, normalizeDepth),
24
+ __serialized__: browser.normalizeToSize(exception, normalizeDepth)
42
25
  };
43
-
44
26
  if (errorFromProp) {
45
27
  return {
46
28
  exception: {
47
- values: [exceptionFromError(stackParser, errorFromProp)],
29
+ values: [exceptionFromError(stackParser, errorFromProp)]
48
30
  },
49
- extra,
31
+ extra
50
32
  };
51
33
  }
52
-
53
34
  const event = {
54
35
  exception: {
55
36
  values: [
56
37
  {
57
- type: browser.isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',
58
- value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),
59
- } ,
60
- ],
38
+ type: browser.isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? "UnhandledRejection" : "Error",
39
+ value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection })
40
+ }
41
+ ]
61
42
  },
62
- extra,
63
- } ;
64
-
43
+ extra
44
+ };
65
45
  if (syntheticException) {
66
46
  const frames = parseStackFrames(stackParser, syntheticException);
67
47
  if (frames.length) {
68
- // event.exception.values[0] has been set above
69
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
70
48
  event.exception.values[0].stacktrace = { frames };
71
49
  }
72
50
  }
73
-
74
51
  return event;
75
52
  }
76
-
77
53
  function eventFromError(stackParser, ex) {
78
54
  return {
79
55
  exception: {
80
- values: [exceptionFromError(stackParser, ex)],
81
- },
56
+ values: [exceptionFromError(stackParser, ex)]
57
+ }
82
58
  };
83
59
  }
84
-
85
- /** Parses stack frames from an error */
86
- function parseStackFrames(
87
- stackParser,
88
- ex,
89
- ) {
90
- // Access and store the stacktrace property before doing ANYTHING
91
- // else to it because Opera is not very good at providing it
92
- // reliably in other circumstances.
93
- const stacktrace = ex.stacktrace || ex.stack || '';
94
-
60
+ function parseStackFrames(stackParser, ex) {
61
+ const stacktrace = ex.stacktrace || ex.stack || "";
95
62
  const skipLines = getSkipFirstStackStringLines(ex);
96
63
  const framesToPop = getPopFirstTopFrames(ex);
97
-
98
64
  try {
99
65
  return stackParser(stacktrace, skipLines, framesToPop);
100
66
  } catch {
101
- // no-empty
102
67
  }
103
-
104
68
  return [];
105
69
  }
106
-
107
- // Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108
108
70
  const reactMinifiedRegexp = /Minified React error #\d+;/i;
109
-
110
- /**
111
- * Certain known React errors contain links that would be falsely
112
- * parsed as frames. This function check for these errors and
113
- * returns number of the stack string lines to skip.
114
- */
115
71
  function getSkipFirstStackStringLines(ex) {
116
72
  if (ex && reactMinifiedRegexp.test(ex.message)) {
117
73
  return 1;
118
74
  }
119
-
120
75
  return 0;
121
76
  }
122
-
123
- /**
124
- * If error has `framesToPop` property, it means that the
125
- * creator tells us the first x frames will be useless
126
- * and should be discarded. Typically error from wrapper function
127
- * which don't point to the actual location in the developer's code.
128
- *
129
- * Example: https://github.com/zertosh/invariant/blob/master/invariant.js#L46
130
- */
131
77
  function getPopFirstTopFrames(ex) {
132
- if (typeof ex.framesToPop === 'number') {
78
+ if (typeof ex.framesToPop === "number") {
133
79
  return ex.framesToPop;
134
80
  }
135
-
136
81
  return 0;
137
82
  }
138
-
139
- // https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Exception
140
- // @ts-expect-error - WebAssembly.Exception is a valid class
141
83
  function isWebAssemblyException(exception) {
142
- // Check for support
143
- // @ts-expect-error - WebAssembly.Exception is a valid class
144
- // oxlint-disable-next-line typescript/prefer-optional-chain
145
- if (typeof WebAssembly !== 'undefined' && typeof WebAssembly.Exception !== 'undefined') {
146
- // @ts-expect-error - WebAssembly.Exception is a valid class
84
+ if (typeof WebAssembly !== "undefined" && typeof WebAssembly.Exception !== "undefined") {
147
85
  return exception instanceof WebAssembly.Exception;
148
86
  } else {
149
87
  return false;
150
88
  }
151
89
  }
152
-
153
- /**
154
- * Extracts from errors what we use as the exception `type` in error events.
155
- *
156
- * Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.
157
- */
158
90
  function extractType(ex) {
159
91
  const name = ex?.name;
160
-
161
- // The name for WebAssembly.Exception Errors needs to be extracted differently.
162
- // Context: https://github.com/getsentry/sentry-javascript/issues/13787
163
92
  if (!name && isWebAssemblyException(ex)) {
164
- // Emscripten sets array[type, message] to the "message" property on the WebAssembly.Exception object
165
93
  const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;
166
- return hasTypeInMessage ? ex.message[0] : 'WebAssembly.Exception';
94
+ return hasTypeInMessage ? ex.message[0] : "WebAssembly.Exception";
167
95
  }
168
-
169
96
  return name;
170
97
  }
171
-
172
- /**
173
- * There are cases where stacktrace.message is an Event object
174
- * https://github.com/getsentry/sentry-javascript/issues/1949
175
- * In this specific case we try to extract stacktrace.message.error.message
176
- */
177
98
  function extractMessage(ex) {
178
99
  const message = ex?.message;
179
-
180
100
  if (isWebAssemblyException(ex)) {
181
- // For Node 18, Emscripten sets array[type, message] to the "message" property on the WebAssembly.Exception object
182
101
  if (Array.isArray(ex.message) && ex.message.length == 2) {
183
102
  return ex.message[1];
184
103
  }
185
- return 'wasm exception';
104
+ return "wasm exception";
186
105
  }
187
-
188
106
  if (!message) {
189
- return 'No error message';
107
+ return "No error message";
190
108
  }
191
-
192
- if (message.error && typeof message.error.message === 'string') {
109
+ if (message.error && typeof message.error.message === "string") {
193
110
  return browser._INTERNAL_enhanceErrorWithSentryInfo(message.error);
194
111
  }
195
-
196
112
  return browser._INTERNAL_enhanceErrorWithSentryInfo(ex);
197
113
  }
198
-
199
- /**
200
- * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
201
- * @hidden
202
- */
203
- function eventFromException(
204
- stackParser,
205
- exception,
206
- hint,
207
- attachStacktrace,
208
- ) {
209
- const syntheticException = hint?.syntheticException || undefined;
114
+ function eventFromException(stackParser, exception, hint, attachStacktrace) {
115
+ const syntheticException = hint?.syntheticException || void 0;
210
116
  const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);
211
- browser.addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }
212
- event.level = 'error';
117
+ browser.addExceptionMechanism(event);
118
+ event.level = "error";
213
119
  if (hint?.event_id) {
214
120
  event.event_id = hint.event_id;
215
121
  }
216
122
  return browser.resolvedSyncPromise(event);
217
123
  }
218
-
219
- /**
220
- * Builds and Event from a Message
221
- * @hidden
222
- */
223
- function eventFromMessage(
224
- stackParser,
225
- message,
226
- level = 'info',
227
- hint,
228
- attachStacktrace,
229
- ) {
230
- const syntheticException = hint?.syntheticException || undefined;
124
+ function eventFromMessage(stackParser, message, level = "info", hint, attachStacktrace) {
125
+ const syntheticException = hint?.syntheticException || void 0;
231
126
  const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);
232
127
  event.level = level;
233
128
  if (hint?.event_id) {
@@ -235,147 +130,94 @@ function eventFromMessage(
235
130
  }
236
131
  return browser.resolvedSyncPromise(event);
237
132
  }
238
-
239
- /**
240
- * @hidden
241
- */
242
- function eventFromUnknownInput(
243
- stackParser,
244
- exception,
245
- syntheticException,
246
- attachStacktrace,
247
- isUnhandledRejection,
248
- ) {
133
+ function eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace, isUnhandledRejection) {
249
134
  let event;
250
-
251
- if (browser.isErrorEvent(exception ) && (exception ).error) {
252
- // If it is an ErrorEvent with `error` property, extract it to get actual Error
253
- const errorEvent = exception ;
254
- return eventFromError(stackParser, errorEvent.error );
255
- }
256
-
257
- // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name
258
- // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be
259
- // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.
260
- //
261
- // https://developer.mozilla.org/en-US/docs/Web/API/DOMError
262
- // https://developer.mozilla.org/en-US/docs/Web/API/DOMException
263
- // https://webidl.spec.whatwg.org/#es-DOMException-specialness
264
- if (browser.isDOMError(exception) || browser.isDOMException(exception )) {
265
- const domException = exception ;
266
-
267
- if ('stack' in (exception )) {
268
- event = eventFromError(stackParser, exception );
135
+ if (browser.isErrorEvent(exception) && exception.error) {
136
+ const errorEvent = exception;
137
+ return eventFromError(stackParser, errorEvent.error);
138
+ }
139
+ if (browser.isDOMError(exception) || browser.isDOMException(exception)) {
140
+ const domException = exception;
141
+ if ("stack" in exception) {
142
+ event = eventFromError(stackParser, exception);
143
+ const firstException = event.exception?.values?.[0];
144
+ if (attachStacktrace && syntheticException && firstException && !firstException.stacktrace) {
145
+ const frames = parseStackFrames(stackParser, syntheticException);
146
+ if (frames.length) {
147
+ firstException.stacktrace = { frames };
148
+ browser.addExceptionMechanism(event, { synthetic: true });
149
+ }
150
+ }
269
151
  } else {
270
- const name = domException.name || (browser.isDOMError(domException) ? 'DOMError' : 'DOMException');
152
+ const name = domException.name || (browser.isDOMError(domException) ? "DOMError" : "DOMException");
271
153
  const message = domException.message ? `${name}: ${domException.message}` : name;
272
154
  event = eventFromString(stackParser, message, syntheticException, attachStacktrace);
273
155
  browser.addExceptionTypeValue(event, message);
274
156
  }
275
- if ('code' in domException) {
276
- // eslint-disable-next-line deprecation/deprecation
277
- event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };
157
+ if ("code" in domException) {
158
+ event.tags = { ...event.tags, "DOMException.code": `${domException.code}` };
278
159
  }
279
-
280
160
  return event;
281
161
  }
282
162
  if (browser.isError(exception)) {
283
- // we have a real Error object, do nothing
284
163
  return eventFromError(stackParser, exception);
285
164
  }
286
165
  if (browser.isPlainObject(exception) || browser.isEvent(exception)) {
287
- // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize
288
- // it manually. This will allow us to group events based on top-level keys which is much better than creating a new
289
- // group on any key/value change.
290
166
  const objectException = exception;
291
167
  event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);
292
168
  browser.addExceptionMechanism(event, {
293
- synthetic: true,
169
+ synthetic: true
294
170
  });
295
171
  return event;
296
172
  }
297
-
298
- // If none of previous checks were valid, then it means that it's not:
299
- // - an instance of DOMError
300
- // - an instance of DOMException
301
- // - an instance of Event
302
- // - an instance of Error
303
- // - a valid ErrorEvent (one with an error property)
304
- // - a plain Object
305
- //
306
- // So bail out and capture it as a simple message:
307
- event = eventFromString(stackParser, exception , syntheticException, attachStacktrace);
308
- browser.addExceptionTypeValue(event, `${exception}`, undefined);
173
+ event = eventFromString(stackParser, exception, syntheticException, attachStacktrace);
174
+ browser.addExceptionTypeValue(event, `${exception}`, void 0);
309
175
  browser.addExceptionMechanism(event, {
310
- synthetic: true,
176
+ synthetic: true
311
177
  });
312
-
313
178
  return event;
314
179
  }
315
-
316
- function eventFromString(
317
- stackParser,
318
- message,
319
- syntheticException,
320
- attachStacktrace,
321
- ) {
180
+ function eventFromString(stackParser, message, syntheticException, attachStacktrace) {
322
181
  const event = {};
323
-
324
182
  if (attachStacktrace && syntheticException) {
325
183
  const frames = parseStackFrames(stackParser, syntheticException);
326
184
  if (frames.length) {
327
185
  event.exception = {
328
- values: [{ value: message, stacktrace: { frames } }],
186
+ values: [{ value: message, stacktrace: { frames } }]
329
187
  };
330
188
  }
331
189
  browser.addExceptionMechanism(event, { synthetic: true });
332
190
  }
333
-
334
191
  if (browser.isParameterizedString(message)) {
335
192
  const { __sentry_template_string__, __sentry_template_values__ } = message;
336
-
337
193
  event.logentry = {
338
194
  message: __sentry_template_string__,
339
- params: __sentry_template_values__,
195
+ params: __sentry_template_values__
340
196
  };
341
197
  return event;
342
198
  }
343
-
344
199
  event.message = message;
345
200
  return event;
346
201
  }
347
-
348
- function getNonErrorObjectExceptionValue(
349
- exception,
350
- { isUnhandledRejection },
351
- ) {
202
+ function getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }) {
352
203
  const keys = browser.extractExceptionKeysForMessage(exception);
353
- const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';
354
-
355
- // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before
356
- // We still want to try to get a decent message for these cases
204
+ const captureType = isUnhandledRejection ? "promise rejection" : "exception";
357
205
  if (browser.isErrorEvent(exception)) {
358
206
  return `Event \`ErrorEvent\` captured as ${captureType} with message \`${exception.message}\``;
359
207
  }
360
-
361
208
  if (browser.isEvent(exception)) {
362
209
  const className = getObjectClassName(exception);
363
210
  return `Event \`${className}\` (type=${exception.type}) captured as ${captureType}`;
364
211
  }
365
-
366
212
  return `Object captured as ${captureType} with keys: ${keys}`;
367
213
  }
368
-
369
214
  function getObjectClassName(obj) {
370
215
  try {
371
216
  const prototype = Object.getPrototypeOf(obj);
372
- return prototype ? prototype.constructor.name : undefined;
217
+ return prototype ? prototype.constructor.name : void 0;
373
218
  } catch {
374
- // ignore errors here
375
219
  }
376
220
  }
377
-
378
- /** If a plain object has a property that is an `Error`, return this error. */
379
221
  function getErrorPropertyFromObject(obj) {
380
222
  return Object.values(obj).find((v) => v instanceof Error);
381
223
  }
@@ -1 +1 @@
1
- {"version":3,"file":"eventbuilder.js","sources":["../../../../src/eventbuilder.ts"],"sourcesContent":["import type {\n Event,\n EventHint,\n Exception,\n ParameterizedString,\n SeverityLevel,\n StackFrame,\n StackParser,\n} from '@sentry/core/browser';\nimport {\n _INTERNAL_enhanceErrorWithSentryInfo,\n addExceptionMechanism,\n addExceptionTypeValue,\n extractExceptionKeysForMessage,\n getClient,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isParameterizedString,\n isPlainObject,\n normalizeToSize,\n resolvedSyncPromise,\n} from '@sentry/core/browser';\n\ntype Prototype = { constructor: (...args: unknown[]) => unknown };\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nexport function exceptionFromError(stackParser: StackParser, ex: Error): Exception {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n const frames = parseStackFrames(stackParser, ex);\n\n const exception: Exception = {\n type: extractType(ex),\n value: extractMessage(ex),\n };\n\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\nfunction eventFromPlainObject(\n stackParser: StackParser,\n exception: Record<string, unknown>,\n syntheticException?: Error,\n isUnhandledRejection?: boolean,\n): Event {\n const client = getClient();\n const normalizeDepth = client?.getOptions().normalizeDepth;\n\n // If we can, we extract an exception from the object properties\n const errorFromProp = getErrorPropertyFromObject(exception);\n\n const extra = {\n __serialized__: normalizeToSize(exception, normalizeDepth),\n };\n\n if (errorFromProp) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, errorFromProp)],\n },\n extra,\n };\n }\n\n const event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n } as Exception,\n ],\n },\n extra,\n } satisfies Event;\n\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n // event.exception.values[0] has been set above\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0]!.stacktrace = { frames };\n }\n }\n\n return event;\n}\n\nfunction eventFromError(stackParser: StackParser, ex: Error): Event {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)],\n },\n };\n}\n\n/** Parses stack frames from an error */\nfunction parseStackFrames(\n stackParser: StackParser,\n ex: Error & { framesToPop?: number; stacktrace?: string },\n): StackFrame[] {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace || ex.stack || '';\n\n const skipLines = getSkipFirstStackStringLines(ex);\n const framesToPop = getPopFirstTopFrames(ex);\n\n try {\n return stackParser(stacktrace, skipLines, framesToPop);\n } catch {\n // no-empty\n }\n\n return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/**\n * Certain known React errors contain links that would be falsely\n * parsed as frames. This function check for these errors and\n * returns number of the stack string lines to skip.\n */\nfunction getSkipFirstStackStringLines(ex: Error): number {\n if (ex && reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n\n return 0;\n}\n\n/**\n * If error has `framesToPop` property, it means that the\n * creator tells us the first x frames will be useless\n * and should be discarded. Typically error from wrapper function\n * which don't point to the actual location in the developer's code.\n *\n * Example: https://github.com/zertosh/invariant/blob/master/invariant.js#L46\n */\nfunction getPopFirstTopFrames(ex: Error & { framesToPop?: unknown }): number {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n\n return 0;\n}\n\n// https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Exception\n// @ts-expect-error - WebAssembly.Exception is a valid class\nfunction isWebAssemblyException(exception: unknown): exception is WebAssembly.Exception {\n // Check for support\n // @ts-expect-error - WebAssembly.Exception is a valid class\n // oxlint-disable-next-line typescript/prefer-optional-chain\n if (typeof WebAssembly !== 'undefined' && typeof WebAssembly.Exception !== 'undefined') {\n // @ts-expect-error - WebAssembly.Exception is a valid class\n return exception instanceof WebAssembly.Exception;\n } else {\n return false;\n }\n}\n\n/**\n * Extracts from errors what we use as the exception `type` in error events.\n *\n * Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.\n */\nexport function extractType(ex: Error & { message: { error?: Error } }): string | undefined {\n const name = ex?.name;\n\n // The name for WebAssembly.Exception Errors needs to be extracted differently.\n // Context: https://github.com/getsentry/sentry-javascript/issues/13787\n if (!name && isWebAssemblyException(ex)) {\n // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;\n return hasTypeInMessage ? ex.message[0] : 'WebAssembly.Exception';\n }\n\n return name;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nexport function extractMessage(ex: Error & { message: { error?: Error } }): string {\n const message = ex?.message;\n\n if (isWebAssemblyException(ex)) {\n // For Node 18, Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n if (Array.isArray(ex.message) && ex.message.length == 2) {\n return ex.message[1];\n }\n return 'wasm exception';\n }\n\n if (!message) {\n return 'No error message';\n }\n\n if (message.error && typeof message.error.message === 'string') {\n return _INTERNAL_enhanceErrorWithSentryInfo(message.error);\n }\n\n return _INTERNAL_enhanceErrorWithSentryInfo(ex);\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nexport function eventFromException(\n stackParser: StackParser,\n exception: unknown,\n hint?: EventHint,\n attachStacktrace?: boolean,\n): PromiseLike<Event> {\n const syntheticException = hint?.syntheticException || undefined;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = 'error';\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n stackParser: StackParser,\n message: ParameterizedString,\n level: SeverityLevel = 'info',\n hint?: EventHint,\n attachStacktrace?: boolean,\n): PromiseLike<Event> {\n const syntheticException = hint?.syntheticException || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(\n stackParser: StackParser,\n exception: unknown,\n syntheticException?: Error,\n attachStacktrace?: boolean,\n isUnhandledRejection?: boolean,\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n return eventFromError(stackParser, errorEvent.error as Error);\n }\n\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception as DOMException)) {\n const domException = exception as DOMException;\n\n if ('stack' in (exception as Error)) {\n event = eventFromError(stackParser, exception as Error);\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n // eslint-disable-next-line deprecation/deprecation\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(stackParser, exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(stackParser, exception as string, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\nfunction eventFromString(\n stackParser: StackParser,\n message: ParameterizedString,\n syntheticException?: Error,\n attachStacktrace?: boolean,\n): Event {\n const event: Event = {};\n\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{ value: message, stacktrace: { frames } }],\n };\n }\n addExceptionMechanism(event, { synthetic: true });\n }\n\n if (isParameterizedString(message)) {\n const { __sentry_template_string__, __sentry_template_values__ } = message;\n\n event.logentry = {\n message: __sentry_template_string__,\n params: __sentry_template_values__,\n };\n return event;\n }\n\n event.message = message;\n return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n exception: Record<string, unknown>,\n { isUnhandledRejection }: { isUnhandledRejection?: boolean },\n): string {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n // We still want to try to get a decent message for these cases\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj: unknown): string | undefined | void {\n try {\n const prototype: Prototype | null = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : undefined;\n } catch {\n // ignore errors here\n }\n}\n\n/** If a plain object has a property that is an `Error`, return this error. */\nfunction getErrorPropertyFromObject(obj: Record<string, unknown>): Error | undefined {\n return Object.values(obj).find((v): v is Error => v instanceof Error);\n}\n"],"names":["getClient","normalizeToSize","isEvent","_INTERNAL_enhanceErrorWithSentryInfo","addExceptionMechanism","resolvedSyncPromise","isErrorEvent","isDOMError","isDOMException","addExceptionTypeValue","isError","isPlainObject","isParameterizedString","extractExceptionKeysForMessage"],"mappings":";;;;AA4BA;AACA;AACA;AACO,SAAS,kBAAkB,CAAC,WAAW,EAAe,EAAE,EAAoB;AACnF;AACA,EAAE,MAAM,SAAS,gBAAgB,CAAC,WAAW,EAAE,EAAE,CAAC;;AAElD,EAAE,MAAM,SAAS,GAAc;AAC/B,IAAI,IAAI,EAAE,WAAW,CAAC,EAAE,CAAC;AACzB,IAAI,KAAK,EAAE,cAAc,CAAC,EAAE,CAAC;AAC7B,GAAG;;AAEH,EAAE,IAAI,MAAM,CAAC,MAAM,EAAE;AACrB,IAAI,SAAS,CAAC,UAAA,GAAa,EAAE,QAAQ;AACrC,EAAE;;AAEF,EAAE,IAAI,SAAS,CAAC,IAAA,KAAS,SAAA,IAAa,SAAS,CAAC,KAAA,KAAU,EAAE,EAAE;AAC9D,IAAI,SAAS,CAAC,KAAA,GAAQ,4BAA4B;AAClD,EAAE;;AAEF,EAAE,OAAO,SAAS;AAClB;;AAEA,SAAS,oBAAoB;AAC7B,EAAE,WAAW;AACb,EAAE,SAAS;AACX,EAAE,kBAAkB;AACpB,EAAE,oBAAoB;AACtB,EAAS;AACT,EAAE,MAAM,MAAA,GAASA,iBAAS,EAAE;AAC5B,EAAE,MAAM,iBAAiB,MAAM,EAAE,UAAU,EAAE,CAAC,cAAc;;AAE5D;AACA,EAAE,MAAM,aAAA,GAAgB,0BAA0B,CAAC,SAAS,CAAC;;AAE7D,EAAE,MAAM,QAAQ;AAChB,IAAI,cAAc,EAAEC,uBAAe,CAAC,SAAS,EAAE,cAAc,CAAC;AAC9D,GAAG;;AAEH,EAAE,IAAI,aAAa,EAAE;AACrB,IAAI,OAAO;AACX,MAAM,SAAS,EAAE;AACjB,QAAQ,MAAM,EAAE,CAAC,kBAAkB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AAChE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AP,oBAAA,CAAA,SAAA,CAAA,EAAA;AACA,IAAA,OAAA,CAAA,iCAAA,EAAA,WAAA,CAAA,gBAAA,EAAA,SAAA,CAAA,OAAA,CAAA,EAAA,CAAA;AACA,EAAA;;AAEA,EAAA,IAAAJ,eAAA,CAAA,SAAA,CAAA,EAAA;AACA,IAAA,MAAA,SAAA,GAAA,kBAAA,CAAA,SAAA,CAAA;AACA,IAAA,OAAA,CAAA,QAAA,EAAA,SAAA,CAAA,SAAA,EAAA,SAAA,CAAA,IAAA,CAAA,cAAA,EAAA,WAAA,CAAA,CAAA;AACA,EAAA;;AAEA,EAAA,OAAA,CAAA,mBAAA,EAAA,WAAA,CAAA,YAAA,EAAA,IAAA,CAAA,CAAA;AACA;;AAEA,SAAA,kBAAA,CAAA,GAAA,EAAA;AACA,EAAA,IAAA;AACA,IAAA,MAAA,SAAA,GAAA,MAAA,CAAA,cAAA,CAAA,GAAA,CAAA;AACA,IAAA,OAAA,SAAA,GAAA,SAAA,CAAA,WAAA,CAAA,IAAA,GAAA,SAAA;AACA,EAAA,CAAA,CAAA,MAAA;AACA;AACA,EAAA;AACA;;AAEA;AACA,SAAA,0BAAA,CAAA,GAAA,EAAA;AACA,EAAA,OAAA,MAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,KAAA,CAAA,YAAA,KAAA,CAAA;AACA;;;;;;;;;"}
1
+ {"version":3,"file":"eventbuilder.js","sources":["../../../../src/eventbuilder.ts"],"sourcesContent":["import type {\n Event,\n EventHint,\n Exception,\n ParameterizedString,\n SeverityLevel,\n StackFrame,\n StackParser,\n} from '@sentry/core/browser';\nimport {\n _INTERNAL_enhanceErrorWithSentryInfo,\n addExceptionMechanism,\n addExceptionTypeValue,\n extractExceptionKeysForMessage,\n getClient,\n isDOMError,\n isDOMException,\n isError,\n isErrorEvent,\n isEvent,\n isParameterizedString,\n isPlainObject,\n normalizeToSize,\n resolvedSyncPromise,\n} from '@sentry/core/browser';\n\ntype Prototype = { constructor: (...args: unknown[]) => unknown };\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nexport function exceptionFromError(stackParser: StackParser, ex: Error): Exception {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n const frames = parseStackFrames(stackParser, ex);\n\n const exception: Exception = {\n type: extractType(ex),\n value: extractMessage(ex),\n };\n\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\nfunction eventFromPlainObject(\n stackParser: StackParser,\n exception: Record<string, unknown>,\n syntheticException?: Error,\n isUnhandledRejection?: boolean,\n): Event {\n const client = getClient();\n const normalizeDepth = client?.getOptions().normalizeDepth;\n\n // If we can, we extract an exception from the object properties\n const errorFromProp = getErrorPropertyFromObject(exception);\n\n const extra = {\n __serialized__: normalizeToSize(exception, normalizeDepth),\n };\n\n if (errorFromProp) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, errorFromProp)],\n },\n extra,\n };\n }\n\n const event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n } as Exception,\n ],\n },\n extra,\n } satisfies Event;\n\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n // event.exception.values[0] has been set above\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0]!.stacktrace = { frames };\n }\n }\n\n return event;\n}\n\nfunction eventFromError(stackParser: StackParser, ex: Error): Event {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)],\n },\n };\n}\n\n/** Parses stack frames from an error */\nfunction parseStackFrames(\n stackParser: StackParser,\n ex: Error & { framesToPop?: number; stacktrace?: string },\n): StackFrame[] {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace || ex.stack || '';\n\n const skipLines = getSkipFirstStackStringLines(ex);\n const framesToPop = getPopFirstTopFrames(ex);\n\n try {\n return stackParser(stacktrace, skipLines, framesToPop);\n } catch {\n // no-empty\n }\n\n return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\n/**\n * Certain known React errors contain links that would be falsely\n * parsed as frames. This function check for these errors and\n * returns number of the stack string lines to skip.\n */\nfunction getSkipFirstStackStringLines(ex: Error): number {\n if (ex && reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n\n return 0;\n}\n\n/**\n * If error has `framesToPop` property, it means that the\n * creator tells us the first x frames will be useless\n * and should be discarded. Typically error from wrapper function\n * which don't point to the actual location in the developer's code.\n *\n * Example: https://github.com/zertosh/invariant/blob/master/invariant.js#L46\n */\nfunction getPopFirstTopFrames(ex: Error & { framesToPop?: unknown }): number {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n\n return 0;\n}\n\n// https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Exception\n// @ts-expect-error - WebAssembly.Exception is a valid class\nfunction isWebAssemblyException(exception: unknown): exception is WebAssembly.Exception {\n // Check for support\n // @ts-expect-error - WebAssembly.Exception is a valid class\n // oxlint-disable-next-line typescript/prefer-optional-chain\n if (typeof WebAssembly !== 'undefined' && typeof WebAssembly.Exception !== 'undefined') {\n // @ts-expect-error - WebAssembly.Exception is a valid class\n return exception instanceof WebAssembly.Exception;\n } else {\n return false;\n }\n}\n\n/**\n * Extracts from errors what we use as the exception `type` in error events.\n *\n * Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.\n */\nexport function extractType(ex: Error & { message: { error?: Error } }): string | undefined {\n const name = ex?.name;\n\n // The name for WebAssembly.Exception Errors needs to be extracted differently.\n // Context: https://github.com/getsentry/sentry-javascript/issues/13787\n if (!name && isWebAssemblyException(ex)) {\n // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;\n return hasTypeInMessage ? ex.message[0] : 'WebAssembly.Exception';\n }\n\n return name;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nexport function extractMessage(ex: Error & { message: { error?: Error } }): string {\n const message = ex?.message;\n\n if (isWebAssemblyException(ex)) {\n // For Node 18, Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n if (Array.isArray(ex.message) && ex.message.length == 2) {\n return ex.message[1];\n }\n return 'wasm exception';\n }\n\n if (!message) {\n return 'No error message';\n }\n\n if (message.error && typeof message.error.message === 'string') {\n return _INTERNAL_enhanceErrorWithSentryInfo(message.error);\n }\n\n return _INTERNAL_enhanceErrorWithSentryInfo(ex);\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nexport function eventFromException(\n stackParser: StackParser,\n exception: unknown,\n hint?: EventHint,\n attachStacktrace?: boolean,\n): PromiseLike<Event> {\n const syntheticException = hint?.syntheticException || undefined;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = 'error';\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(\n stackParser: StackParser,\n message: ParameterizedString,\n level: SeverityLevel = 'info',\n hint?: EventHint,\n attachStacktrace?: boolean,\n): PromiseLike<Event> {\n const syntheticException = hint?.syntheticException || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint?.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(\n stackParser: StackParser,\n exception: unknown,\n syntheticException?: Error,\n attachStacktrace?: boolean,\n isUnhandledRejection?: boolean,\n): Event {\n let event: Event;\n\n if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception as ErrorEvent;\n return eventFromError(stackParser, errorEvent.error as Error);\n }\n\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception as DOMException)) {\n const domException = exception as DOMException;\n\n if ('stack' in (exception as Error)) {\n event = eventFromError(stackParser, exception as Error);\n\n const firstException = event.exception?.values?.[0];\n if (attachStacktrace && syntheticException && firstException && !firstException.stacktrace) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n firstException.stacktrace = { frames };\n addExceptionMechanism(event, { synthetic: true });\n }\n }\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n // eslint-disable-next-line deprecation/deprecation\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(stackParser, exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(stackParser, exception as string, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\nfunction eventFromString(\n stackParser: StackParser,\n message: ParameterizedString,\n syntheticException?: Error,\n attachStacktrace?: boolean,\n): Event {\n const event: Event = {};\n\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{ value: message, stacktrace: { frames } }],\n };\n }\n addExceptionMechanism(event, { synthetic: true });\n }\n\n if (isParameterizedString(message)) {\n const { __sentry_template_string__, __sentry_template_values__ } = message;\n\n event.logentry = {\n message: __sentry_template_string__,\n params: __sentry_template_values__,\n };\n return event;\n }\n\n event.message = message;\n return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n exception: Record<string, unknown>,\n { isUnhandledRejection }: { isUnhandledRejection?: boolean },\n): string {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n // We still want to try to get a decent message for these cases\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj: unknown): string | undefined | void {\n try {\n const prototype: Prototype | null = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : undefined;\n } catch {\n // ignore errors here\n }\n}\n\n/** If a plain object has a property that is an `Error`, return this error. */\nfunction getErrorPropertyFromObject(obj: Record<string, unknown>): Error | undefined {\n return Object.values(obj).find((v): v is Error => v instanceof Error);\n}\n"],"names":["getClient","normalizeToSize","isEvent","_INTERNAL_enhanceErrorWithSentryInfo","addExceptionMechanism","resolvedSyncPromise","isErrorEvent","isDOMError","isDOMException","addExceptionTypeValue","isError","isPlainObject","isParameterizedString","extractExceptionKeysForMessage"],"mappings":";;;;AA+BO,SAAS,kBAAA,CAAmB,aAA0B,EAAA,EAAsB;AAEjF,EAAA,MAAM,MAAA,GAAS,gBAAA,CAAiB,WAAA,EAAa,EAAE,CAAA;AAE/C,EAAA,MAAM,SAAA,GAAuB;AAAA,IAC3B,IAAA,EAAM,YAAY,EAAE,CAAA;AAAA,IACpB,KAAA,EAAO,eAAe,EAAE;AAAA,GAC1B;AAEA,EAAA,IAAI,OAAO,MAAA,EAAQ;AACjB,IAAA,SAAA,CAAU,UAAA,GAAa,EAAE,MAAA,EAAO;AAAA,EAClC;AAEA,EAAA,IAAI,SAAA,CAAU,IAAA,KAAS,MAAA,IAAa,SAAA,CAAU,UAAU,EAAA,EAAI;AAC1D,IAAA,SAAA,CAAU,KAAA,GAAQ,4BAAA;AAAA,EACpB;AAEA,EAAA,OAAO,SAAA;AACT;AAEA,SAAS,oBAAA,CACP,WAAA,EACA,SAAA,EACA,kBAAA,EACA,oBAAA,EACO;AACP,EAAA,MAAM,SAASA,iBAAA,EAAU;AACzB,EAAA,MAAM,cAAA,GAAiB,MAAA,EAAQ,UAAA,EAAW,CAAE,cAAA;AAG5C,EAAA,MAAM,aAAA,GAAgB,2BAA2B,SAAS,CAAA;AAE1D,EAAA,MAAM,KAAA,GAAQ;AAAA,IACZ,cAAA,EAAgBC,uBAAA,CAAgB,SAAA,EAAW,cAAc;AAAA,GAC3D;AAEA,EAAA,IAAI,aAAA,EAAe;AACjB,IAAA,O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AI,iBAAiB,WAAW,CAAA,CAAA;AAAA,EACnF;AAEA,EAAA,OAAO,CAAA,mBAAA,EAAsB,WAAW,CAAA,YAAA,EAAe,IAAI,CAAA,CAAA;AAC7D;AAEA,SAAS,mBAAmB,GAAA,EAAyC;AACnE,EAAA,IAAI;AACF,IAAA,MAAM,SAAA,GAA8B,MAAA,CAAO,cAAA,CAAe,GAAG,CAAA;AAC7D,IAAA,OAAO,SAAA,GAAY,SAAA,CAAU,WAAA,CAAY,IAAA,GAAO,KAAA,CAAA;AAAA,EAClD,CAAA,CAAA,MAAQ;AAAA,EAER;AACF;AAGA,SAAS,2BAA2B,GAAA,EAAiD;AACnF,EAAA,OAAO,MAAA,CAAO,OAAO,GAAG,CAAA,CAAE,KAAK,CAAC,CAAA,KAAkB,aAAa,KAAK,CAAA;AACtE;;;;;;;;;"}
@@ -3,12 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
3
  const feedback = require('@sentry-internal/feedback');
4
4
  const lazyLoadIntegration = require('./utils/lazyLoadIntegration.js');
5
5
 
6
- /**
7
- * An integration to add user feedback to your application,
8
- * while loading most of the code lazily only when it's needed.
9
- */
10
6
  const feedbackAsyncIntegration = feedback.buildFeedbackIntegration({
11
- lazyLoadIntegration: lazyLoadIntegration.lazyLoadIntegration,
7
+ lazyLoadIntegration: lazyLoadIntegration.lazyLoadIntegration
12
8
  });
13
9
 
14
10
  exports.feedbackAsyncIntegration = feedbackAsyncIntegration;
@@ -1 +1 @@
1
- {"version":3,"file":"feedbackAsync.js","sources":["../../../../src/feedbackAsync.ts"],"sourcesContent":["import { buildFeedbackIntegration } from '@sentry-internal/feedback';\nimport { lazyLoadIntegration } from './utils/lazyLoadIntegration';\n\n/**\n * An integration to add user feedback to your application,\n * while loading most of the code lazily only when it's needed.\n */\nexport const feedbackAsyncIntegration: ReturnType<typeof buildFeedbackIntegration> = buildFeedbackIntegration({\n lazyLoadIntegration,\n});\n"],"names":["buildFeedbackIntegration","lazyLoadIntegration"],"mappings":";;;;;AAGA;AACA;AACA;AACA;AACO,MAAM,wBAAwB,GAAgDA,iCAAwB,CAAC;AAC9G,uBAAEC,uCAAmB;AACrB,CAAC;;;;"}
1
+ {"version":3,"file":"feedbackAsync.js","sources":["../../../../src/feedbackAsync.ts"],"sourcesContent":["import { buildFeedbackIntegration } from '@sentry-internal/feedback';\nimport { lazyLoadIntegration } from './utils/lazyLoadIntegration';\n\n/**\n * An integration to add user feedback to your application,\n * while loading most of the code lazily only when it's needed.\n */\nexport const feedbackAsyncIntegration: ReturnType<typeof buildFeedbackIntegration> = buildFeedbackIntegration({\n lazyLoadIntegration,\n});\n"],"names":["buildFeedbackIntegration","lazyLoadIntegration"],"mappings":";;;;;AAOO,MAAM,2BAAwEA,iCAAA,CAAyB;AAAA,uBAC5GC;AACF,CAAC;;;;"}
@@ -2,10 +2,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
3
  const feedback = require('@sentry-internal/feedback');
4
4
 
5
- /** Add a widget to capture user feedback to your application. */
6
5
  const feedbackSyncIntegration = feedback.buildFeedbackIntegration({
7
6
  getModalIntegration: () => feedback.feedbackModalIntegration,
8
- getScreenshotIntegration: () => feedback.feedbackScreenshotIntegration,
7
+ getScreenshotIntegration: () => feedback.feedbackScreenshotIntegration
9
8
  });
10
9
 
11
10
  exports.feedbackSyncIntegration = feedbackSyncIntegration;
@@ -1 +1 @@
1
- {"version":3,"file":"feedbackSync.js","sources":["../../../../src/feedbackSync.ts"],"sourcesContent":["import {\n buildFeedbackIntegration,\n feedbackModalIntegration,\n feedbackScreenshotIntegration,\n} from '@sentry-internal/feedback';\n\n/** Add a widget to capture user feedback to your application. */\nexport const feedbackSyncIntegration: ReturnType<typeof buildFeedbackIntegration> = buildFeedbackIntegration({\n getModalIntegration: () => feedbackModalIntegration,\n getScreenshotIntegration: () => feedbackScreenshotIntegration,\n});\n"],"names":["buildFeedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration"],"mappings":";;;;AAMA;AACO,MAAM,uBAAuB,GAAgDA,iCAAwB,CAAC;AAC7G,EAAE,mBAAmB,EAAE,MAAMC,iCAAwB;AACrD,EAAE,wBAAwB,EAAE,MAAMC,sCAA6B;AAC/D,CAAC;;;;"}
1
+ {"version":3,"file":"feedbackSync.js","sources":["../../../../src/feedbackSync.ts"],"sourcesContent":["import {\n buildFeedbackIntegration,\n feedbackModalIntegration,\n feedbackScreenshotIntegration,\n} from '@sentry-internal/feedback';\n\n/** Add a widget to capture user feedback to your application. */\nexport const feedbackSyncIntegration: ReturnType<typeof buildFeedbackIntegration> = buildFeedbackIntegration({\n getModalIntegration: () => feedbackModalIntegration,\n getScreenshotIntegration: () => feedbackScreenshotIntegration,\n});\n"],"names":["buildFeedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration"],"mappings":";;;;AAOO,MAAM,0BAAuEA,iCAAA,CAAyB;AAAA,EAC3G,qBAAqB,MAAMC,iCAAA;AAAA,EAC3B,0BAA0B,MAAMC;AAClC,CAAC;;;;"}