@sentry/browser 11.0.0-alpha.1 → 11.0.0-alpha.2

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 (175) hide show
  1. package/build/npm/cjs/dev/client.js.map +1 -1
  2. package/build/npm/cjs/dev/helpers.js +2 -1
  3. package/build/npm/cjs/dev/helpers.js.map +1 -1
  4. package/build/npm/cjs/dev/index.js +6 -4
  5. package/build/npm/cjs/dev/index.js.map +1 -1
  6. package/build/npm/cjs/dev/integrations/bfcache.js +113 -0
  7. package/build/npm/cjs/dev/integrations/bfcache.js.map +1 -0
  8. package/build/npm/cjs/dev/integrations/breadcrumbs.js +1 -1
  9. package/build/npm/cjs/dev/integrations/breadcrumbs.js.map +1 -1
  10. package/build/npm/cjs/dev/integrations/fetchStreamPerformance.js +11 -11
  11. package/build/npm/cjs/dev/integrations/fetchStreamPerformance.js.map +1 -1
  12. package/build/npm/cjs/dev/integrations/globalhandlers.js +2 -1
  13. package/build/npm/cjs/dev/integrations/globalhandlers.js.map +1 -1
  14. package/build/npm/cjs/dev/integrations/httpclient.js.map +1 -1
  15. package/build/npm/cjs/dev/integrations/reportingobserver.js +4 -1
  16. package/build/npm/cjs/dev/integrations/reportingobserver.js.map +1 -1
  17. package/build/npm/cjs/dev/integrations/spotlight.js +2 -1
  18. package/build/npm/cjs/dev/integrations/spotlight.js.map +1 -1
  19. package/build/npm/cjs/dev/integrations/view-hierarchy.js +2 -1
  20. package/build/npm/cjs/dev/integrations/view-hierarchy.js.map +1 -1
  21. package/build/npm/cjs/dev/sdk.js +0 -4
  22. package/build/npm/cjs/dev/sdk.js.map +1 -1
  23. package/build/npm/cjs/dev/tracing/browserTracingIntegration.js +26 -78
  24. package/build/npm/cjs/dev/tracing/browserTracingIntegration.js.map +1 -1
  25. package/build/npm/cjs/dev/tracing/linkedTraces.js +0 -1
  26. package/build/npm/cjs/dev/tracing/linkedTraces.js.map +1 -1
  27. package/build/npm/cjs/dev/tracing/request.js +5 -5
  28. package/build/npm/cjs/dev/tracing/request.js.map +1 -1
  29. package/build/npm/cjs/dev/utils/detectBrowserExtension.js +2 -1
  30. package/build/npm/cjs/dev/utils/detectBrowserExtension.js.map +1 -1
  31. package/build/npm/cjs/dev/utils/lazyLoadIntegration.js +1 -0
  32. package/build/npm/cjs/dev/utils/lazyLoadIntegration.js.map +1 -1
  33. package/build/npm/cjs/prod/client.js.map +1 -1
  34. package/build/npm/cjs/prod/helpers.js +2 -1
  35. package/build/npm/cjs/prod/helpers.js.map +1 -1
  36. package/build/npm/cjs/prod/index.js +6 -4
  37. package/build/npm/cjs/prod/index.js.map +1 -1
  38. package/build/npm/cjs/prod/integrations/bfcache.js +113 -0
  39. package/build/npm/cjs/prod/integrations/bfcache.js.map +1 -0
  40. package/build/npm/cjs/prod/integrations/breadcrumbs.js +1 -1
  41. package/build/npm/cjs/prod/integrations/breadcrumbs.js.map +1 -1
  42. package/build/npm/cjs/prod/integrations/fetchStreamPerformance.js +11 -11
  43. package/build/npm/cjs/prod/integrations/fetchStreamPerformance.js.map +1 -1
  44. package/build/npm/cjs/prod/integrations/globalhandlers.js +2 -1
  45. package/build/npm/cjs/prod/integrations/globalhandlers.js.map +1 -1
  46. package/build/npm/cjs/prod/integrations/httpclient.js.map +1 -1
  47. package/build/npm/cjs/prod/integrations/reportingobserver.js +4 -1
  48. package/build/npm/cjs/prod/integrations/reportingobserver.js.map +1 -1
  49. package/build/npm/cjs/prod/integrations/spotlight.js +2 -1
  50. package/build/npm/cjs/prod/integrations/spotlight.js.map +1 -1
  51. package/build/npm/cjs/prod/integrations/view-hierarchy.js +2 -1
  52. package/build/npm/cjs/prod/integrations/view-hierarchy.js.map +1 -1
  53. package/build/npm/cjs/prod/sdk.js +0 -4
  54. package/build/npm/cjs/prod/sdk.js.map +1 -1
  55. package/build/npm/cjs/prod/tracing/browserTracingIntegration.js +26 -78
  56. package/build/npm/cjs/prod/tracing/browserTracingIntegration.js.map +1 -1
  57. package/build/npm/cjs/prod/tracing/linkedTraces.js +0 -1
  58. package/build/npm/cjs/prod/tracing/linkedTraces.js.map +1 -1
  59. package/build/npm/cjs/prod/tracing/request.js +5 -5
  60. package/build/npm/cjs/prod/tracing/request.js.map +1 -1
  61. package/build/npm/cjs/prod/utils/detectBrowserExtension.js +2 -1
  62. package/build/npm/cjs/prod/utils/detectBrowserExtension.js.map +1 -1
  63. package/build/npm/cjs/prod/utils/lazyLoadIntegration.js +1 -0
  64. package/build/npm/cjs/prod/utils/lazyLoadIntegration.js.map +1 -1
  65. package/build/npm/esm/dev/client.js.map +1 -1
  66. package/build/npm/esm/dev/helpers.js +2 -1
  67. package/build/npm/esm/dev/helpers.js.map +1 -1
  68. package/build/npm/esm/dev/index.js +4 -4
  69. package/build/npm/esm/dev/integrations/bfcache.js +109 -0
  70. package/build/npm/esm/dev/integrations/bfcache.js.map +1 -0
  71. package/build/npm/esm/dev/integrations/breadcrumbs.js +2 -2
  72. package/build/npm/esm/dev/integrations/breadcrumbs.js.map +1 -1
  73. package/build/npm/esm/dev/integrations/fetchStreamPerformance.js +3 -3
  74. package/build/npm/esm/dev/integrations/fetchStreamPerformance.js.map +1 -1
  75. package/build/npm/esm/dev/integrations/globalhandlers.js +2 -1
  76. package/build/npm/esm/dev/integrations/globalhandlers.js.map +1 -1
  77. package/build/npm/esm/dev/integrations/httpclient.js.map +1 -1
  78. package/build/npm/esm/dev/integrations/reportingobserver.js +4 -1
  79. package/build/npm/esm/dev/integrations/reportingobserver.js.map +1 -1
  80. package/build/npm/esm/dev/integrations/spotlight.js +2 -1
  81. package/build/npm/esm/dev/integrations/spotlight.js.map +1 -1
  82. package/build/npm/esm/dev/integrations/view-hierarchy.js +2 -1
  83. package/build/npm/esm/dev/integrations/view-hierarchy.js.map +1 -1
  84. package/build/npm/esm/dev/package.json +1 -1
  85. package/build/npm/esm/dev/sdk.js +0 -4
  86. package/build/npm/esm/dev/sdk.js.map +1 -1
  87. package/build/npm/esm/dev/tracing/browserTracingIntegration.js +28 -79
  88. package/build/npm/esm/dev/tracing/browserTracingIntegration.js.map +1 -1
  89. package/build/npm/esm/dev/tracing/linkedTraces.js +0 -1
  90. package/build/npm/esm/dev/tracing/linkedTraces.js.map +1 -1
  91. package/build/npm/esm/dev/tracing/request.js +7 -7
  92. package/build/npm/esm/dev/tracing/request.js.map +1 -1
  93. package/build/npm/esm/dev/utils/detectBrowserExtension.js +2 -1
  94. package/build/npm/esm/dev/utils/detectBrowserExtension.js.map +1 -1
  95. package/build/npm/esm/dev/utils/lazyLoadIntegration.js +1 -0
  96. package/build/npm/esm/dev/utils/lazyLoadIntegration.js.map +1 -1
  97. package/build/npm/esm/prod/client.js.map +1 -1
  98. package/build/npm/esm/prod/helpers.js +2 -1
  99. package/build/npm/esm/prod/helpers.js.map +1 -1
  100. package/build/npm/esm/prod/index.js +4 -4
  101. package/build/npm/esm/prod/integrations/bfcache.js +109 -0
  102. package/build/npm/esm/prod/integrations/bfcache.js.map +1 -0
  103. package/build/npm/esm/prod/integrations/breadcrumbs.js +2 -2
  104. package/build/npm/esm/prod/integrations/breadcrumbs.js.map +1 -1
  105. package/build/npm/esm/prod/integrations/fetchStreamPerformance.js +3 -3
  106. package/build/npm/esm/prod/integrations/fetchStreamPerformance.js.map +1 -1
  107. package/build/npm/esm/prod/integrations/globalhandlers.js +2 -1
  108. package/build/npm/esm/prod/integrations/globalhandlers.js.map +1 -1
  109. package/build/npm/esm/prod/integrations/httpclient.js.map +1 -1
  110. package/build/npm/esm/prod/integrations/reportingobserver.js +4 -1
  111. package/build/npm/esm/prod/integrations/reportingobserver.js.map +1 -1
  112. package/build/npm/esm/prod/integrations/spotlight.js +2 -1
  113. package/build/npm/esm/prod/integrations/spotlight.js.map +1 -1
  114. package/build/npm/esm/prod/integrations/view-hierarchy.js +2 -1
  115. package/build/npm/esm/prod/integrations/view-hierarchy.js.map +1 -1
  116. package/build/npm/esm/prod/package.json +1 -1
  117. package/build/npm/esm/prod/sdk.js +0 -4
  118. package/build/npm/esm/prod/sdk.js.map +1 -1
  119. package/build/npm/esm/prod/tracing/browserTracingIntegration.js +28 -79
  120. package/build/npm/esm/prod/tracing/browserTracingIntegration.js.map +1 -1
  121. package/build/npm/esm/prod/tracing/linkedTraces.js +0 -1
  122. package/build/npm/esm/prod/tracing/linkedTraces.js.map +1 -1
  123. package/build/npm/esm/prod/tracing/request.js +7 -7
  124. package/build/npm/esm/prod/tracing/request.js.map +1 -1
  125. package/build/npm/esm/prod/utils/detectBrowserExtension.js +2 -1
  126. package/build/npm/esm/prod/utils/detectBrowserExtension.js.map +1 -1
  127. package/build/npm/esm/prod/utils/lazyLoadIntegration.js +1 -0
  128. package/build/npm/esm/prod/utils/lazyLoadIntegration.js.map +1 -1
  129. package/build/npm/types/client.d.ts +22 -1
  130. package/build/npm/types/client.d.ts.map +1 -1
  131. package/build/npm/types/exports.d.ts +1 -1
  132. package/build/npm/types/exports.d.ts.map +1 -1
  133. package/build/npm/types/helpers.d.ts.map +1 -1
  134. package/build/npm/types/index.bundle.tracing.d.ts +3 -2
  135. package/build/npm/types/index.bundle.tracing.d.ts.map +1 -1
  136. package/build/npm/types/index.bundle.tracing.logs.metrics.d.ts +3 -2
  137. package/build/npm/types/index.bundle.tracing.logs.metrics.d.ts.map +1 -1
  138. package/build/npm/types/index.bundle.tracing.replay.d.ts +3 -2
  139. package/build/npm/types/index.bundle.tracing.replay.d.ts.map +1 -1
  140. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts +3 -2
  141. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts.map +1 -1
  142. package/build/npm/types/index.bundle.tracing.replay.feedback.logs.metrics.d.ts +3 -2
  143. package/build/npm/types/index.bundle.tracing.replay.feedback.logs.metrics.d.ts.map +1 -1
  144. package/build/npm/types/index.bundle.tracing.replay.logs.metrics.d.ts +3 -2
  145. package/build/npm/types/index.bundle.tracing.replay.logs.metrics.d.ts.map +1 -1
  146. package/build/npm/types/index.d.ts +5 -3
  147. package/build/npm/types/index.d.ts.map +1 -1
  148. package/build/npm/types/integrations/bfcache.d.ts +42 -0
  149. package/build/npm/types/integrations/bfcache.d.ts.map +1 -0
  150. package/build/npm/types/integrations/breadcrumbs.d.ts.map +1 -1
  151. package/build/npm/types/integrations/httpclient.d.ts.map +1 -1
  152. package/build/npm/types/integrations/interactions.d.ts +2 -0
  153. package/build/npm/types/integrations/interactions.d.ts.map +1 -0
  154. package/build/npm/types/integrations/reportingobserver.d.ts.map +1 -1
  155. package/build/npm/types/integrations/spotlight.d.ts.map +1 -1
  156. package/build/npm/types/integrations/view-hierarchy.d.ts.map +1 -1
  157. package/build/npm/types/sdk.d.ts.map +1 -1
  158. package/build/npm/types/tracing/browserTracingIntegration.d.ts +0 -9
  159. package/build/npm/types/tracing/browserTracingIntegration.d.ts.map +1 -1
  160. package/build/npm/types/tracing/request.d.ts +1 -0
  161. package/build/npm/types/tracing/request.d.ts.map +1 -1
  162. package/build/npm/types/utils/detectBrowserExtension.d.ts.map +1 -1
  163. package/build/npm/types/utils/lazyLoadIntegration.d.ts +1 -1
  164. package/build/npm/types/utils/lazyLoadIntegration.d.ts.map +1 -1
  165. package/package.json +10 -9
  166. package/build/npm/cjs/dev/integrations/spanstreaming.js +0 -34
  167. package/build/npm/cjs/dev/integrations/spanstreaming.js.map +0 -1
  168. package/build/npm/cjs/prod/integrations/spanstreaming.js +0 -34
  169. package/build/npm/cjs/prod/integrations/spanstreaming.js.map +0 -1
  170. package/build/npm/esm/dev/integrations/spanstreaming.js +0 -31
  171. package/build/npm/esm/dev/integrations/spanstreaming.js.map +0 -1
  172. package/build/npm/esm/prod/integrations/spanstreaming.js +0 -31
  173. package/build/npm/esm/prod/integrations/spanstreaming.js.map +0 -1
  174. package/build/npm/types/integrations/spanstreaming.d.ts +0 -5
  175. package/build/npm/types/integrations/spanstreaming.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"browserTracingIntegration.d.ts","sourceRoot":"","sources":["../../../../src/tracing/browserTracingIntegration.ts"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M,GAAG,MAAM,GAAG,SAAS,CAQhE"}
1
+ {"version":3,"file":"browserTracingIntegration.d.ts","sourceRoot":"","sources":["../../../../src/tracing/browserTracingIntegration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EAEN,eAAe,EACf,gBAAgB,EAChB,IAAI,EACJ,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAgD9B,eAAO,MAAM,8BAA8B,mBAAmB,CAAC;AAE/D,8CAA8C;AAC9C,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;OAIG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;;OAIG;IACH,oBAAoB,EAAE,OAAO,CAAC;IAE9B;;;;;;OAMG;IACH,kBAAkB,EAAE,OAAO,CAAC;IAE5B;;;;OAIG;IACH,cAAc,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,wBAAwB,EAAE,OAAO,CAAC;IAElC;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAE3B;;;;OAIG;IACH,mBAAmB,EAAE,KAAK,CAAC,iBAAiB,GAAG,cAAc,GAAG,cAAc,GAAG,gBAAgB,GAAG,MAAM,CAAC,CAAC;IAE5G;;;;;OAKG;IACH,eAAe,EAAE,OAAO,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,iBAAiB,EAAE,WAAW,GAAG,iBAAiB,GAAG,KAAK,CAAC;IAE3D;;;;;;;;;;;;;;OAcG;I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AAS,CAQhE"}
@@ -19,6 +19,7 @@ export interface RequestInstrumentationOptions {
19
19
  *
20
20
  * If any of the two match any of the provided values, tracing headers will be attached to the outgoing request.
21
21
  * Both, the string values, and the RegExes you provide in the array will match if they partially match the URL or pathname.
22
+ * Matching is case-insensitive, so `'myApi.com'` and `/^myApi\.com/` both match a request to `https://myapi.com`.
22
23
  *
23
24
  * Examples:
24
25
  * - `tracePropagationTargets: [/^\/api/]` and request to `https://same-origin.com/api/posts`:
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/tracing/request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EAEN,eAAe,EACf,gBAAgB,EAEhB,IAAI,EAEL,MAAM,sBAAsB,CAAC;AAsC9B,0CAA0C;AAC1C,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,uBAAuB,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAEjD;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAE3B;;;;;OAKG;IACH,0BAA0B,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAE9D;;OAEG;IACH,kBAAkB,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,kBAAkB,EAAE,eAAe,GAAG,IAAI,CAAC;IAE3E;;OAEG;IACH,gBAAgB,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,mBAAmB,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC5E;AAED,eAAO,MAAM,oCAAoC,EAAE,6BAIlD,CAAC;AAEF,0DAA0D;AAC1D,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,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,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,SAAS,GACvD,OAAO,CAqCT"}
@@ -1 +1 @@
1
- {"version":3,"file":"detectBrowserExtension.d.ts","sourceRoot":"","sources":["../../../../src/utils/detectBrowserExtension.ts"],"names":[],"mappings":"AAeA;;;GAGG;AACH,wBAAgB,wCAAwC,IAAI,OAAO,CAelE"}
1
+ {"version":3,"file":"detectBrowserExtension.d.ts","sourceRoot":"","sources":["../../../../src/utils/detectBrowserExtension.ts"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,wBAAgB,wCAAwC,IAAI,OAAO,CAelE"}
@@ -1,5 +1,5 @@
1
1
  import type { IntegrationFn } from '@sentry/core/browser';
2
- declare const LAZY_LOADABLE_NAMES: readonly ['replayIntegration', 'replayCanvasIntegration', 'feedbackIntegration', 'feedbackModalIntegration', 'feedbackScreenshotIntegration', 'captureConsoleIntegration', 'contextLinesIntegration', 'linkedErrorsIntegration', 'dedupeIntegration', 'extraErrorDataIntegration', 'graphqlClientIntegration', 'httpClientIntegration', 'reportingObserverIntegration', 'rewriteFramesIntegration', 'browserProfilingIntegration', 'userTimingIntegration', 'moduleMetadataIntegration'];
2
+ declare const LAZY_LOADABLE_NAMES: readonly ['replayIntegration', 'replayCanvasIntegration', 'feedbackIntegration', 'feedbackModalIntegration', 'feedbackScreenshotIntegration', 'captureConsoleIntegration', 'contextLinesIntegration', 'linkedErrorsIntegration', 'dedupeIntegration', 'extraErrorDataIntegration', 'graphqlClientIntegration', 'httpClientIntegration', 'reportingObserverIntegration', 'rewriteFramesIntegration', 'browserProfilingIntegration', 'userTimingIntegration', 'interactionsIntegration', 'moduleMetadataIntegration'];
3
3
  type ElementOf<T extends readonly unknown[]> = T[number];
4
4
  type LazyLoadableIntegrationName = ElementOf<typeof LAZY_LOADABLE_NAMES>;
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"lazyLoadIntegration.d.ts","sourceRoot":"","sources":["../../../../src/utils/lazyLoadIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAQ1D,QAAA,MAAM,mBAAmB,YACvB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,+BAA+B,EAC/B,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,8BAA8B,EAC9B,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,2BAA2B,CACnB,CAAC;AAEX,KAAK,SAAS,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;AACzD,KAAK,2BAA2B,GAAG,SAAS,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAgBzE;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,2BAA2B,EACjC,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,aAAa,CAAC,CAwDxB"}
1
+ {"version":3,"file":"lazyLoadIntegration.d.ts","sourceRoot":"","sources":["../../../../src/utils/lazyLoadIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAQ1D,QAAA,MAAM,mBAAmB,YACvB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,0BAA0B,EAC1B,+BAA+B,EAC/B,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,8BAA8B,EAC9B,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,yBAAyB,EACzB,2BAA2B,CACnB,CAAC;AAEX,KAAK,SAAS,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;AACzD,KAAK,2BAA2B,GAAG,SAAS,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAgBzE;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,2BAA2B,EACjC,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,aAAa,CAAC,CAwDxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/browser",
3
- "version": "11.0.0-alpha.1",
3
+ "version": "11.0.0-alpha.2",
4
4
  "description": "Official Sentry SDK for browsers",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
@@ -38,16 +38,16 @@
38
38
  "access": "public"
39
39
  },
40
40
  "dependencies": {
41
- "@sentry/browser-utils": "11.0.0-alpha.1",
42
- "@sentry/conventions": "^0.19.0",
43
- "@sentry/feedback": "11.0.0-alpha.1",
44
- "@sentry/replay": "11.0.0-alpha.1",
45
- "@sentry/replay-canvas": "11.0.0-alpha.1",
46
- "@sentry/core": "11.0.0-alpha.1"
41
+ "@sentry/browser-utils": "11.0.0-alpha.2",
42
+ "@sentry/conventions": "^0.20.0",
43
+ "@sentry/feedback": "11.0.0-alpha.2",
44
+ "@sentry/replay": "11.0.0-alpha.2",
45
+ "@sentry/replay-canvas": "11.0.0-alpha.2",
46
+ "@sentry/core": "11.0.0-alpha.2"
47
47
  },
48
48
  "devDependencies": {
49
- "@sentry-internal/integration-shims": "11.0.0-alpha.1",
50
- "fake-indexeddb": "^6.2.4"
49
+ "@sentry-internal/integration-shims": "11.0.0-alpha.2",
50
+ "fake-indexeddb": "^6.2.5"
51
51
  },
52
52
  "scripts": {
53
53
  "build": "run-p build:transpile build:bundle build:types",
@@ -64,6 +64,7 @@
64
64
  "clean": "rimraf build coverage .rpt2_cache sentry-browser-*.tgz",
65
65
  "lint:fix": "oxlint . --fix --type-aware",
66
66
  "lint": "oxlint . --type-aware",
67
+ "lint:types": "oxlint src --type-aware --type-check",
67
68
  "lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs/prod}/*.js && es-check es2020 ./build/npm/esm/prod/*.js --module",
68
69
  "size:check": "cat build/bundles/bundle.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES2017: \",$1,\"kB\";}'",
69
70
  "test": "vitest run",
@@ -1,34 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const browser = require('@sentry/core/browser');
4
- const debugBuild = require('../debug-build.js');
5
-
6
- const INTEGRATION_NAME = "SpanStreaming";
7
- const spanStreamingIntegration = browser.defineIntegration(() => {
8
- return {
9
- name: INTEGRATION_NAME,
10
- setup(client) {
11
- if (!browser.hasSpanStreamingEnabled(client)) {
12
- debugBuild.DEBUG_BUILD && browser.debug.log(`[${INTEGRATION_NAME}] \`traceLifecycle\` is "static", skipping setup.`);
13
- return;
14
- }
15
- const buffer = new browser.SpanBuffer(client);
16
- client.on("afterSpanEnd", (span) => {
17
- if (!browser.spanIsSampled(span)) {
18
- return;
19
- }
20
- buffer.add(browser.captureSpan(span, client));
21
- });
22
- client.on("afterSegmentSpanEnd", (segmentSpan) => {
23
- const traceId = segmentSpan.spanContext().traceId;
24
- setTimeout(() => {
25
- buffer.flush(traceId);
26
- }, 500);
27
- });
28
- }
29
- };
30
- });
31
-
32
- exports.INTEGRATION_NAME = INTEGRATION_NAME;
33
- exports.spanStreamingIntegration = spanStreamingIntegration;
34
- //# sourceMappingURL=spanstreaming.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spanstreaming.js","sources":["../../../../../src/integrations/spanstreaming.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core/browser';\nimport {\n captureSpan,\n debug,\n defineIntegration,\n hasSpanStreamingEnabled,\n SpanBuffer,\n spanIsSampled,\n} from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\n\nexport const INTEGRATION_NAME = 'SpanStreaming' as const;\n\nexport const spanStreamingIntegration = defineIntegration(() => {\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n if (!hasSpanStreamingEnabled(client)) {\n DEBUG_BUILD && debug.log(`[${INTEGRATION_NAME}] \\`traceLifecycle\\` is \"static\", skipping setup.`);\n return;\n }\n\n const buffer = new SpanBuffer(client);\n\n client.on('afterSpanEnd', span => {\n // Negatively sampled spans must not be captured.\n // This happens because OTel and we create non-recording spans for negatively sampled spans\n // that go through the same life cycle as recording spans.\n if (!spanIsSampled(span)) {\n return;\n }\n buffer.add(captureSpan(span, client));\n });\n\n // In addition to capturing the span, we also flush the trace when the segment\n // span ends to ensure things are sent timely. We never know when the browser\n // is closed, users navigate away, etc.\n client.on('afterSegmentSpanEnd', segmentSpan => {\n const traceId = segmentSpan.spanContext().traceId;\n setTimeout(() => {\n buffer.flush(traceId);\n }, 500);\n });\n },\n };\n}) satisfies IntegrationFn;\n"],"names":["defineIntegration","hasSpanStreamingEnabled","DEBUG_BUILD","debug","SpanBuffer","spanIsSampled","captureSpan"],"mappings":";;;;;AAWO,MAAM,gBAAA,GAAmB;AAEzB,MAAM,wBAAA,GAA2BA,0BAAkB,MAAM;AAC9D,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,MAAM,MAAA,EAAQ;AACZ,MAAA,IAAI,CAACC,+BAAA,CAAwB,MAAM,CAAA,EAAG;AACpC,QAAAC,sBAAA,IAAeC,aAAA,CAAM,GAAA,CAAI,CAAA,CAAA,EAAI,gBAAgB,CAAA,iDAAA,CAAmD,CAAA;AAChG,QAAA;AAAA,MACF;AAEA,MAAA,MAAM,MAAA,GAAS,IAAIC,kBAAA,CAAW,MAAM,CAAA;AAEpC,MAAA,MAAA,CAAO,EAAA,CAAG,gBAAgB,CAAA,IAAA,KAAQ;AAIhC,QAAA,IAAI,CAACC,qBAAA,CAAc,IAAI,CAAA,EAAG;AACxB,UAAA;AAAA,QACF;AACA,QAAA,MAAA,CAAO,GAAA,CAAIC,mBAAA,CAAY,IAAA,EAAM,MAAM,CAAC,CAAA;AAAA,MACtC,CAAC,CAAA;AAKD,MAAA,MAAA,CAAO,EAAA,CAAG,uBAAuB,CAAA,WAAA,KAAe;AAC9C,QAAA,MAAM,OAAA,GAAU,WAAA,CAAY,WAAA,EAAY,CAAE,OAAA;AAC1C,QAAA,UAAA,CAAW,MAAM;AACf,UAAA,MAAA,CAAO,MAAM,OAAO,CAAA;AAAA,QACtB,GAAG,GAAG,CAAA;AAAA,MACR,CAAC,CAAA;AAAA,IACH;AAAA,GACF;AACF,CAAC;;;;;"}
@@ -1,34 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- const browser = require('@sentry/core/browser');
4
- const debugBuild = require('../debug-build.js');
5
-
6
- const INTEGRATION_NAME = "SpanStreaming";
7
- const spanStreamingIntegration = browser.defineIntegration(() => {
8
- return {
9
- name: INTEGRATION_NAME,
10
- setup(client) {
11
- if (!browser.hasSpanStreamingEnabled(client)) {
12
- debugBuild.DEBUG_BUILD && browser.debug.log(`[${INTEGRATION_NAME}] \`traceLifecycle\` is "static", skipping setup.`);
13
- return;
14
- }
15
- const buffer = new browser.SpanBuffer(client);
16
- client.on("afterSpanEnd", (span) => {
17
- if (!browser.spanIsSampled(span)) {
18
- return;
19
- }
20
- buffer.add(browser.captureSpan(span, client));
21
- });
22
- client.on("afterSegmentSpanEnd", (segmentSpan) => {
23
- const traceId = segmentSpan.spanContext().traceId;
24
- setTimeout(() => {
25
- buffer.flush(traceId);
26
- }, 500);
27
- });
28
- }
29
- };
30
- });
31
-
32
- exports.INTEGRATION_NAME = INTEGRATION_NAME;
33
- exports.spanStreamingIntegration = spanStreamingIntegration;
34
- //# sourceMappingURL=spanstreaming.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spanstreaming.js","sources":["../../../../../src/integrations/spanstreaming.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core/browser';\nimport {\n captureSpan,\n debug,\n defineIntegration,\n hasSpanStreamingEnabled,\n SpanBuffer,\n spanIsSampled,\n} from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\n\nexport const INTEGRATION_NAME = 'SpanStreaming' as const;\n\nexport const spanStreamingIntegration = defineIntegration(() => {\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n if (!hasSpanStreamingEnabled(client)) {\n DEBUG_BUILD && debug.log(`[${INTEGRATION_NAME}] \\`traceLifecycle\\` is \"static\", skipping setup.`);\n return;\n }\n\n const buffer = new SpanBuffer(client);\n\n client.on('afterSpanEnd', span => {\n // Negatively sampled spans must not be captured.\n // This happens because OTel and we create non-recording spans for negatively sampled spans\n // that go through the same life cycle as recording spans.\n if (!spanIsSampled(span)) {\n return;\n }\n buffer.add(captureSpan(span, client));\n });\n\n // In addition to capturing the span, we also flush the trace when the segment\n // span ends to ensure things are sent timely. We never know when the browser\n // is closed, users navigate away, etc.\n client.on('afterSegmentSpanEnd', segmentSpan => {\n const traceId = segmentSpan.spanContext().traceId;\n setTimeout(() => {\n buffer.flush(traceId);\n }, 500);\n });\n },\n };\n}) satisfies IntegrationFn;\n"],"names":["defineIntegration","hasSpanStreamingEnabled","DEBUG_BUILD","debug","SpanBuffer","spanIsSampled","captureSpan"],"mappings":";;;;;AAWO,MAAM,gBAAA,GAAmB;AAEzB,MAAM,wBAAA,GAA2BA,0BAAkB,MAAM;AAC9D,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,MAAM,MAAA,EAAQ;AACZ,MAAA,IAAI,CAACC,+BAAA,CAAwB,MAAM,CAAA,EAAG;AACpC,QAAAC,sBAAA,IAAeC,aAAA,CAAM,GAAA,CAAI,CAAA,CAAA,EAAI,gBAAgB,CAAA,iDAAA,CAAmD,CAAA;AAChG,QAAA;AAAA,MACF;AAEA,MAAA,MAAM,MAAA,GAAS,IAAIC,kBAAA,CAAW,MAAM,CAAA;AAEpC,MAAA,MAAA,CAAO,EAAA,CAAG,gBAAgB,CAAA,IAAA,KAAQ;AAIhC,QAAA,IAAI,CAACC,qBAAA,CAAc,IAAI,CAAA,EAAG;AACxB,UAAA;AAAA,QACF;AACA,QAAA,MAAA,CAAO,GAAA,CAAIC,mBAAA,CAAY,IAAA,EAAM,MAAM,CAAC,CAAA;AAAA,MACtC,CAAC,CAAA;AAKD,MAAA,MAAA,CAAO,EAAA,CAAG,uBAAuB,CAAA,WAAA,KAAe;AAC9C,QAAA,MAAM,OAAA,GAAU,WAAA,CAAY,WAAA,EAAY,CAAE,OAAA;AAC1C,QAAA,UAAA,CAAW,MAAM;AACf,UAAA,MAAA,CAAO,MAAM,OAAO,CAAA;AAAA,QACtB,GAAG,GAAG,CAAA;AAAA,MACR,CAAC,CAAA;AAAA,IACH;AAAA,GACF;AACF,CAAC;;;;;"}
@@ -1,31 +0,0 @@
1
- import { defineIntegration, hasSpanStreamingEnabled, debug, SpanBuffer, spanIsSampled, captureSpan } from '@sentry/core/browser';
2
- import { DEBUG_BUILD } from '../debug-build.js';
3
-
4
- const INTEGRATION_NAME = "SpanStreaming";
5
- const spanStreamingIntegration = defineIntegration(() => {
6
- return {
7
- name: INTEGRATION_NAME,
8
- setup(client) {
9
- if (!hasSpanStreamingEnabled(client)) {
10
- DEBUG_BUILD && debug.log(`[${INTEGRATION_NAME}] \`traceLifecycle\` is "static", skipping setup.`);
11
- return;
12
- }
13
- const buffer = new SpanBuffer(client);
14
- client.on("afterSpanEnd", (span) => {
15
- if (!spanIsSampled(span)) {
16
- return;
17
- }
18
- buffer.add(captureSpan(span, client));
19
- });
20
- client.on("afterSegmentSpanEnd", (segmentSpan) => {
21
- const traceId = segmentSpan.spanContext().traceId;
22
- setTimeout(() => {
23
- buffer.flush(traceId);
24
- }, 500);
25
- });
26
- }
27
- };
28
- });
29
-
30
- export { INTEGRATION_NAME, spanStreamingIntegration };
31
- //# sourceMappingURL=spanstreaming.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spanstreaming.js","sources":["../../../../../src/integrations/spanstreaming.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core/browser';\nimport {\n captureSpan,\n debug,\n defineIntegration,\n hasSpanStreamingEnabled,\n SpanBuffer,\n spanIsSampled,\n} from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\n\nexport const INTEGRATION_NAME = 'SpanStreaming' as const;\n\nexport const spanStreamingIntegration = defineIntegration(() => {\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n if (!hasSpanStreamingEnabled(client)) {\n DEBUG_BUILD && debug.log(`[${INTEGRATION_NAME}] \\`traceLifecycle\\` is \"static\", skipping setup.`);\n return;\n }\n\n const buffer = new SpanBuffer(client);\n\n client.on('afterSpanEnd', span => {\n // Negatively sampled spans must not be captured.\n // This happens because OTel and we create non-recording spans for negatively sampled spans\n // that go through the same life cycle as recording spans.\n if (!spanIsSampled(span)) {\n return;\n }\n buffer.add(captureSpan(span, client));\n });\n\n // In addition to capturing the span, we also flush the trace when the segment\n // span ends to ensure things are sent timely. We never know when the browser\n // is closed, users navigate away, etc.\n client.on('afterSegmentSpanEnd', segmentSpan => {\n const traceId = segmentSpan.spanContext().traceId;\n setTimeout(() => {\n buffer.flush(traceId);\n }, 500);\n });\n },\n };\n}) satisfies IntegrationFn;\n"],"names":[],"mappings":";;;AAWO,MAAM,gBAAA,GAAmB;AAEzB,MAAM,wBAAA,GAA2B,kBAAkB,MAAM;AAC9D,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,MAAM,MAAA,EAAQ;AACZ,MAAA,IAAI,CAAC,uBAAA,CAAwB,MAAM,CAAA,EAAG;AACpC,QAAA,WAAA,IAAe,KAAA,CAAM,GAAA,CAAI,CAAA,CAAA,EAAI,gBAAgB,CAAA,iDAAA,CAAmD,CAAA;AAChG,QAAA;AAAA,MACF;AAEA,MAAA,MAAM,MAAA,GAAS,IAAI,UAAA,CAAW,MAAM,CAAA;AAEpC,MAAA,MAAA,CAAO,EAAA,CAAG,gBAAgB,CAAA,IAAA,KAAQ;AAIhC,QAAA,IAAI,CAAC,aAAA,CAAc,IAAI,CAAA,EAAG;AACxB,UAAA;AAAA,QACF;AACA,QAAA,MAAA,CAAO,GAAA,CAAI,WAAA,CAAY,IAAA,EAAM,MAAM,CAAC,CAAA;AAAA,MACtC,CAAC,CAAA;AAKD,MAAA,MAAA,CAAO,EAAA,CAAG,uBAAuB,CAAA,WAAA,KAAe;AAC9C,QAAA,MAAM,OAAA,GAAU,WAAA,CAAY,WAAA,EAAY,CAAE,OAAA;AAC1C,QAAA,UAAA,CAAW,MAAM;AACf,UAAA,MAAA,CAAO,MAAM,OAAO,CAAA;AAAA,QACtB,GAAG,GAAG,CAAA;AAAA,MACR,CAAC,CAAA;AAAA,IACH;AAAA,GACF;AACF,CAAC;;;;"}
@@ -1,31 +0,0 @@
1
- import { defineIntegration, hasSpanStreamingEnabled, debug, SpanBuffer, spanIsSampled, captureSpan } from '@sentry/core/browser';
2
- import { DEBUG_BUILD } from '../debug-build.js';
3
-
4
- const INTEGRATION_NAME = "SpanStreaming";
5
- const spanStreamingIntegration = defineIntegration(() => {
6
- return {
7
- name: INTEGRATION_NAME,
8
- setup(client) {
9
- if (!hasSpanStreamingEnabled(client)) {
10
- DEBUG_BUILD && debug.log(`[${INTEGRATION_NAME}] \`traceLifecycle\` is "static", skipping setup.`);
11
- return;
12
- }
13
- const buffer = new SpanBuffer(client);
14
- client.on("afterSpanEnd", (span) => {
15
- if (!spanIsSampled(span)) {
16
- return;
17
- }
18
- buffer.add(captureSpan(span, client));
19
- });
20
- client.on("afterSegmentSpanEnd", (segmentSpan) => {
21
- const traceId = segmentSpan.spanContext().traceId;
22
- setTimeout(() => {
23
- buffer.flush(traceId);
24
- }, 500);
25
- });
26
- }
27
- };
28
- });
29
-
30
- export { INTEGRATION_NAME, spanStreamingIntegration };
31
- //# sourceMappingURL=spanstreaming.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spanstreaming.js","sources":["../../../../../src/integrations/spanstreaming.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core/browser';\nimport {\n captureSpan,\n debug,\n defineIntegration,\n hasSpanStreamingEnabled,\n SpanBuffer,\n spanIsSampled,\n} from '@sentry/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\n\nexport const INTEGRATION_NAME = 'SpanStreaming' as const;\n\nexport const spanStreamingIntegration = defineIntegration(() => {\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n if (!hasSpanStreamingEnabled(client)) {\n DEBUG_BUILD && debug.log(`[${INTEGRATION_NAME}] \\`traceLifecycle\\` is \"static\", skipping setup.`);\n return;\n }\n\n const buffer = new SpanBuffer(client);\n\n client.on('afterSpanEnd', span => {\n // Negatively sampled spans must not be captured.\n // This happens because OTel and we create non-recording spans for negatively sampled spans\n // that go through the same life cycle as recording spans.\n if (!spanIsSampled(span)) {\n return;\n }\n buffer.add(captureSpan(span, client));\n });\n\n // In addition to capturing the span, we also flush the trace when the segment\n // span ends to ensure things are sent timely. We never know when the browser\n // is closed, users navigate away, etc.\n client.on('afterSegmentSpanEnd', segmentSpan => {\n const traceId = segmentSpan.spanContext().traceId;\n setTimeout(() => {\n buffer.flush(traceId);\n }, 500);\n });\n },\n };\n}) satisfies IntegrationFn;\n"],"names":[],"mappings":";;;AAWO,MAAM,gBAAA,GAAmB;AAEzB,MAAM,wBAAA,GAA2B,kBAAkB,MAAM;AAC9D,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,MAAM,MAAA,EAAQ;AACZ,MAAA,IAAI,CAAC,uBAAA,CAAwB,MAAM,CAAA,EAAG;AACpC,QAAA,WAAA,IAAe,KAAA,CAAM,GAAA,CAAI,CAAA,CAAA,EAAI,gBAAgB,CAAA,iDAAA,CAAmD,CAAA;AAChG,QAAA;AAAA,MACF;AAEA,MAAA,MAAM,MAAA,GAAS,IAAI,UAAA,CAAW,MAAM,CAAA;AAEpC,MAAA,MAAA,CAAO,EAAA,CAAG,gBAAgB,CAAA,IAAA,KAAQ;AAIhC,QAAA,IAAI,CAAC,aAAA,CAAc,IAAI,CAAA,EAAG;AACxB,UAAA;AAAA,QACF;AACA,QAAA,MAAA,CAAO,GAAA,CAAI,WAAA,CAAY,IAAA,EAAM,MAAM,CAAC,CAAA;AAAA,MACtC,CAAC,CAAA;AAKD,MAAA,MAAA,CAAO,EAAA,CAAG,uBAAuB,CAAA,WAAA,KAAe;AAC9C,QAAA,MAAM,OAAA,GAAU,WAAA,CAAY,WAAA,EAAY,CAAE,OAAA;AAC1C,QAAA,UAAA,CAAW,MAAM;AACf,UAAA,MAAA,CAAO,MAAM,OAAO,CAAA;AAAA,QACtB,GAAG,GAAG,CAAA;AAAA,MACR,CAAC,CAAA;AAAA,IACH;AAAA,GACF;AACF,CAAC;;;;"}
@@ -1,5 +0,0 @@
1
- export declare const INTEGRATION_NAME: 'SpanStreaming';
2
- export declare const spanStreamingIntegration: () => import("@sentry/core").Integration & {
3
- name: "SpanStreaming";
4
- };
5
- //# sourceMappingURL=spanstreaming.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spanstreaming.d.ts","sourceRoot":"","sources":["../../../../src/integrations/spanstreaming.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,gBAAgB,EAAG,eAAwB,CAAC;AAEzD,eAAO,MAAM,wBAAwB;;CAgCX,CAAC"}