@sentry/browser-utils 10.68.0 → 11.0.0-alpha.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 (144) hide show
  1. package/build/cjs/htmlTreeAsString.js.map +1 -1
  2. package/build/cjs/index.js +2 -1
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/metrics/browserMetrics.js +25 -91
  5. package/build/cjs/metrics/browserMetrics.js.map +1 -1
  6. package/build/cjs/metrics/inp.js +0 -57
  7. package/build/cjs/metrics/inp.js.map +1 -1
  8. package/build/cjs/metrics/lcp.js +0 -67
  9. package/build/cjs/metrics/lcp.js.map +1 -1
  10. package/build/cjs/metrics/userTiming.js +118 -0
  11. package/build/cjs/metrics/userTiming.js.map +1 -0
  12. package/build/cjs/metrics/utils.js +0 -43
  13. package/build/cjs/metrics/utils.js.map +1 -1
  14. package/build/cjs/metrics/web-vitals/lib/getVisibilityWatcher.js +2 -6
  15. package/build/cjs/metrics/web-vitals/lib/getVisibilityWatcher.js.map +1 -1
  16. package/build/cjs/metrics/web-vitals/lib/initUnique.js +1 -1
  17. package/build/cjs/metrics/web-vitals/lib/initUnique.js.map +1 -1
  18. package/build/cjs/metrics/web-vitals/lib/onHidden.js +3 -4
  19. package/build/cjs/metrics/web-vitals/lib/onHidden.js.map +1 -1
  20. package/build/cjs/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js.map +1 -1
  21. package/build/cjs/metrics/web-vitals/lib/whenIdleOrHidden.js +0 -2
  22. package/build/cjs/metrics/web-vitals/lib/whenIdleOrHidden.js.map +1 -1
  23. package/build/cjs/metrics/webVitalSpans.js +25 -9
  24. package/build/cjs/metrics/webVitalSpans.js.map +1 -1
  25. package/build/esm/htmlTreeAsString.js.map +1 -1
  26. package/build/esm/index.js +2 -1
  27. package/build/esm/index.js.map +1 -1
  28. package/build/esm/metrics/browserMetrics.js +29 -94
  29. package/build/esm/metrics/browserMetrics.js.map +1 -1
  30. package/build/esm/metrics/inp.js +3 -57
  31. package/build/esm/metrics/inp.js.map +1 -1
  32. package/build/esm/metrics/lcp.js +1 -66
  33. package/build/esm/metrics/lcp.js.map +1 -1
  34. package/build/esm/metrics/userTiming.js +115 -0
  35. package/build/esm/metrics/userTiming.js.map +1 -0
  36. package/build/esm/metrics/utils.js +2 -44
  37. package/build/esm/metrics/utils.js.map +1 -1
  38. package/build/esm/metrics/web-vitals/lib/getVisibilityWatcher.js +2 -6
  39. package/build/esm/metrics/web-vitals/lib/getVisibilityWatcher.js.map +1 -1
  40. package/build/esm/metrics/web-vitals/lib/initUnique.js +1 -1
  41. package/build/esm/metrics/web-vitals/lib/initUnique.js.map +1 -1
  42. package/build/esm/metrics/web-vitals/lib/onHidden.js +3 -4
  43. package/build/esm/metrics/web-vitals/lib/onHidden.js.map +1 -1
  44. package/build/esm/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js.map +1 -1
  45. package/build/esm/metrics/web-vitals/lib/whenIdleOrHidden.js +0 -2
  46. package/build/esm/metrics/web-vitals/lib/whenIdleOrHidden.js.map +1 -1
  47. package/build/esm/metrics/webVitalSpans.js +26 -10
  48. package/build/esm/metrics/webVitalSpans.js.map +1 -1
  49. package/build/esm/package.json +1 -1
  50. package/build/types/index.d.ts +2 -1
  51. package/build/types/index.d.ts.map +1 -1
  52. package/build/types/metrics/browserMetrics.d.ts +5 -29
  53. package/build/types/metrics/browserMetrics.d.ts.map +1 -1
  54. package/build/types/metrics/inp.d.ts +0 -13
  55. package/build/types/metrics/inp.d.ts.map +1 -1
  56. package/build/types/metrics/lcp.d.ts +0 -16
  57. package/build/types/metrics/lcp.d.ts.map +1 -1
  58. package/build/types/metrics/userTiming.d.ts +37 -0
  59. package/build/types/metrics/userTiming.d.ts.map +1 -0
  60. package/build/types/metrics/utils.d.ts +1 -25
  61. package/build/types/metrics/utils.d.ts.map +1 -1
  62. package/build/types/metrics/web-vitals/getCLS.d.ts.map +1 -1
  63. package/build/types/metrics/web-vitals/getINP.d.ts.map +1 -1
  64. package/build/types/metrics/web-vitals/getLCP.d.ts.map +1 -1
  65. package/build/types/metrics/web-vitals/lib/InteractionManager.d.ts.map +1 -1
  66. package/build/types/metrics/web-vitals/lib/LCPEntryManager.d.ts.map +1 -1
  67. package/build/types/metrics/web-vitals/lib/LayoutShiftManager.d.ts.map +1 -1
  68. package/build/types/metrics/web-vitals/lib/bindReporter.d.ts +1 -1
  69. package/build/types/metrics/web-vitals/lib/bindReporter.d.ts.map +1 -1
  70. package/build/types/metrics/web-vitals/lib/getNavigationEntry.d.ts.map +1 -1
  71. package/build/types/metrics/web-vitals/lib/getVisibilityWatcher.d.ts.map +1 -1
  72. package/build/types/metrics/web-vitals/lib/initMetric.d.ts +3 -3
  73. package/build/types/metrics/web-vitals/lib/initMetric.d.ts.map +1 -1
  74. package/build/types/metrics/web-vitals/lib/observe.d.ts.map +1 -1
  75. package/build/types/metrics/web-vitals/lib/onHidden.d.ts +4 -16
  76. package/build/types/metrics/web-vitals/lib/onHidden.d.ts.map +1 -1
  77. package/build/types/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.d.ts +1 -1
  78. package/build/types/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.d.ts.map +1 -1
  79. package/build/types/metrics/web-vitals/lib/runOnce.d.ts.map +1 -1
  80. package/build/types/metrics/web-vitals/lib/whenActivated.d.ts.map +1 -1
  81. package/build/types/metrics/web-vitals/lib/whenIdleOrHidden.d.ts.map +1 -1
  82. package/build/types/metrics/web-vitals/onFCP.d.ts.map +1 -1
  83. package/build/types/metrics/web-vitals/onTTFB.d.ts.map +1 -1
  84. package/build/types/metrics/web-vitals/types.d.ts +1 -1
  85. package/build/types/metrics/web-vitals/types.d.ts.map +1 -1
  86. package/build/types/metrics/webVitalSpans.d.ts +15 -9
  87. package/build/types/metrics/webVitalSpans.d.ts.map +1 -1
  88. package/build/types/types.d.ts +1 -1
  89. package/package.json +6 -15
  90. package/build/cjs/metrics/cls.js +0 -64
  91. package/build/cjs/metrics/cls.js.map +0 -1
  92. package/build/esm/metrics/cls.js +0 -61
  93. package/build/esm/metrics/cls.js.map +0 -1
  94. package/build/types/metrics/cls.d.ts +0 -17
  95. package/build/types/metrics/cls.d.ts.map +0 -1
  96. package/build/types-ts3.8/debug-build.d.ts +0 -7
  97. package/build/types-ts3.8/getNativeImplementation.d.ts +0 -69
  98. package/build/types-ts3.8/htmlTreeAsString.d.ts +0 -11
  99. package/build/types-ts3.8/index.d.ts +0 -17
  100. package/build/types-ts3.8/instrument/dom.d.ts +0 -11
  101. package/build/types-ts3.8/instrument/history.d.ts +0 -15
  102. package/build/types-ts3.8/instrument/location.d.ts +0 -13
  103. package/build/types-ts3.8/instrument/xhr.d.ts +0 -14
  104. package/build/types-ts3.8/is.d.ts +0 -7
  105. package/build/types-ts3.8/metrics/browserMetrics.d.ts +0 -119
  106. package/build/types-ts3.8/metrics/cls.d.ts +0 -17
  107. package/build/types-ts3.8/metrics/elementTiming.d.ts +0 -21
  108. package/build/types-ts3.8/metrics/inp.d.ts +0 -35
  109. package/build/types-ts3.8/metrics/instrument.d.ts +0 -121
  110. package/build/types-ts3.8/metrics/lcp.d.ts +0 -22
  111. package/build/types-ts3.8/metrics/resourceTiming.d.ts +0 -13
  112. package/build/types-ts3.8/metrics/utils.d.ts +0 -73
  113. package/build/types-ts3.8/metrics/web-vitals/getCLS.d.ts +0 -26
  114. package/build/types-ts3.8/metrics/web-vitals/getINP.d.ts +0 -34
  115. package/build/types-ts3.8/metrics/web-vitals/getLCP.d.ts +0 -16
  116. package/build/types-ts3.8/metrics/web-vitals/lib/InteractionManager.d.ts +0 -37
  117. package/build/types-ts3.8/metrics/web-vitals/lib/LCPEntryManager.d.ts +0 -5
  118. package/build/types-ts3.8/metrics/web-vitals/lib/LayoutShiftManager.d.ts +0 -7
  119. package/build/types-ts3.8/metrics/web-vitals/lib/bindReporter.d.ts +0 -7
  120. package/build/types-ts3.8/metrics/web-vitals/lib/generateUniqueID.d.ts +0 -7
  121. package/build/types-ts3.8/metrics/web-vitals/lib/getActivationStart.d.ts +0 -2
  122. package/build/types-ts3.8/metrics/web-vitals/lib/getNavigationEntry.d.ts +0 -2
  123. package/build/types-ts3.8/metrics/web-vitals/lib/getVisibilityWatcher.d.ts +0 -5
  124. package/build/types-ts3.8/metrics/web-vitals/lib/globalListeners.d.ts +0 -11
  125. package/build/types-ts3.8/metrics/web-vitals/lib/initMetric.d.ts +0 -21
  126. package/build/types-ts3.8/metrics/web-vitals/lib/initUnique.d.ts +0 -7
  127. package/build/types-ts3.8/metrics/web-vitals/lib/observe.d.ts +0 -23
  128. package/build/types-ts3.8/metrics/web-vitals/lib/onHidden.d.ts +0 -27
  129. package/build/types-ts3.8/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.d.ts +0 -15
  130. package/build/types-ts3.8/metrics/web-vitals/lib/runOnce.d.ts +0 -2
  131. package/build/types-ts3.8/metrics/web-vitals/lib/whenActivated.d.ts +0 -2
  132. package/build/types-ts3.8/metrics/web-vitals/lib/whenIdleOrHidden.d.ts +0 -6
  133. package/build/types-ts3.8/metrics/web-vitals/onFCP.d.ts +0 -11
  134. package/build/types-ts3.8/metrics/web-vitals/onTTFB.d.ts +0 -20
  135. package/build/types-ts3.8/metrics/web-vitals/types/base.d.ts +0 -106
  136. package/build/types-ts3.8/metrics/web-vitals/types/cls.d.ts +0 -58
  137. package/build/types-ts3.8/metrics/web-vitals/types/fcp.d.ts +0 -47
  138. package/build/types-ts3.8/metrics/web-vitals/types/inp.d.ts +0 -150
  139. package/build/types-ts3.8/metrics/web-vitals/types/lcp.d.ts +0 -74
  140. package/build/types-ts3.8/metrics/web-vitals/types/ttfb.d.ts +0 -60
  141. package/build/types-ts3.8/metrics/web-vitals/types.d.ts +0 -78
  142. package/build/types-ts3.8/metrics/webVitalSpans.d.ts +0 -65
  143. package/build/types-ts3.8/networkUtils.d.ts +0 -28
  144. package/build/types-ts3.8/types.d.ts +0 -15
