@sentry/browser-utils 10.70.0 → 11.0.0-alpha.1
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.
- package/build/cjs/htmlTreeAsString.js.map +1 -1
- package/build/cjs/index.js +30 -28
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/instrumentation/dom.js.map +1 -0
- package/build/cjs/instrumentation/history.js.map +1 -0
- package/build/cjs/instrumentation/location.js.map +1 -0
- package/build/cjs/{metrics/instrument.js → instrumentation/performanceObserver.js} +44 -32
- package/build/cjs/instrumentation/performanceObserver.js.map +1 -0
- package/build/cjs/instrumentation/xhr.js.map +1 -0
- package/build/cjs/{metrics → performance}/elementTiming.js +2 -2
- package/build/cjs/performance/elementTiming.js.map +1 -0
- package/build/cjs/{metrics/browserMetrics.js → performance/entries.js} +43 -262
- package/build/cjs/performance/entries.js.map +1 -0
- package/build/cjs/performance/resourceTiming.js.map +1 -0
- package/build/cjs/performance/userTiming.js +119 -0
- package/build/cjs/performance/userTiming.js.map +1 -0
- package/build/cjs/performance/utils.js +68 -0
- package/build/cjs/performance/utils.js.map +1 -0
- package/build/cjs/{metrics → web-vitals}/inp.js +4 -61
- package/build/cjs/web-vitals/inp.js.map +1 -0
- package/build/cjs/web-vitals/lcp.js +10 -0
- package/build/cjs/web-vitals/lcp.js.map +1 -0
- package/build/cjs/web-vitals/reportEvents.js +31 -0
- package/build/cjs/web-vitals/reportEvents.js.map +1 -0
- package/build/cjs/{metrics/webVitalSpans.js → web-vitals/spans.js} +36 -19
- package/build/cjs/web-vitals/spans.js.map +1 -0
- package/build/cjs/web-vitals/tracking.js +164 -0
- package/build/cjs/web-vitals/tracking.js.map +1 -0
- package/build/cjs/web-vitals/utils.js +99 -0
- package/build/cjs/web-vitals/utils.js.map +1 -0
- package/build/esm/htmlTreeAsString.js.map +1 -1
- package/build/esm/index.js +14 -12
- package/build/esm/index.js.map +1 -1
- package/build/esm/instrumentation/dom.js.map +1 -0
- package/build/esm/instrumentation/history.js.map +1 -0
- package/build/esm/instrumentation/location.js.map +1 -0
- package/build/esm/{metrics/instrument.js → instrumentation/performanceObserver.js} +42 -30
- package/build/esm/instrumentation/performanceObserver.js.map +1 -0
- package/build/esm/instrumentation/xhr.js.map +1 -0
- package/build/esm/package.json +1 -1
- package/build/esm/{metrics → performance}/elementTiming.js +1 -1
- package/build/esm/performance/elementTiming.js.map +1 -0
- package/build/esm/{metrics/browserMetrics.js → performance/entries.js} +36 -252
- package/build/esm/performance/entries.js.map +1 -0
- package/build/esm/performance/resourceTiming.js.map +1 -0
- package/build/esm/performance/userTiming.js +116 -0
- package/build/esm/performance/userTiming.js.map +1 -0
- package/build/esm/performance/utils.js +61 -0
- package/build/esm/performance/utils.js.map +1 -0
- package/build/esm/{metrics → web-vitals}/inp.js +3 -57
- package/build/esm/web-vitals/inp.js.map +1 -0
- package/build/esm/web-vitals/lcp.js +7 -0
- package/build/esm/web-vitals/lcp.js.map +1 -0
- package/build/esm/web-vitals/reportEvents.js +29 -0
- package/build/esm/web-vitals/reportEvents.js.map +1 -0
- package/build/esm/{metrics/webVitalSpans.js → web-vitals/spans.js} +32 -15
- package/build/esm/web-vitals/spans.js.map +1 -0
- package/build/esm/web-vitals/tracking.js +161 -0
- package/build/esm/web-vitals/tracking.js.map +1 -0
- package/build/esm/web-vitals/utils.js +91 -0
- package/build/esm/web-vitals/utils.js.map +1 -0
- package/build/types/index.d.ts +13 -11
- package/build/types/index.d.ts.map +1 -1
- package/build/types/instrumentation/dom.d.ts.map +1 -0
- package/build/types/instrumentation/history.d.ts.map +1 -0
- package/build/types/instrumentation/location.d.ts.map +1 -0
- package/build/types/{metrics/instrument.d.ts → instrumentation/performanceObserver.d.ts} +3 -3
- package/build/types/instrumentation/performanceObserver.d.ts.map +1 -0
- package/build/types/instrumentation/xhr.d.ts.map +1 -0
- package/build/types/performance/elementTiming.d.ts.map +1 -0
- package/build/types/performance/entries.d.ts +49 -0
- package/build/types/performance/entries.d.ts.map +1 -0
- package/build/types/performance/resourceTiming.d.ts.map +1 -0
- package/build/types/performance/userTiming.d.ts +37 -0
- package/build/types/performance/userTiming.d.ts.map +1 -0
- package/build/types/performance/utils.d.ts +33 -0
- package/build/types/performance/utils.d.ts.map +1 -0
- package/build/types/types.d.ts +1 -1
- package/build/types/{metrics → web-vitals}/inp.d.ts +0 -13
- package/build/types/web-vitals/inp.d.ts.map +1 -0
- package/build/types/web-vitals/lcp.d.ts +6 -0
- package/build/types/web-vitals/lcp.d.ts.map +1 -0
- package/build/types/web-vitals/reportEvents.d.ts +18 -0
- package/build/types/web-vitals/reportEvents.d.ts.map +1 -0
- package/build/types/{metrics/webVitalSpans.d.ts → web-vitals/spans.d.ts} +18 -12
- package/build/types/web-vitals/spans.d.ts.map +1 -0
- package/build/types/web-vitals/tracking.d.ts +46 -0
- package/build/types/web-vitals/tracking.d.ts.map +1 -0
- package/build/types/{metrics/web-vitals/lib/globalListeners.d.ts → web-vitals/utils.d.ts} +16 -1
- package/build/types/web-vitals/utils.d.ts.map +1 -0
- package/package.json +8 -16
- package/build/cjs/instrument/dom.js.map +0 -1
- package/build/cjs/instrument/history.js.map +0 -1
- package/build/cjs/instrument/location.js.map +0 -1
- package/build/cjs/instrument/xhr.js.map +0 -1
- package/build/cjs/metrics/browserMetrics.js.map +0 -1
- package/build/cjs/metrics/cls.js +0 -64
- package/build/cjs/metrics/cls.js.map +0 -1
- package/build/cjs/metrics/elementTiming.js.map +0 -1
- package/build/cjs/metrics/inp.js.map +0 -1
- package/build/cjs/metrics/instrument.js.map +0 -1
- package/build/cjs/metrics/lcp.js +0 -77
- package/build/cjs/metrics/lcp.js.map +0 -1
- package/build/cjs/metrics/resourceTiming.js.map +0 -1
- package/build/cjs/metrics/utils.js +0 -137
- package/build/cjs/metrics/utils.js.map +0 -1
- package/build/cjs/metrics/web-vitals/getCLS.js +0 -46
- package/build/cjs/metrics/web-vitals/getCLS.js.map +0 -1
- package/build/cjs/metrics/web-vitals/getINP.js +0 -60
- package/build/cjs/metrics/web-vitals/getINP.js.map +0 -1
- package/build/cjs/metrics/web-vitals/getLCP.js +0 -62
- package/build/cjs/metrics/web-vitals/getLCP.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/InteractionManager.js +0 -87
- package/build/cjs/metrics/web-vitals/lib/InteractionManager.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/LCPEntryManager.js +0 -11
- package/build/cjs/metrics/web-vitals/lib/LCPEntryManager.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/LayoutShiftManager.js +0 -27
- package/build/cjs/metrics/web-vitals/lib/LayoutShiftManager.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/bindReporter.js +0 -31
- package/build/cjs/metrics/web-vitals/lib/bindReporter.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/generateUniqueID.js +0 -8
- package/build/cjs/metrics/web-vitals/lib/generateUniqueID.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/getActivationStart.js +0 -11
- package/build/cjs/metrics/web-vitals/lib/getActivationStart.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/getNavigationEntry.js +0 -17
- package/build/cjs/metrics/web-vitals/lib/getNavigationEntry.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/getVisibilityWatcher.js +0 -48
- package/build/cjs/metrics/web-vitals/lib/getVisibilityWatcher.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/globalListeners.js +0 -18
- package/build/cjs/metrics/web-vitals/lib/globalListeners.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/initMetric.js +0 -34
- package/build/cjs/metrics/web-vitals/lib/initMetric.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/initUnique.js +0 -16
- package/build/cjs/metrics/web-vitals/lib/initUnique.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/observe.js +0 -20
- package/build/cjs/metrics/web-vitals/lib/observe.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/onHidden.js +0 -17
- package/build/cjs/metrics/web-vitals/lib/onHidden.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js +0 -32
- package/build/cjs/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/runOnce.js +0 -14
- package/build/cjs/metrics/web-vitals/lib/runOnce.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/whenActivated.js +0 -14
- package/build/cjs/metrics/web-vitals/lib/whenActivated.js.map +0 -1
- package/build/cjs/metrics/web-vitals/lib/whenIdleOrHidden.js +0 -24
- package/build/cjs/metrics/web-vitals/lib/whenIdleOrHidden.js.map +0 -1
- package/build/cjs/metrics/web-vitals/onFCP.js +0 -37
- package/build/cjs/metrics/web-vitals/onFCP.js.map +0 -1
- package/build/cjs/metrics/web-vitals/onTTFB.js +0 -35
- package/build/cjs/metrics/web-vitals/onTTFB.js.map +0 -1
- package/build/cjs/metrics/webVitalSpans.js.map +0 -1
- package/build/esm/instrument/dom.js.map +0 -1
- package/build/esm/instrument/history.js.map +0 -1
- package/build/esm/instrument/location.js.map +0 -1
- package/build/esm/instrument/xhr.js.map +0 -1
- package/build/esm/metrics/browserMetrics.js.map +0 -1
- package/build/esm/metrics/cls.js +0 -61
- package/build/esm/metrics/cls.js.map +0 -1
- package/build/esm/metrics/elementTiming.js.map +0 -1
- package/build/esm/metrics/inp.js.map +0 -1
- package/build/esm/metrics/instrument.js.map +0 -1
- package/build/esm/metrics/lcp.js +0 -72
- package/build/esm/metrics/lcp.js.map +0 -1
- package/build/esm/metrics/resourceTiming.js.map +0 -1
- package/build/esm/metrics/utils.js +0 -128
- package/build/esm/metrics/utils.js.map +0 -1
- package/build/esm/metrics/web-vitals/getCLS.js +0 -43
- package/build/esm/metrics/web-vitals/getCLS.js.map +0 -1
- package/build/esm/metrics/web-vitals/getINP.js +0 -57
- package/build/esm/metrics/web-vitals/getINP.js.map +0 -1
- package/build/esm/metrics/web-vitals/getLCP.js +0 -59
- package/build/esm/metrics/web-vitals/getLCP.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/InteractionManager.js +0 -85
- package/build/esm/metrics/web-vitals/lib/InteractionManager.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/LCPEntryManager.js +0 -9
- package/build/esm/metrics/web-vitals/lib/LCPEntryManager.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/LayoutShiftManager.js +0 -25
- package/build/esm/metrics/web-vitals/lib/LayoutShiftManager.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/bindReporter.js +0 -29
- package/build/esm/metrics/web-vitals/lib/bindReporter.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/generateUniqueID.js +0 -6
- package/build/esm/metrics/web-vitals/lib/generateUniqueID.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/getActivationStart.js +0 -9
- package/build/esm/metrics/web-vitals/lib/getActivationStart.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/getNavigationEntry.js +0 -15
- package/build/esm/metrics/web-vitals/lib/getNavigationEntry.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/getVisibilityWatcher.js +0 -46
- package/build/esm/metrics/web-vitals/lib/getVisibilityWatcher.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/globalListeners.js +0 -15
- package/build/esm/metrics/web-vitals/lib/globalListeners.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/initMetric.js +0 -32
- package/build/esm/metrics/web-vitals/lib/initMetric.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/initUnique.js +0 -14
- package/build/esm/metrics/web-vitals/lib/initUnique.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/observe.js +0 -18
- package/build/esm/metrics/web-vitals/lib/observe.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/onHidden.js +0 -15
- package/build/esm/metrics/web-vitals/lib/onHidden.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js +0 -29
- package/build/esm/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/runOnce.js +0 -12
- package/build/esm/metrics/web-vitals/lib/runOnce.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/whenActivated.js +0 -12
- package/build/esm/metrics/web-vitals/lib/whenActivated.js.map +0 -1
- package/build/esm/metrics/web-vitals/lib/whenIdleOrHidden.js +0 -22
- package/build/esm/metrics/web-vitals/lib/whenIdleOrHidden.js.map +0 -1
- package/build/esm/metrics/web-vitals/onFCP.js +0 -34
- package/build/esm/metrics/web-vitals/onFCP.js.map +0 -1
- package/build/esm/metrics/web-vitals/onTTFB.js +0 -32
- package/build/esm/metrics/web-vitals/onTTFB.js.map +0 -1
- package/build/esm/metrics/webVitalSpans.js.map +0 -1
- package/build/types/instrument/dom.d.ts.map +0 -1
- package/build/types/instrument/history.d.ts.map +0 -1
- package/build/types/instrument/location.d.ts.map +0 -1
- package/build/types/instrument/xhr.d.ts.map +0 -1
- package/build/types/metrics/browserMetrics.d.ts +0 -116
- package/build/types/metrics/browserMetrics.d.ts.map +0 -1
- package/build/types/metrics/cls.d.ts +0 -17
- package/build/types/metrics/cls.d.ts.map +0 -1
- package/build/types/metrics/elementTiming.d.ts.map +0 -1
- package/build/types/metrics/inp.d.ts.map +0 -1
- package/build/types/metrics/instrument.d.ts.map +0 -1
- package/build/types/metrics/lcp.d.ts +0 -22
- package/build/types/metrics/lcp.d.ts.map +0 -1
- package/build/types/metrics/resourceTiming.d.ts.map +0 -1
- package/build/types/metrics/utils.d.ts +0 -73
- package/build/types/metrics/utils.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/getCLS.d.ts +0 -26
- package/build/types/metrics/web-vitals/getCLS.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/getINP.d.ts +0 -34
- package/build/types/metrics/web-vitals/getINP.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/getLCP.d.ts +0 -16
- package/build/types/metrics/web-vitals/getLCP.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/InteractionManager.d.ts +0 -37
- package/build/types/metrics/web-vitals/lib/InteractionManager.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/LCPEntryManager.d.ts +0 -5
- package/build/types/metrics/web-vitals/lib/LCPEntryManager.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/LayoutShiftManager.d.ts +0 -7
- package/build/types/metrics/web-vitals/lib/LayoutShiftManager.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/bindReporter.d.ts +0 -7
- package/build/types/metrics/web-vitals/lib/bindReporter.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/generateUniqueID.d.ts +0 -7
- package/build/types/metrics/web-vitals/lib/generateUniqueID.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/getActivationStart.d.ts +0 -2
- package/build/types/metrics/web-vitals/lib/getActivationStart.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/getNavigationEntry.d.ts +0 -2
- package/build/types/metrics/web-vitals/lib/getNavigationEntry.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/getVisibilityWatcher.d.ts +0 -5
- package/build/types/metrics/web-vitals/lib/getVisibilityWatcher.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/globalListeners.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/initMetric.d.ts +0 -21
- package/build/types/metrics/web-vitals/lib/initMetric.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/initUnique.d.ts +0 -7
- package/build/types/metrics/web-vitals/lib/initUnique.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/observe.d.ts +0 -23
- package/build/types/metrics/web-vitals/lib/observe.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/onHidden.d.ts +0 -27
- package/build/types/metrics/web-vitals/lib/onHidden.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.d.ts +0 -15
- package/build/types/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/runOnce.d.ts +0 -2
- package/build/types/metrics/web-vitals/lib/runOnce.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/whenActivated.d.ts +0 -2
- package/build/types/metrics/web-vitals/lib/whenActivated.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/lib/whenIdleOrHidden.d.ts +0 -6
- package/build/types/metrics/web-vitals/lib/whenIdleOrHidden.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/onFCP.d.ts +0 -11
- package/build/types/metrics/web-vitals/onFCP.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/onTTFB.d.ts +0 -20
- package/build/types/metrics/web-vitals/onTTFB.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types/base.d.ts +0 -103
- package/build/types/metrics/web-vitals/types/base.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types/cls.d.ts +0 -58
- package/build/types/metrics/web-vitals/types/cls.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types/fcp.d.ts +0 -47
- package/build/types/metrics/web-vitals/types/fcp.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types/inp.d.ts +0 -150
- package/build/types/metrics/web-vitals/types/inp.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types/lcp.d.ts +0 -74
- package/build/types/metrics/web-vitals/types/lcp.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types/ttfb.d.ts +0 -60
- package/build/types/metrics/web-vitals/types/ttfb.d.ts.map +0 -1
- package/build/types/metrics/web-vitals/types.d.ts +0 -78
- package/build/types/metrics/web-vitals/types.d.ts.map +0 -1
- package/build/types/metrics/webVitalSpans.d.ts.map +0 -1
- package/build/types-ts3.8/debug-build.d.ts +0 -7
- package/build/types-ts3.8/getNativeImplementation.d.ts +0 -69
- package/build/types-ts3.8/htmlTreeAsString.d.ts +0 -11
- package/build/types-ts3.8/index.d.ts +0 -17
- package/build/types-ts3.8/instrument/dom.d.ts +0 -11
- package/build/types-ts3.8/instrument/history.d.ts +0 -15
- package/build/types-ts3.8/instrument/location.d.ts +0 -13
- package/build/types-ts3.8/instrument/xhr.d.ts +0 -14
- package/build/types-ts3.8/is.d.ts +0 -7
- package/build/types-ts3.8/metrics/browserMetrics.d.ts +0 -119
- package/build/types-ts3.8/metrics/cls.d.ts +0 -17
- package/build/types-ts3.8/metrics/elementTiming.d.ts +0 -21
- package/build/types-ts3.8/metrics/inp.d.ts +0 -35
- package/build/types-ts3.8/metrics/instrument.d.ts +0 -121
- package/build/types-ts3.8/metrics/lcp.d.ts +0 -22
- package/build/types-ts3.8/metrics/resourceTiming.d.ts +0 -13
- package/build/types-ts3.8/metrics/utils.d.ts +0 -73
- package/build/types-ts3.8/metrics/web-vitals/getCLS.d.ts +0 -26
- package/build/types-ts3.8/metrics/web-vitals/getINP.d.ts +0 -34
- package/build/types-ts3.8/metrics/web-vitals/getLCP.d.ts +0 -16
- package/build/types-ts3.8/metrics/web-vitals/lib/InteractionManager.d.ts +0 -37
- package/build/types-ts3.8/metrics/web-vitals/lib/LCPEntryManager.d.ts +0 -5
- package/build/types-ts3.8/metrics/web-vitals/lib/LayoutShiftManager.d.ts +0 -7
- package/build/types-ts3.8/metrics/web-vitals/lib/bindReporter.d.ts +0 -7
- package/build/types-ts3.8/metrics/web-vitals/lib/generateUniqueID.d.ts +0 -7
- package/build/types-ts3.8/metrics/web-vitals/lib/getActivationStart.d.ts +0 -2
- package/build/types-ts3.8/metrics/web-vitals/lib/getNavigationEntry.d.ts +0 -2
- package/build/types-ts3.8/metrics/web-vitals/lib/getVisibilityWatcher.d.ts +0 -5
- package/build/types-ts3.8/metrics/web-vitals/lib/globalListeners.d.ts +0 -11
- package/build/types-ts3.8/metrics/web-vitals/lib/initMetric.d.ts +0 -21
- package/build/types-ts3.8/metrics/web-vitals/lib/initUnique.d.ts +0 -7
- package/build/types-ts3.8/metrics/web-vitals/lib/observe.d.ts +0 -23
- package/build/types-ts3.8/metrics/web-vitals/lib/onHidden.d.ts +0 -27
- package/build/types-ts3.8/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.d.ts +0 -15
- package/build/types-ts3.8/metrics/web-vitals/lib/runOnce.d.ts +0 -2
- package/build/types-ts3.8/metrics/web-vitals/lib/whenActivated.d.ts +0 -2
- package/build/types-ts3.8/metrics/web-vitals/lib/whenIdleOrHidden.d.ts +0 -6
- package/build/types-ts3.8/metrics/web-vitals/onFCP.d.ts +0 -11
- package/build/types-ts3.8/metrics/web-vitals/onTTFB.d.ts +0 -20
- package/build/types-ts3.8/metrics/web-vitals/types/base.d.ts +0 -106
- package/build/types-ts3.8/metrics/web-vitals/types/cls.d.ts +0 -58
- package/build/types-ts3.8/metrics/web-vitals/types/fcp.d.ts +0 -47
- package/build/types-ts3.8/metrics/web-vitals/types/inp.d.ts +0 -150
- package/build/types-ts3.8/metrics/web-vitals/types/lcp.d.ts +0 -74
- package/build/types-ts3.8/metrics/web-vitals/types/ttfb.d.ts +0 -60
- package/build/types-ts3.8/metrics/web-vitals/types.d.ts +0 -78
- package/build/types-ts3.8/metrics/webVitalSpans.d.ts +0 -65
- package/build/types-ts3.8/networkUtils.d.ts +0 -28
- package/build/types-ts3.8/types.d.ts +0 -15
- /package/build/cjs/{instrument → instrumentation}/dom.js +0 -0
- /package/build/cjs/{instrument → instrumentation}/history.js +0 -0
- /package/build/cjs/{instrument → instrumentation}/location.js +0 -0
- /package/build/cjs/{instrument → instrumentation}/xhr.js +0 -0
- /package/build/cjs/{metrics → performance}/resourceTiming.js +0 -0
- /package/build/esm/{instrument → instrumentation}/dom.js +0 -0
- /package/build/esm/{instrument → instrumentation}/history.js +0 -0
- /package/build/esm/{instrument → instrumentation}/location.js +0 -0
- /package/build/esm/{instrument → instrumentation}/xhr.js +0 -0
- /package/build/esm/{metrics → performance}/resourceTiming.js +0 -0
- /package/build/types/{instrument → instrumentation}/dom.d.ts +0 -0
- /package/build/types/{instrument → instrumentation}/history.d.ts +0 -0
- /package/build/types/{instrument → instrumentation}/location.d.ts +0 -0
- /package/build/types/{instrument → instrumentation}/xhr.d.ts +0 -0
- /package/build/types/{metrics → performance}/elementTiming.d.ts +0 -0
- /package/build/types/{metrics → performance}/resourceTiming.d.ts +0 -0
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { Client, Span, SpanAttributes } from '@sentry/core';
|
|
2
|
-
interface StartTrackingWebVitalsOptions {
|
|
3
|
-
/**
|
|
4
|
-
* When `true`, CLS is tracked as a standalone span. When `false`, CLS is
|
|
5
|
-
* recorded as a measurement on the pageload span. When `undefined`, CLS
|
|
6
|
-
* tracking is skipped entirely (e.g. because span streaming handles it).
|
|
7
|
-
*/
|
|
8
|
-
recordClsStandaloneSpans: boolean | undefined;
|
|
9
|
-
/**
|
|
10
|
-
* When `true`, LCP is tracked as a standalone span. When `false`, LCP is
|
|
11
|
-
* recorded as a measurement on the pageload span. When `undefined`, LCP
|
|
12
|
-
* tracking is skipped entirely (e.g. because span streaming handles it).
|
|
13
|
-
*/
|
|
14
|
-
recordLcpStandaloneSpans: boolean | undefined;
|
|
15
|
-
client: Client;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Start tracking web vitals.
|
|
19
|
-
* The callback returned by this function can be used to stop tracking & ensure all measurements are final & captured.
|
|
20
|
-
*
|
|
21
|
-
* @deprecated this function will be removed and streamlined once we stop supporting standalone v1
|
|
22
|
-
* @returns A function that forces web vitals collection
|
|
23
|
-
*/
|
|
24
|
-
export declare function startTrackingWebVitals({ recordClsStandaloneSpans, recordLcpStandaloneSpans, client, }: StartTrackingWebVitalsOptions): () => void;
|
|
25
|
-
/**
|
|
26
|
-
* Start tracking long tasks.
|
|
27
|
-
*/
|
|
28
|
-
export declare function startTrackingLongTasks(): void;
|
|
29
|
-
/**
|
|
30
|
-
* Start tracking long animation frames.
|
|
31
|
-
*/
|
|
32
|
-
export declare function startTrackingLongAnimationFrames(): void;
|
|
33
|
-
/**
|
|
34
|
-
* Start tracking interaction events.
|
|
35
|
-
*/
|
|
36
|
-
export declare function startTrackingInteractions(): void;
|
|
37
|
-
export { registerInpInteractionListener, startTrackingINP } from './inp';
|
|
38
|
-
interface AddPerformanceEntriesOptions {
|
|
39
|
-
/**
|
|
40
|
-
* Resource spans with `op`s matching strings in the array will not be emitted.
|
|
41
|
-
*
|
|
42
|
-
* Default: []
|
|
43
|
-
*/
|
|
44
|
-
ignoreResourceSpans: Array<'resouce.script' | 'resource.css' | 'resource.img' | 'resource.other' | string>;
|
|
45
|
-
/**
|
|
46
|
-
* Performance spans created from browser Performance APIs,
|
|
47
|
-
* `performance.mark(...)` nand `performance.measure(...)`
|
|
48
|
-
* with `name`s matching strings in the array will not be emitted.
|
|
49
|
-
*
|
|
50
|
-
* Default: []
|
|
51
|
-
*/
|
|
52
|
-
ignorePerformanceApiSpans: Array<string | RegExp>;
|
|
53
|
-
/**
|
|
54
|
-
* Whether span streaming is enabled.
|
|
55
|
-
*/
|
|
56
|
-
spanStreamingEnabled?: boolean;
|
|
57
|
-
}
|
|
58
|
-
interface AddWebVitalsToSpanOptions {
|
|
59
|
-
/**
|
|
60
|
-
* Flag to determine if CLS should be recorded as a measurement on the pageload span or
|
|
61
|
-
* sent as a standalone span instead.
|
|
62
|
-
* Sending it as a standalone span will yield more accurate LCP values.
|
|
63
|
-
*
|
|
64
|
-
* Default: `false` for backwards compatibility.
|
|
65
|
-
*/
|
|
66
|
-
recordClsOnPageloadSpan: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Flag to determine if LCP should be recorded as a measurement on the pageload span or
|
|
69
|
-
* sent as a standalone span instead.
|
|
70
|
-
* Sending it as a standalone span will yield more accurate LCP values.
|
|
71
|
-
*
|
|
72
|
-
* Default: `false` for backwards compatibility.
|
|
73
|
-
*/
|
|
74
|
-
recordLcpOnPageloadSpan: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Whether span streaming is enabled.
|
|
77
|
-
*/
|
|
78
|
-
spanStreamingEnabled?: boolean;
|
|
79
|
-
}
|
|
80
|
-
/** Add performance related spans to a transaction */
|
|
81
|
-
export declare function addPerformanceEntries(span: Span, options: AddPerformanceEntriesOptions): void;
|
|
82
|
-
/**
|
|
83
|
-
* Writes the collected web vitals (LCP, CLS, INP, TTFB, FP, FCP) onto the pageload span,
|
|
84
|
-
* either as measurements/attributes (v1) or as web vital attributes (span streaming).
|
|
85
|
-
*
|
|
86
|
-
* This should be called when the pageload span ends, after the web vitals have been finalized.
|
|
87
|
-
* It is a no-op for non-pageload spans, but always resets the collected web vital state so it
|
|
88
|
-
* doesn't leak into a subsequent navigation.
|
|
89
|
-
*/
|
|
90
|
-
export declare function addWebVitalsToSpan(span: Span, options: AddWebVitalsToSpanOptions): void;
|
|
91
|
-
/**
|
|
92
|
-
* Create measure related spans.
|
|
93
|
-
* Exported only for tests.
|
|
94
|
-
*/
|
|
95
|
-
export declare function _addMeasureSpans(span: Span, entry: PerformanceEntry, startTime: number, duration: number, timeOrigin: number, ignorePerformanceApiSpans: AddPerformanceEntriesOptions['ignorePerformanceApiSpans']): void;
|
|
96
|
-
/**
|
|
97
|
-
* Instrument navigation entries
|
|
98
|
-
* exported only for tests
|
|
99
|
-
*/
|
|
100
|
-
export declare function _addNavigationSpans(span: Span, entry: PerformanceNavigationTiming, timeOrigin: number): void;
|
|
101
|
-
/**
|
|
102
|
-
* Create resource-related spans.
|
|
103
|
-
* Exported only for tests.
|
|
104
|
-
*/
|
|
105
|
-
export declare function _addResourceSpans(span: Span, entry: PerformanceResourceTiming, resourceUrl: string, startTime: number, duration: number, timeOrigin: number, ignoredResourceSpanOps?: Array<string>): void;
|
|
106
|
-
type ExperimentalResourceTimingProperty = 'renderBlockingStatus' | 'deliveryType' | 'responseStatus';
|
|
107
|
-
/**
|
|
108
|
-
* Use this to set any attributes we can take directly form the PerformanceResourceTiming entry.
|
|
109
|
-
*
|
|
110
|
-
* This is just a mapping function for entry->attribute to keep bundle-size minimal.
|
|
111
|
-
* Experimental properties are also accepted (see {@link ExperimentalResourceTimingProperty}).
|
|
112
|
-
* Assumes that all entry properties might be undefined for browser-specific differences.
|
|
113
|
-
* Only accepts string and number values for now and also sets 0-values.
|
|
114
|
-
*/
|
|
115
|
-
export declare function _setResourceRequestAttributes(entry: Partial<PerformanceResourceTiming> & Partial<Record<ExperimentalResourceTimingProperty, number | string>>, attributes: SpanAttributes, properties: [
|
|
116
|
-
keyof PerformanceResourceTiming | ExperimentalResourceTimingProperty,
|
|
117
|
-
string
|
|
118
|
-
][]): void;
|
|
119
|
-
//# sourceMappingURL=browserMetrics.d.ts.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Client } from '@sentry/core';
|
|
2
|
-
import { WebVitalReportEvent } from './utils';
|
|
3
|
-
/**
|
|
4
|
-
* Starts tracking the Cumulative Layout Shift on the current page and collects the value once
|
|
5
|
-
*
|
|
6
|
-
* - the page visibility is hidden
|
|
7
|
-
* - a navigation span is started (to stop CLS measurement for SPA soft navigations)
|
|
8
|
-
*
|
|
9
|
-
* Once either of these events triggers, the CLS value is sent as a standalone span and we stop
|
|
10
|
-
* measuring CLS.
|
|
11
|
-
*/
|
|
12
|
-
export declare function trackClsAsStandaloneSpan(client: Client): void;
|
|
13
|
-
/**
|
|
14
|
-
* Exported only for testing!
|
|
15
|
-
*/
|
|
16
|
-
export declare function _sendStandaloneClsSpan(clsValue: number, entry: LayoutShift | undefined, pageloadSpanId: string, reportEvent: WebVitalReportEvent): void;
|
|
17
|
-
//# sourceMappingURL=cls.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Captures [Element Timing API](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceElementTiming)
|
|
3
|
-
* data as Sentry metrics.
|
|
4
|
-
*
|
|
5
|
-
* To mark an element for tracking, add the `elementtiming` HTML attribute:
|
|
6
|
-
* ```html
|
|
7
|
-
* <img src="hero.jpg" elementtiming="hero-image" />
|
|
8
|
-
* <p elementtiming="hero-text">Welcome!</p>
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* This emits `ui.element.render_time` and `ui.element.load_time` (for images)
|
|
12
|
-
* as distribution metrics, tagged with the element's identifier and paint type.
|
|
13
|
-
*/
|
|
14
|
-
export declare const elementTimingIntegration: () => import("@sentry/core").Integration & {
|
|
15
|
-
name: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated Use `elementTimingIntegration` instead. This function is a no-op and will be removed in a future version.
|
|
19
|
-
*/
|
|
20
|
-
export declare function startTrackingElementTiming(): () => void;
|
|
21
|
-
//# sourceMappingURL=elementTiming.d.ts.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Span } from '@sentry/core';
|
|
2
|
-
import { InstrumentationHandlerCallback } from './instrument';
|
|
3
|
-
interface InteractionContext {
|
|
4
|
-
span: Span | undefined;
|
|
5
|
-
elementName: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* 60 seconds is the maximum for a plausible INP value
|
|
9
|
-
* (source: Me)
|
|
10
|
-
*/
|
|
11
|
-
export declare const MAX_PLAUSIBLE_INP_DURATION = 60;
|
|
12
|
-
/**
|
|
13
|
-
* Start tracking INP webvital events.
|
|
14
|
-
*/
|
|
15
|
-
export declare function startTrackingINP(): () => void;
|
|
16
|
-
export declare const INP_ENTRY_MAP: Record<string, 'click' | 'hover' | 'drag' | 'press'>;
|
|
17
|
-
/** Starts tracking the Interaction to Next Paint on the current page. #
|
|
18
|
-
* exported only for testing
|
|
19
|
-
*/
|
|
20
|
-
export declare function _trackINP(): () => void;
|
|
21
|
-
/**
|
|
22
|
-
* exported only for testing
|
|
23
|
-
*/
|
|
24
|
-
export declare const _onInp: InstrumentationHandlerCallback;
|
|
25
|
-
/**
|
|
26
|
-
* Look up a cached interaction context (element name + root span) by interactionId.
|
|
27
|
-
* Returns undefined if no context was cached for this interaction.
|
|
28
|
-
*/
|
|
29
|
-
export declare function getCachedInteractionContext(interactionId: number | undefined): InteractionContext | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Register a listener to cache route information for INP interactions.
|
|
32
|
-
*/
|
|
33
|
-
export declare function registerInpInteractionListener(): void;
|
|
34
|
-
export {};
|
|
35
|
-
//# sourceMappingURL=inp.d.ts.map
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
type InstrumentHandlerTypePerformanceObserver = 'longtask' | 'event' | 'navigation' | 'paint' | 'resource' | 'element' | 'first-input';
|
|
2
|
-
interface PerformanceEntry {
|
|
3
|
-
readonly duration: number;
|
|
4
|
-
readonly entryType: string;
|
|
5
|
-
readonly name: string;
|
|
6
|
-
readonly startTime: number;
|
|
7
|
-
toJSON(): Record<string, unknown>;
|
|
8
|
-
}
|
|
9
|
-
export interface PerformanceEventTiming extends PerformanceEntry {
|
|
10
|
-
processingStart: number;
|
|
11
|
-
processingEnd: number;
|
|
12
|
-
duration: number;
|
|
13
|
-
cancelable?: boolean;
|
|
14
|
-
target?: unknown | null;
|
|
15
|
-
interactionId?: number;
|
|
16
|
-
}
|
|
17
|
-
interface PerformanceScriptTiming extends PerformanceEntry {
|
|
18
|
-
sourceURL: string;
|
|
19
|
-
sourceFunctionName: string;
|
|
20
|
-
sourceCharPosition: number;
|
|
21
|
-
invoker: string;
|
|
22
|
-
invokerType: string;
|
|
23
|
-
}
|
|
24
|
-
export interface PerformanceLongAnimationFrameTiming extends PerformanceEntry {
|
|
25
|
-
scripts: PerformanceScriptTiming[];
|
|
26
|
-
}
|
|
27
|
-
interface Metric {
|
|
28
|
-
/**
|
|
29
|
-
* The name of the metric (in acronym form).
|
|
30
|
-
*/
|
|
31
|
-
name: 'CLS' | 'FCP' | 'INP' | 'LCP' | 'TTFB';
|
|
32
|
-
/**
|
|
33
|
-
* The current value of the metric.
|
|
34
|
-
*/
|
|
35
|
-
value: number;
|
|
36
|
-
/**
|
|
37
|
-
* The rating as to whether the metric value is within the "good",
|
|
38
|
-
* "needs improvement", or "poor" thresholds of the metric.
|
|
39
|
-
*/
|
|
40
|
-
rating: 'good' | 'needs-improvement' | 'poor';
|
|
41
|
-
/**
|
|
42
|
-
* The delta between the current value and the last-reported value.
|
|
43
|
-
* On the first report, `delta` and `value` will always be the same.
|
|
44
|
-
*/
|
|
45
|
-
delta: number;
|
|
46
|
-
/**
|
|
47
|
-
* A unique ID representing this particular metric instance. This ID can
|
|
48
|
-
* be used by an analytics tool to dedupe multiple values sent for the same
|
|
49
|
-
* metric instance, or to group multiple deltas together and calculate a
|
|
50
|
-
* total. It can also be used to differentiate multiple different metric
|
|
51
|
-
* instances sent from the same page, which can happen if the page is
|
|
52
|
-
* restored from the back/forward cache (in that case new metrics object
|
|
53
|
-
* get created).
|
|
54
|
-
*/
|
|
55
|
-
id: string;
|
|
56
|
-
/**
|
|
57
|
-
* Any performance entries relevant to the metric value calculation.
|
|
58
|
-
* The array may also be empty if the metric value was not based on any
|
|
59
|
-
* entries (e.g. a CLS value of 0 given no layout shifts).
|
|
60
|
-
*/
|
|
61
|
-
entries: PerformanceEntry[];
|
|
62
|
-
/**
|
|
63
|
-
* The type of navigation
|
|
64
|
-
*
|
|
65
|
-
* Navigation Timing API (or `undefined` if the browser doesn't
|
|
66
|
-
* support that API). For pages that are restored from the bfcache, this
|
|
67
|
-
* value will be 'back-forward-cache'.
|
|
68
|
-
*/
|
|
69
|
-
navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender' | 'restore';
|
|
70
|
-
}
|
|
71
|
-
type CleanupHandlerCallback = () => void;
|
|
72
|
-
/**
|
|
73
|
-
* Add a callback that will be triggered when a CLS metric is available.
|
|
74
|
-
* Returns a cleanup callback which can be called to remove the instrumentation handler.
|
|
75
|
-
*
|
|
76
|
-
* Pass `stopOnCallback = true` to stop listening for CLS when the cleanup callback is called.
|
|
77
|
-
* This will lead to the CLS being finalized and frozen.
|
|
78
|
-
*/
|
|
79
|
-
export declare function addClsInstrumentationHandler(callback: (data: {
|
|
80
|
-
metric: Metric;
|
|
81
|
-
}) => void, stopOnCallback?: boolean): CleanupHandlerCallback;
|
|
82
|
-
/**
|
|
83
|
-
* Add a callback that will be triggered when a LCP metric is available.
|
|
84
|
-
* Returns a cleanup callback which can be called to remove the instrumentation handler.
|
|
85
|
-
*
|
|
86
|
-
* Pass `stopOnCallback = true` to stop listening for LCP when the cleanup callback is called.
|
|
87
|
-
* This will lead to the LCP being finalized and frozen.
|
|
88
|
-
*/
|
|
89
|
-
export declare function addLcpInstrumentationHandler(callback: (data: {
|
|
90
|
-
metric: Metric;
|
|
91
|
-
}) => void, stopOnCallback?: boolean): CleanupHandlerCallback;
|
|
92
|
-
/**
|
|
93
|
-
* Add a callback that will be triggered when a TTFD metric is available.
|
|
94
|
-
*/
|
|
95
|
-
export declare function addTtfbInstrumentationHandler(callback: (data: {
|
|
96
|
-
metric: Metric;
|
|
97
|
-
}) => void): CleanupHandlerCallback;
|
|
98
|
-
export type InstrumentationHandlerCallback = (data: {
|
|
99
|
-
metric: Pick<Metric, Exclude<keyof Metric, 'entries'>> & {
|
|
100
|
-
entries: PerformanceEventTiming[];
|
|
101
|
-
};
|
|
102
|
-
}) => void;
|
|
103
|
-
/**
|
|
104
|
-
* Add a callback that will be triggered when a INP metric is available.
|
|
105
|
-
* Returns a cleanup callback which can be called to remove the instrumentation handler.
|
|
106
|
-
*/
|
|
107
|
-
export declare function addInpInstrumentationHandler(callback: InstrumentationHandlerCallback): CleanupHandlerCallback;
|
|
108
|
-
export declare function addPerformanceInstrumentationHandler(type: 'event', callback: (data: {
|
|
109
|
-
entries: ((PerformanceEntry & {
|
|
110
|
-
target?: unknown | null;
|
|
111
|
-
}) | PerformanceEventTiming)[];
|
|
112
|
-
}) => void): CleanupHandlerCallback;
|
|
113
|
-
export declare function addPerformanceInstrumentationHandler(type: InstrumentHandlerTypePerformanceObserver, callback: (data: {
|
|
114
|
-
entries: PerformanceEntry[];
|
|
115
|
-
}) => void): CleanupHandlerCallback;
|
|
116
|
-
/**
|
|
117
|
-
* Check if a PerformanceEntry is a PerformanceEventTiming by checking for the `duration` property.
|
|
118
|
-
*/
|
|
119
|
-
export declare function isPerformanceEventTiming(entry: PerformanceEntry): entry is PerformanceEventTiming;
|
|
120
|
-
export {};
|
|
121
|
-
//# sourceMappingURL=instrument.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Client } from '@sentry/core';
|
|
2
|
-
import { WebVitalReportEvent } from './utils';
|
|
3
|
-
/**
|
|
4
|
-
* 60 seconds is the maximum for a plausible LCP value.
|
|
5
|
-
*/
|
|
6
|
-
export declare const MAX_PLAUSIBLE_LCP_DURATION = 60000;
|
|
7
|
-
export declare function isValidLcpMetric(lcpValue: number | undefined): lcpValue is number;
|
|
8
|
-
/**
|
|
9
|
-
* Starts tracking the Largest Contentful Paint on the current page and collects the value once
|
|
10
|
-
*
|
|
11
|
-
* - the page visibility is hidden
|
|
12
|
-
* - a navigation span is started (to stop LCP measurement for SPA soft navigations)
|
|
13
|
-
*
|
|
14
|
-
* Once either of these events triggers, the LCP value is sent as a standalone span and we stop
|
|
15
|
-
* measuring LCP for subsequent routes.
|
|
16
|
-
*/
|
|
17
|
-
export declare function trackLcpAsStandaloneSpan(client: Client): void;
|
|
18
|
-
/**
|
|
19
|
-
* Exported only for testing!
|
|
20
|
-
*/
|
|
21
|
-
export declare function _sendStandaloneLcpSpan(lcpValue: number, entry: LargestContentfulPaint | undefined, pageloadSpanId: string, reportEvent: WebVitalReportEvent): void;
|
|
22
|
-
//# sourceMappingURL=lcp.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SpanAttributes } from '@sentry/core';
|
|
2
|
-
/**
|
|
3
|
-
* Converts a PerformanceResourceTiming entry to span data for the resource span. Most importantly,
|
|
4
|
-
* it converts the timing values from timestamps relative to the `performance.timeOrigin` to absolute timestamps
|
|
5
|
-
* in seconds.
|
|
6
|
-
*
|
|
7
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming#timestamps
|
|
8
|
-
*
|
|
9
|
-
* @param resourceTiming
|
|
10
|
-
* @returns An array where the first element is the attribute name and the second element is the attribute value.
|
|
11
|
-
*/
|
|
12
|
-
export declare function resourceTimingToSpanAttributes(resourceTiming: PerformanceResourceTiming): SpanAttributes;
|
|
13
|
-
//# sourceMappingURL=resourceTiming.d.ts.map
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { Client, Span, SpanAttributes, SpanTimeInput, StartSpanOptions } from '@sentry/core';
|
|
2
|
-
export type WebVitalReportEvent = 'pagehide' | 'navigation';
|
|
3
|
-
/**
|
|
4
|
-
* Checks if a given value is a valid measurement value.
|
|
5
|
-
*/
|
|
6
|
-
export declare function isMeasurementValue(value: unknown): value is number;
|
|
7
|
-
/**
|
|
8
|
-
* Helper function to start child on transactions. This function will make sure that the transaction will
|
|
9
|
-
* use the start timestamp of the created child span if it is earlier than the transactions actual
|
|
10
|
-
* start timestamp.
|
|
11
|
-
*/
|
|
12
|
-
export declare function startAndEndSpan(parentSpan: Span, startTimeInSeconds: number, endTime: SpanTimeInput, { ...ctx }: StartSpanOptions): Span | undefined;
|
|
13
|
-
interface StandaloneWebVitalSpanOptions {
|
|
14
|
-
name: string;
|
|
15
|
-
transaction?: string;
|
|
16
|
-
attributes: SpanAttributes;
|
|
17
|
-
startTime: number;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Starts an inactive, standalone span used to send web vital values to Sentry.
|
|
21
|
-
* DO NOT use this for arbitrary spans, as these spans require special handling
|
|
22
|
-
* during ingestion to extract metrics.
|
|
23
|
-
*
|
|
24
|
-
* This function adds a bunch of attributes and data to the span that's shared
|
|
25
|
-
* by all web vital standalone spans. However, you need to take care of adding
|
|
26
|
-
* the actual web vital value as an event to the span. Also, you need to assign
|
|
27
|
-
* a transaction name and some other values that are specific to the web vital.
|
|
28
|
-
*
|
|
29
|
-
* Ultimately, you also need to take care of ending the span to send it off.
|
|
30
|
-
*
|
|
31
|
-
* @param options
|
|
32
|
-
*
|
|
33
|
-
* @returns an inactive, standalone and NOT YET ended span
|
|
34
|
-
*/
|
|
35
|
-
export declare function startStandaloneWebVitalSpan(options: StandaloneWebVitalSpanOptions): Span | undefined;
|
|
36
|
-
/** Get the browser performance API. */
|
|
37
|
-
export declare function getBrowserPerformanceAPI(): Performance | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Converts from milliseconds to seconds
|
|
40
|
-
* @param time time in ms
|
|
41
|
-
*/
|
|
42
|
-
export declare function msToSec(time: number): number;
|
|
43
|
-
/**
|
|
44
|
-
* Converts ALPN protocol ids to name and version.
|
|
45
|
-
*
|
|
46
|
-
* (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)
|
|
47
|
-
* @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol
|
|
48
|
-
*/
|
|
49
|
-
export declare function extractNetworkProtocol(nextHopProtocol: string): {
|
|
50
|
-
name: string;
|
|
51
|
-
version: string;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Generic support check for web vitals
|
|
55
|
-
*/
|
|
56
|
-
export declare function supportsWebVital(entryType: 'layout-shift' | 'largest-contentful-paint'): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Listens for events on which we want to collect a previously accumulated web vital value.
|
|
59
|
-
* Currently, this includes:
|
|
60
|
-
*
|
|
61
|
-
* - pagehide (i.e. user minimizes browser window, hides tab, etc)
|
|
62
|
-
* - soft navigation (we only care about the vital of the initially loaded route)
|
|
63
|
-
*
|
|
64
|
-
* As a "side-effect", this function will also collect the span id of the pageload span.
|
|
65
|
-
*
|
|
66
|
-
* @param collectorCallback the callback to be called when the first of these events is triggered. Parameters:
|
|
67
|
-
* - event: the event that triggered the reporting of the web vital value.
|
|
68
|
-
* - pageloadSpanId: the span id of the pageload span. This is used to link the web vital span to the pageload span.
|
|
69
|
-
* - pageloadSpan: the pageload span instance. This is used for full access to the pageload span for span streaming.
|
|
70
|
-
*/
|
|
71
|
-
export declare function listenForWebVitalReportEvents(client: Client, collectorCallback: (event: WebVitalReportEvent, pageloadSpanId: string, pageloadSpan?: Span) => void): void;
|
|
72
|
-
export {};
|
|
73
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { CLSMetric, MetricRatingThresholds, ReportOpts } from './types';
|
|
2
|
-
/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */
|
|
3
|
-
export declare const CLSThresholds: MetricRatingThresholds;
|
|
4
|
-
/**
|
|
5
|
-
* Calculates the [CLS](https://web.dev/articles/cls) value for the current page and
|
|
6
|
-
* calls the `callback` function once the value is ready to be reported, along
|
|
7
|
-
* with all `layout-shift` performance entries that were used in the metric
|
|
8
|
-
* value calculation. The reported value is a `double` (corresponding to a
|
|
9
|
-
* [layout shift score](https://web.dev/articles/cls#layout_shift_score)).
|
|
10
|
-
*
|
|
11
|
-
* If the `reportAllChanges` configuration option is set to `true`, the
|
|
12
|
-
* `callback` function will be called as soon as the value is initially
|
|
13
|
-
* determined as well as any time the value changes throughout the page
|
|
14
|
-
* lifespan.
|
|
15
|
-
*
|
|
16
|
-
* _**Important:** CLS should be continually monitored for changes throughout
|
|
17
|
-
* the entire lifespan of a page—including if the user returns to the page after
|
|
18
|
-
* it's been hidden/backgrounded. However, since browsers often [will not fire
|
|
19
|
-
* additional callbacks once the user has backgrounded a
|
|
20
|
-
* page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),
|
|
21
|
-
* `callback` is always called when the page's visibility state changes to
|
|
22
|
-
* hidden. As a result, the `callback` function might be called multiple times
|
|
23
|
-
* during the same page load._
|
|
24
|
-
*/
|
|
25
|
-
export declare const onCLS: (onReport: (metric: CLSMetric) => void, opts?: ReportOpts) => void;
|
|
26
|
-
//# sourceMappingURL=getCLS.d.ts.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { INPMetric, INPReportOpts, MetricRatingThresholds } from './types';
|
|
2
|
-
/** Thresholds for INP. See https://web.dev/articles/inp#what_is_a_good_inp_score */
|
|
3
|
-
export declare const INPThresholds: MetricRatingThresholds;
|
|
4
|
-
/**
|
|
5
|
-
* Calculates the [INP](https://web.dev/articles/inp) value for the current
|
|
6
|
-
* page and calls the `callback` function once the value is ready, along with
|
|
7
|
-
* the `event` performance entries reported for that interaction. The reported
|
|
8
|
-
* value is a `DOMHighResTimeStamp`.
|
|
9
|
-
*
|
|
10
|
-
* A custom `durationThreshold` configuration option can optionally be passed
|
|
11
|
-
* to control what `event-timing` entries are considered for INP reporting. The
|
|
12
|
-
* default threshold is `40`, which means INP scores of less than 40 will not
|
|
13
|
-
* be reported. To avoid reporting no interactions in these cases, the library
|
|
14
|
-
* will fall back to the input delay of the first interaction. Note that this
|
|
15
|
-
* will not affect your 75th percentile INP value unless that value is also
|
|
16
|
-
* less than 40 (well below the recommended
|
|
17
|
-
* [good](https://web.dev/articles/inp#what_is_a_good_inp_score) threshold).
|
|
18
|
-
*
|
|
19
|
-
* If the `reportAllChanges` configuration option is set to `true`, the
|
|
20
|
-
* `callback` function will be called as soon as the value is initially
|
|
21
|
-
* determined as well as any time the value changes throughout the page
|
|
22
|
-
* lifespan.
|
|
23
|
-
*
|
|
24
|
-
* _**Important:** INP should be continually monitored for changes throughout
|
|
25
|
-
* the entire lifespan of a page—including if the user returns to the page after
|
|
26
|
-
* it's been hidden/backgrounded. However, since browsers often [will not fire
|
|
27
|
-
* additional callbacks once the user has backgrounded a
|
|
28
|
-
* page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),
|
|
29
|
-
* `callback` is always called when the page's visibility state changes to
|
|
30
|
-
* hidden. As a result, the `callback` function might be called multiple times
|
|
31
|
-
* during the same page load._
|
|
32
|
-
*/
|
|
33
|
-
export declare const onINP: (onReport: (metric: INPMetric) => void, opts?: INPReportOpts) => void;
|
|
34
|
-
//# sourceMappingURL=getINP.d.ts.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { LCPMetric, MetricRatingThresholds, ReportOpts } from './types';
|
|
2
|
-
/** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */
|
|
3
|
-
export declare const LCPThresholds: MetricRatingThresholds;
|
|
4
|
-
/**
|
|
5
|
-
* Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and
|
|
6
|
-
* calls the `callback` function once the value is ready (along with the
|
|
7
|
-
* relevant `largest-contentful-paint` performance entry used to determine the
|
|
8
|
-
* value). The reported value is a `DOMHighResTimeStamp`.
|
|
9
|
-
*
|
|
10
|
-
* If the `reportAllChanges` configuration option is set to `true`, the
|
|
11
|
-
* `callback` function will be called any time a new `largest-contentful-paint`
|
|
12
|
-
* performance entry is dispatched, or once the final value of the metric has
|
|
13
|
-
* been determined.
|
|
14
|
-
*/
|
|
15
|
-
export declare const onLCP: (onReport: (metric: LCPMetric) => void, opts?: ReportOpts) => void;
|
|
16
|
-
//# sourceMappingURL=getLCP.d.ts.map
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export interface Interaction {
|
|
2
|
-
_latency: number;
|
|
3
|
-
id: number;
|
|
4
|
-
entries: PerformanceEventTiming[];
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
export declare class InteractionManager {
|
|
10
|
-
/**
|
|
11
|
-
* A list of longest interactions on the page (by latency) sorted so the
|
|
12
|
-
* longest one is first. The list is at most MAX_INTERACTIONS_TO_CONSIDER
|
|
13
|
-
* long.
|
|
14
|
-
*/
|
|
15
|
-
_longestInteractionList: Interaction[];
|
|
16
|
-
/**
|
|
17
|
-
* A mapping of longest interactions by their interaction ID.
|
|
18
|
-
* This is used for faster lookup.
|
|
19
|
-
*/
|
|
20
|
-
_longestInteractionMap: Map<number, Interaction>;
|
|
21
|
-
_onBeforeProcessingEntry?: (entry: PerformanceEventTiming) => void;
|
|
22
|
-
_onAfterProcessingINPCandidate?: (interaction: Interaction) => void;
|
|
23
|
-
_resetInteractions(): void;
|
|
24
|
-
/**
|
|
25
|
-
* Returns the estimated p98 longest interaction based on the stored
|
|
26
|
-
* interaction candidates and the interaction count for the current page.
|
|
27
|
-
*/
|
|
28
|
-
_estimateP98LongestInteraction(): Interaction | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Takes a performance entry and adds it to the list of worst interactions
|
|
31
|
-
* if its duration is long enough to make it among the worst. If the
|
|
32
|
-
* entry is part of an existing interaction, it is merged and the latency
|
|
33
|
-
* and entries list is updated as needed.
|
|
34
|
-
*/
|
|
35
|
-
_processEntry(entry: PerformanceEventTiming): void;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=InteractionManager.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MetricRatingThresholds, MetricType } from '../types';
|
|
2
|
-
export declare const bindReporter: <MetricName extends MetricType["name"]>(callback: (metric: Extract<MetricType, {
|
|
3
|
-
name: MetricName;
|
|
4
|
-
}>) => void, metric: Extract<MetricType, {
|
|
5
|
-
name: MetricName;
|
|
6
|
-
}>, thresholds: MetricRatingThresholds, reportAllChanges?: boolean) => (forceReport?: boolean) => void;
|
|
7
|
-
//# sourceMappingURL=bindReporter.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Performantly generate a unique, 30-char string by combining a version
|
|
3
|
-
* number, the current timestamp with a 13-digit number integer.
|
|
4
|
-
* @return {string}
|
|
5
|
-
*/
|
|
6
|
-
export declare const generateUniqueID: () => string;
|
|
7
|
-
//# sourceMappingURL=generateUniqueID.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* web-vitals 5.1.0 switched listeners to be added on the window rather than the document.
|
|
3
|
-
* Instead of having to check for window/document every time we add a listener, we can use this function.
|
|
4
|
-
*/
|
|
5
|
-
export declare function addPageListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void;
|
|
6
|
-
/**
|
|
7
|
-
* web-vitals 5.1.0 switched listeners to be removed from the window rather than the document.
|
|
8
|
-
* Instead of having to check for window/document every time we remove a listener, we can use this function.
|
|
9
|
-
*/
|
|
10
|
-
export declare function removePageListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void;
|
|
11
|
-
//# sourceMappingURL=globalListeners.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { MetricType } from '../types';
|
|
2
|
-
export declare const initMetric: <MetricName extends MetricType["name"]>(name: MetricName, value?: number) => {
|
|
3
|
-
name: MetricName;
|
|
4
|
-
value: number;
|
|
5
|
-
rating: "good";
|
|
6
|
-
delta: number;
|
|
7
|
-
entries: (Extract<import("../types").CLSMetric, {
|
|
8
|
-
name: MetricName;
|
|
9
|
-
}> | Extract<import("../types").FCPMetric, {
|
|
10
|
-
name: MetricName;
|
|
11
|
-
}> | Extract<import("../types").INPMetric, {
|
|
12
|
-
name: MetricName;
|
|
13
|
-
}> | Extract<import("../types").LCPMetric, {
|
|
14
|
-
name: MetricName;
|
|
15
|
-
}> | Extract<import("../types").TTFBMetric, {
|
|
16
|
-
name: MetricName;
|
|
17
|
-
}>)["entries"];
|
|
18
|
-
id: string;
|
|
19
|
-
navigationType: "navigate" | "reload" | "back-forward" | "back-forward-cache" | "prerender" | "restore";
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=initMetric.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A function that accepts and identity object and a class object and returns
|
|
3
|
-
* either a new instance of that class or an existing instance, if the
|
|
4
|
-
* identity object was previously used.
|
|
5
|
-
*/
|
|
6
|
-
export declare function initUnique<T>(identityObj: object, ClassObj: new () => T): T;
|
|
7
|
-
//# sourceMappingURL=initUnique.d.ts.map
|