@@ -1,150 +0,0 @@
1
- import { AttributionReportOpts, LoadState, Metric, ReportOpts } from './base';
2
- export interface INPReportOpts extends ReportOpts {
3
- durationThreshold?: number;
4
- }
5
- export interface INPAttributionReportOpts extends AttributionReportOpts {
6
- durationThreshold?: number;
7
- }
8
- /**
9
- * An INP-specific version of the Metric object.
10
- */
11
- export interface INPMetric extends Metric {
12
- name: 'INP';
13
- entries: PerformanceEventTiming[];
14
- }
15
- export interface INPLongestScriptSummary {
16
- /**
17
- * The longest Long Animation Frame script entry that intersects the INP
18
- * interaction.
19
- */
20
- entry: PerformanceScriptTiming;
21
- /**
22
- * The INP subpart where the longest script ran.
23
- */
24
- subpart: 'input-delay' | 'processing-duration' | 'presentation-delay';
25
- /**
26
- * The amount of time the longest script intersected the INP duration.
27
- */
28
- intersectingDuration: number;
29
- }
30
- /**
31
- * An object containing potentially-helpful debugging information that
32
- * can be sent along with the INP value for the current page visit in order
33
- * to help identify issues happening to real-users in the field.
34
- */
35
- export interface INPAttribution {
36
- /**
37
- * By default, a selector identifying the element that the user first
38
- * interacted with as part of the frame where the INP candidate interaction
39
- * occurred. If this value is an empty string, that generally means the
40
- * element was removed from the DOM after the interaction. If the
41
- * `generateTarget` configuration option was passed, then this will instead
42
- * be the return value of that function, falling back to the default if that
43
- * returns null or undefined.
44
- */
45
- interactionTarget: string;
46
- /**
47
- * The time when the user first interacted during the frame where the INP
48
- * candidate interaction occurred (if more than one interaction occurred
49
- * within the frame, only the first time is reported).
50
- */
51
- interactionTime: DOMHighResTimeStamp;
52
- /**
53
- * The type of interaction, based on the event type of the `event` entry
54
- * that corresponds to the interaction (i.e. the first `event` entry
55
- * containing an `interactionId` dispatched in a given animation frame).
56
- * For "pointerdown", "pointerup", or "click" events this will be "pointer",
57
- * and for "keydown" or "keyup" events this will be "keyboard".
58
- */
59
- interactionType: 'pointer' | 'keyboard';
60
- /**
61
- * The best-guess timestamp of the next paint after the interaction.
62
- * In general, this timestamp is the same as the `startTime + duration` of
63
- * the event timing entry. However, since duration values are rounded to the
64
- * nearest 8ms (and can be rounded down), this value is clamped to always be
65
- * reported after the processing times.
66
- */
67
- nextPaintTime: DOMHighResTimeStamp;
68
- /**
69
- * An array of Event Timing entries that were processed within the same
70
- * animation frame as the INP candidate interaction.
71
- */
72
- processedEventEntries: PerformanceEventTiming[];
73
- /**
74
- * The time from when the user interacted with the page until when the
75
- * browser was first able to start processing event listeners for that
76
- * interaction. This time captures the delay before event processing can
77
- * begin due to the main thread being busy with other work.
78
- */
79
- inputDelay: number;
80
- /**
81
- * The time from when the first event listener started running in response to
82
- * the user interaction until when all event listener processing has finished.
83
- */
84
- processingDuration: number;
85
- /**
86
- * The time from when the browser finished processing all event listeners for
87
- * the user interaction until the next frame is presented on the screen and
88
- * visible to the user. This time includes work on the main thread (such as
89
- * `requestAnimationFrame()` callbacks, `ResizeObserver` and
90
- * `IntersectionObserver` callbacks, and style/layout calculation) as well
91
- * as off-main-thread work (such as compositor, GPU, and raster work).
92
- */
93
- presentationDelay: number;
94
- /**
95
- * The loading state of the document at the time when the interaction
96
- * corresponding to INP occurred (see `LoadState` for details). If the
97
- * interaction occurred while the document was loading and executing script
98
- * (e.g. usually in the `dom-interactive` phase) it can result in long delays.
99
- */
100
- loadState: LoadState;
101
- /**
102
- * If the browser supports the Long Animation Frame API, this array will
103
- * include any `long-animation-frame` entries that intersect with the INP
104
- * candidate interaction's `startTime` and the `processingEnd` time of the
105
- * last event processed within that animation frame. If the browser does not
106
- * support the Long Animation Frame API or no `long-animation-frame` entries
107
- * are detected, this array will be empty.
108
- */
109
- longAnimationFrameEntries: PerformanceLongAnimationFrameTiming[];
110
- /**
111
- * Summary information about the longest script entry intersecting the INP
112
- * duration. Note, only script entries above 5 milliseconds are reported by
113
- * the Long Animation Frame API.
114
- */
115
- longestScript?: INPLongestScriptSummary;
116
- /**
117
- * The total duration of Long Animation Frame scripts that intersect the INP
118
- * duration excluding any forced style and layout (that is included in
119
- * totalStyleAndLayout). Note, this is limited to scripts > 5 milliseconds.
120
- */
121
- totalScriptDuration?: number;
122
- /**
123
- * The total style and layout duration from any Long Animation Frames
124
- * intersecting the INP interaction. This includes any end-of-frame style and
125
- * layout duration + any forced style and layout duration.
126
- */
127
- totalStyleAndLayoutDuration?: number;
128
- /**
129
- * The off main-thread presentation delay from the end of the last Long
130
- * Animation Frame (where available) until the INP end point.
131
- */
132
- totalPaintDuration?: number;
133
- /**
134
- * The total unattributed time not included in any of the previous totals.
135
- * This includes scripts < 5 milliseconds and other timings not attributed
136
- * by Long Animation Frame (including when a frame is < 50ms and so has no
137
- * Long Animation Frame).
138
- * When no Long Animation Frames are present this will be undefined, rather
139
- * than everything being unattributed to make it clearer when it's expected
140
- * to be small.
141
- */
142
- totalUnattributedDuration?: number;
143
- }
144
- /**
145
- * An INP-specific version of the Metric object with attribution.
146
- */
147
- export interface INPMetricWithAttribution extends INPMetric {
148
- attribution: INPAttribution;
149
- }
150
- //# sourceMappingURL=inp.d.ts.map
@@ -1,74 +0,0 @@
1
- import { Metric } from './base.js';
2
- /**
3
- * An LCP-specific version of the Metric object.
4
- */
5
- export interface LCPMetric extends Metric {
6
- name: 'LCP';
7
- entries: LargestContentfulPaint[];
8
- }
9
- /**
10
- * An object containing potentially-helpful debugging information that
11
- * can be sent along with the LCP value for the current page visit in order
12
- * to help identify issues happening to real-users in the field.
13
- */
14
- export interface LCPAttribution {
15
- /**
16
- * By default, a selector identifying the element corresponding to the
17
- * largest contentful paint for the page. If the `generateTarget`
18
- * configuration option was passed, then this will instead be the return
19
- * value of that function, falling back to the default if that returns null
20
- * or undefined.
21
- */
22
- target?: string;
23
- /**
24
- * The URL (if applicable) of the LCP image resource. If the LCP element
25
- * is a text node, this value will not be set.
26
- */
27
- url?: string;
28
- /**
29
- * The time from when the user initiates loading the page until when the
30
- * browser receives the first byte of the response (a.k.a. TTFB). See
31
- * [Optimize LCP](https://web.dev/articles/optimize-lcp) for details.
32
- */
33
- timeToFirstByte: number;
34
- /**
35
- * The delta between TTFB and when the browser starts loading the LCP
36
- * resource (if there is one, otherwise 0). See [Optimize
37
- * LCP](https://web.dev/articles/optimize-lcp) for details.
38
- */
39
- resourceLoadDelay: number;
40
- /**
41
- * The total time it takes to load the LCP resource itself (if there is one,
42
- * otherwise 0). See [Optimize LCP](https://web.dev/articles/optimize-lcp) for
43
- * details.
44
- */
45
- resourceLoadDuration: number;
46
- /**
47
- * The delta between when the LCP resource finishes loading until the LCP
48
- * element is fully rendered. See [Optimize
49
- * LCP](https://web.dev/articles/optimize-lcp) for details.
50
- */
51
- elementRenderDelay: number;
52
- /**
53
- * The `navigation` entry of the current page, which is useful for diagnosing
54
- * general page load issues. This can be used to access `serverTiming` for example:
55
- * navigationEntry?.serverTiming
56
- */
57
- navigationEntry?: PerformanceNavigationTiming;
58
- /**
59
- * The `resource` entry for the LCP resource (if applicable), which is useful
60
- * for diagnosing resource load issues.
61
- */
62
- lcpResourceEntry?: PerformanceResourceTiming;
63
- /**
64
- * The `LargestContentfulPaint` entry corresponding to LCP.
65
- */
66
- lcpEntry?: LargestContentfulPaint;
67
- }
68
- /**
69
- * An LCP-specific version of the Metric object with attribution.
70
- */
71
- export interface LCPMetricWithAttribution extends LCPMetric {
72
- attribution: LCPAttribution;
73
- }
74
- //# sourceMappingURL=lcp.d.ts.map
@@ -1,60 +0,0 @@
1
- import { Metric } from './base';
2
- /**
3
- * A TTFB-specific version of the Metric object.
4
- */
5
- export interface TTFBMetric extends Metric {
6
- name: 'TTFB';
7
- entries: PerformanceNavigationTiming[];
8
- }
9
- /**
10
- * An object containing potentially-helpful debugging information that
11
- * can be sent along with the TTFB value for the current page visit in order
12
- * to help identify issues happening to real-users in the field.
13
- *
14
- * NOTE: these values are primarily useful for page loads not handled via
15
- * service worker, as browsers differ in what they report when service worker
16
- * is involved, see: https://github.com/w3c/navigation-timing/issues/199
17
- */
18
- export interface TTFBAttribution {
19
- /**
20
- * The total time from when the user initiates loading the page to when the
21
- * page starts to handle the request. Large values here are typically due
22
- * to HTTP redirects, though other browser processing contributes to this
23
- * duration as well (so even without redirect it's generally not zero).
24
- */
25
- waitingDuration: number;
26
- /**
27
- * The total time spent checking the HTTP cache for a match. For navigations
28
- * handled via service worker, this duration usually includes service worker
29
- * start-up time as well as time processing `fetch` event listeners, with
30
- * some exceptions, see: https://github.com/w3c/navigation-timing/issues/199
31
- */
32
- cacheDuration: number;
33
- /**
34
- * The total time to resolve the DNS for the requested domain.
35
- */
36
- dnsDuration: number;
37
- /**
38
- * The total time to create the connection to the requested domain.
39
- */
40
- connectionDuration: number;
41
- /**
42
- * The total time from when the request was sent until the first byte of the
43
- * response was received. This includes network time as well as server
44
- * processing time.
45
- */
46
- requestDuration: number;
47
- /**
48
- * The `navigation` entry of the current page, which is useful for diagnosing
49
- * general page load issues. This can be used to access `serverTiming` for
50
- * example: navigationEntry?.serverTiming
51
- */
52
- navigationEntry?: PerformanceNavigationTiming;
53
- }
54
- /**
55
- * A TTFB-specific version of the Metric object with attribution.
56
- */
57
- export interface TTFBMetricWithAttribution extends TTFBMetric {
58
- attribution: TTFBAttribution;
59
- }
60
- //# sourceMappingURL=ttfb.d.ts.map
@@ -1,78 +0,0 @@
1
- export * from './types/base';
2
- export * from './types/cls';
3
- export * from './types/fcp';
4
- export * from './types/inp';
5
- export * from './types/lcp';
6
- export * from './types/ttfb';
7
- interface PerformanceEntryMap {
8
- navigation: PerformanceNavigationTiming;
9
- resource: PerformanceResourceTiming;
10
- paint: PerformancePaintTiming;
11
- }
12
- declare global {
13
- interface Document {
14
- prerendering?: boolean;
15
- wasDiscarded?: boolean;
16
- }
17
- interface Performance {
18
- getEntriesByType<K extends keyof PerformanceEntryMap>(type: K): PerformanceEntryMap[K][];
19
- }
20
- interface PerformanceObserverInit {
21
- durationThreshold?: number;
22
- }
23
- interface PerformanceNavigationTiming {
24
- activationStart?: number;
25
- }
26
- interface PerformanceEventTiming extends PerformanceEntry {
27
- duration: DOMHighResTimeStamp;
28
- interactionId: number;
29
- }
30
- interface LayoutShiftAttribution {
31
- node: Node | null;
32
- previousRect: DOMRectReadOnly;
33
- currentRect: DOMRectReadOnly;
34
- }
35
- interface LayoutShift extends PerformanceEntry {
36
- value: number;
37
- sources: LayoutShiftAttribution[];
38
- hadRecentInput: boolean;
39
- }
40
- interface LargestContentfulPaint extends PerformanceEntry {
41
- readonly renderTime: DOMHighResTimeStamp;
42
- readonly loadTime: DOMHighResTimeStamp;
43
- readonly size: number;
44
- readonly id: string;
45
- readonly url: string;
46
- readonly element: Element | null;
47
- }
48
- export type ScriptInvokerType = 'classic-script' | 'module-script' | 'event-listener' | 'user-callback' | 'resolve-promise' | 'reject-promise';
49
- export type ScriptWindowAttribution = 'self' | 'descendant' | 'ancestor' | 'same-page' | 'other';
50
- interface PerformanceScriptTiming extends PerformanceEntry {
51
- readonly startTime: DOMHighResTimeStamp;
52
- readonly duration: DOMHighResTimeStamp;
53
- readonly name: string;
54
- readonly entryType: string;
55
- readonly invokerType: ScriptInvokerType;
56
- readonly invoker: string;
57
- readonly executionStart: DOMHighResTimeStamp;
58
- readonly sourceURL: string;
59
- readonly sourceFunctionName: string;
60
- readonly sourceCharPosition: number;
61
- readonly pauseDuration: DOMHighResTimeStamp;
62
- readonly forcedStyleAndLayoutDuration: DOMHighResTimeStamp;
63
- readonly window?: Window;
64
- readonly windowAttribution: ScriptWindowAttribution;
65
- }
66
- interface PerformanceLongAnimationFrameTiming extends PerformanceEntry {
67
- readonly startTime: DOMHighResTimeStamp;
68
- readonly duration: DOMHighResTimeStamp;
69
- readonly name: string;
70
- readonly entryType: string;
71
- readonly renderStart: DOMHighResTimeStamp;
72
- readonly styleAndLayoutStart: DOMHighResTimeStamp;
73
- readonly blockingDuration: DOMHighResTimeStamp;
74
- readonly firstUIEventTimestamp: DOMHighResTimeStamp;
75
- readonly scripts: PerformanceScriptTiming[];
76
- }
77
- }
78
- //# sourceMappingURL=types.d.ts.map
@@ -1,65 +0,0 @@
1
- import { Client, Span, SpanAttributes } from '@sentry/core';
2
- import { WebVitalReportEvent } from './utils';
3
- import { PerformanceEventTiming } from './instrument';
4
- export interface LayoutShift extends PerformanceEntry {
5
- value: number;
6
- sources: Array<{
7
- node: Node | null;
8
- }>;
9
- hadRecentInput: boolean;
10
- }
11
- export interface LargestContentfulPaint extends PerformanceEntry {
12
- readonly renderTime: DOMHighResTimeStamp;
13
- readonly loadTime: DOMHighResTimeStamp;
14
- readonly size: number;
15
- readonly id: string;
16
- readonly url: string;
17
- readonly element: Element | null;
18
- }
19
- interface WebVitalSpanOptions {
20
- name: string;
21
- op: string;
22
- origin: string;
23
- metricName: 'lcp' | 'cls' | 'inp';
24
- value: number;
25
- attributes?: SpanAttributes;
26
- parentSpan?: Span;
27
- reportEvent?: WebVitalReportEvent;
28
- startTime: number;
29
- endTime?: number;
30
- }
31
- /**
32
- * Emits a web vital span that flows through the span streaming pipeline.
33
- */
34
- export declare function _emitWebVitalSpan(options: WebVitalSpanOptions): void;
35
- /**
36
- * Tracks LCP as a streamed span.
37
- */
38
- export declare function trackLcpAsSpan(client: Client): void;
39
- /**
40
- * Exported only for testing.
41
- */
42
- export declare function _sendLcpSpan(lcpValue: number, entry: LargestContentfulPaint | undefined, pageloadSpan?: Span, reportEvent?: WebVitalReportEvent): void;
43
- /**
44
- * Tracks CLS as a streamed span.
45
- */
46
- export declare function trackClsAsSpan(client: Client): void;
47
- /**
48
- * Exported only for testing.
49
- */
50
- export declare function _sendClsSpan(clsValue: number, entry: LayoutShift | undefined, pageloadSpan?: Span, reportEvent?: WebVitalReportEvent): void;
51
- /**
52
- * Tracks INP as a streamed span.
53
- *
54
- * This mirrors the standalone INP tracking logic (`startTrackingINP`) but emits
55
- * spans through the streaming pipeline instead of as standalone spans.
56
- * Requires `registerInpInteractionListener()` to be called separately for
57
- * cached element names and root spans per interaction.
58
- */
59
- export declare function trackInpAsSpan(): void;
60
- /**
61
- * Exported only for testing.
62
- */
63
- export declare function _sendInpSpan(inpValue: number, entry: PerformanceEventTiming): void;
64
- export {};
65
- //# sourceMappingURL=webVitalSpans.d.ts.map
@@ -1,28 +0,0 @@
1
- import { debug } from '@sentry/core';
2
- import { NetworkMetaWarning } from './types';
3
- export declare const ORIGINAL_REQ_BODY: unique symbol;
4
- /**
5
- * Serializes FormData.
6
- *
7
- * This is a bit simplified, but gives us a decent estimate.
8
- * This converts e.g. { name: 'Anne Smith', age: 13 } to 'name=Anne+Smith&age=13'.
9
- *
10
- */
11
- export declare function serializeFormData(formData: FormData): string;
12
- /** Get the string representation of a body. */
13
- export declare function getBodyString(body: unknown, _debug?: typeof debug): [
14
- string | undefined,
15
- NetworkMetaWarning?
16
- ];
17
- /**
18
- * Parses the fetch arguments to extract the request payload.
19
- *
20
- * In case of a Request object, this function attempts to retrieve the original body by looking for a Sentry-patched symbol.
21
- */
22
- export declare function getFetchRequestArgBody(fetchArgs?: unknown[]): RequestInit['body'] | undefined;
23
- /**
24
- * Parses XMLHttpRequest response headers into a Record.
25
- * Extracted from replay internals to be reusable.
26
- */
27
- export declare function parseXhrResponseHeaders(xhr: XMLHttpRequest): Record<string, string>;
28
- //# sourceMappingURL=networkUtils.d.ts.map
@@ -1,15 +0,0 @@
1
- import { FetchBreadcrumbHint, HandlerDataFetch, SentryWrappedXMLHttpRequest, XhrBreadcrumbHint } from '@sentry/core';
2
- import { GLOBAL_OBJ } from '@sentry/core';
3
- export declare const WINDOW: typeof GLOBAL_OBJ & Pick<Window, Exclude<keyof Window, "document">> & Partial<Pick<Window, "document">>;
4
- export type NetworkMetaWarning = 'MAYBE_JSON_TRUNCATED' | 'TEXT_TRUNCATED' | 'URL_SKIPPED' | 'BODY_PARSE_ERROR' | 'BODY_PARSE_TIMEOUT' | 'UNPARSEABLE_BODY_TYPE';
5
- type RequestBody = null | Blob | BufferSource | FormData | URLSearchParams | string;
6
- export type XhrHint = XhrBreadcrumbHint & {
7
- xhr: XMLHttpRequest & SentryWrappedXMLHttpRequest;
8
- input?: RequestBody;
9
- };
10
- export type FetchHint = FetchBreadcrumbHint & {
11
- input: HandlerDataFetch['args'];
12
- response: Response;
13
- };
14
- export {};
15
- //# sourceMappingURL=types.d.ts.map