@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,29 +0,0 @@
|
|
|
1
|
-
import { observe } from '../observe.js';
|
|
2
|
-
|
|
3
|
-
let interactionCountEstimate = 0;
|
|
4
|
-
let minKnownInteractionId = Infinity;
|
|
5
|
-
let maxKnownInteractionId = 0;
|
|
6
|
-
const updateEstimate = (entries) => {
|
|
7
|
-
entries.forEach((e) => {
|
|
8
|
-
if (e.interactionId) {
|
|
9
|
-
minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);
|
|
10
|
-
maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);
|
|
11
|
-
interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
let po;
|
|
16
|
-
const getInteractionCount = () => {
|
|
17
|
-
return po ? interactionCountEstimate : performance.interactionCount || 0;
|
|
18
|
-
};
|
|
19
|
-
const initInteractionCountPolyfill = () => {
|
|
20
|
-
if ("interactionCount" in performance || po) return;
|
|
21
|
-
po = observe("event", updateEstimate, {
|
|
22
|
-
type: "event",
|
|
23
|
-
buffered: true,
|
|
24
|
-
durationThreshold: 0
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export { getInteractionCount, initInteractionCountPolyfill };
|
|
29
|
-
//# sourceMappingURL=interactionCountPolyfill.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interactionCountPolyfill.js","sources":["../../../../../../src/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.ts"],"sourcesContent":["/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { observe } from '../observe';\n\ndeclare global {\n interface Performance {\n interactionCount: number;\n }\n}\n\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\n\nconst updateEstimate = (entries: PerformanceEventTiming[]) => {\n entries.forEach(e => {\n if (e.interactionId) {\n minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);\n maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);\n\n interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;\n }\n });\n};\n\nlet po: PerformanceObserver | undefined;\n\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\nexport const getInteractionCount = (): number => {\n return po ? interactionCountEstimate : performance.interactionCount || 0;\n};\n\n/**\n * Feature detects native support or initializes the polyfill if needed.\n */\nexport const initInteractionCountPolyfill = (): void => {\n if ('interactionCount' in performance || po) return;\n\n po = observe('event', updateEstimate, {\n type: 'event',\n buffered: true,\n durationThreshold: 0,\n } as PerformanceObserverInit);\n};\n"],"names":[],"mappings":";;AAwBA,IAAI,wBAAA,GAA2B,CAAA;AAC/B,IAAI,qBAAA,GAAwB,QAAA;AAC5B,IAAI,qBAAA,GAAwB,CAAA;AAE5B,MAAM,cAAA,GAAiB,CAAC,OAAA,KAAsC;AAC5D,EAAA,OAAA,CAAQ,QAAQ,CAAA,CAAA,KAAK;AACnB,IAAA,IAAI,EAAE,aAAA,EAAe;AACnB,MAAA,qBAAA,GAAwB,IAAA,CAAK,GAAA,CAAI,qBAAA,EAAuB,CAAA,CAAE,aAAa,CAAA;AACvE,MAAA,qBAAA,GAAwB,IAAA,CAAK,GAAA,CAAI,qBAAA,EAAuB,CAAA,CAAE,aAAa,CAAA;AAEvE,MAAA,wBAAA,GAA2B,qBAAA,GAAA,CAAyB,qBAAA,GAAwB,qBAAA,IAAyB,CAAA,GAAI,CAAA,GAAI,CAAA;AAAA,IAC/G;AAAA,EACF,CAAC,CAAA;AACH,CAAA;AAEA,IAAI,EAAA;AAMG,MAAM,sBAAsB,MAAc;AAC/C,EAAA,OAAO,EAAA,GAAK,wBAAA,GAA2B,WAAA,CAAY,gBAAA,IAAoB,CAAA;AACzE;AAKO,MAAM,+BAA+B,MAAY;AACtD,EAAA,IAAI,kBAAA,IAAsB,eAAe,EAAA,EAAI;AAE7C,EAAA,EAAA,GAAK,OAAA,CAAQ,SAAS,cAAA,EAAgB;AAAA,IACpC,IAAA,EAAM,OAAA;AAAA,IACN,QAAA,EAAU,IAAA;AAAA,IACV,iBAAA,EAAmB;AAAA,GACO,CAAA;AAC9B;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runOnce.js","sources":["../../../../../src/metrics/web-vitals/lib/runOnce.ts"],"sourcesContent":["/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const runOnce = (cb: () => void) => {\n let called = false;\n return () => {\n if (!called) {\n cb();\n called = true;\n }\n };\n};\n"],"names":[],"mappings":"AAgBO,MAAM,OAAA,GAAU,CAAC,EAAA,KAAmB;AACzC,EAAA,IAAI,MAAA,GAAS,KAAA;AACb,EAAA,OAAO,MAAM;AACX,IAAA,IAAI,CAAC,MAAA,EAAQ;AACX,MAAA,EAAA,EAAG;AACH,MAAA,MAAA,GAAS,IAAA;AAAA,IACX;AAAA,EACF,CAAA;AACF;;;;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { WINDOW } from '../../../types.js';
|
|
2
|
-
|
|
3
|
-
const whenActivated = (callback) => {
|
|
4
|
-
if (WINDOW.document?.prerendering) {
|
|
5
|
-
addEventListener("prerenderingchange", () => callback(), true);
|
|
6
|
-
} else {
|
|
7
|
-
callback();
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export { whenActivated };
|
|
12
|
-
//# sourceMappingURL=whenActivated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"whenActivated.js","sources":["../../../../../src/metrics/web-vitals/lib/whenActivated.ts"],"sourcesContent":["/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types';\n\nexport const whenActivated = (callback: () => void) => {\n if (WINDOW.document?.prerendering) {\n addEventListener('prerenderingchange', () => callback(), true);\n } else {\n callback();\n }\n};\n"],"names":[],"mappings":";;AAkBO,MAAM,aAAA,GAAgB,CAAC,QAAA,KAAyB;AACrD,EAAA,IAAI,MAAA,CAAO,UAAU,YAAA,EAAc;AACjC,IAAA,gBAAA,CAAiB,oBAAA,EAAsB,MAAM,QAAA,EAAS,EAAG,IAAI,CAAA;AAAA,EAC/D,CAAA,MAAO;AACL,IAAA,QAAA,EAAS;AAAA,EACX;AACF;;;;"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { WINDOW } from '../../../types.js';
|
|
2
|
-
import { addPageListener, removePageListener } from './globalListeners.js';
|
|
3
|
-
import { runOnce } from './runOnce.js';
|
|
4
|
-
|
|
5
|
-
const whenIdleOrHidden = (cb) => {
|
|
6
|
-
const rIC = WINDOW.requestIdleCallback || WINDOW.setTimeout;
|
|
7
|
-
if (WINDOW.document?.visibilityState === "hidden") {
|
|
8
|
-
cb();
|
|
9
|
-
} else {
|
|
10
|
-
cb = runOnce(cb);
|
|
11
|
-
addPageListener("visibilitychange", cb, { once: true, capture: true });
|
|
12
|
-
addPageListener("pagehide", cb, { once: true, capture: true });
|
|
13
|
-
rIC(() => {
|
|
14
|
-
cb();
|
|
15
|
-
removePageListener("visibilitychange", cb, { capture: true });
|
|
16
|
-
removePageListener("pagehide", cb, { capture: true });
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export { whenIdleOrHidden };
|
|
22
|
-
//# sourceMappingURL=whenIdleOrHidden.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"whenIdleOrHidden.js","sources":["../../../../../src/metrics/web-vitals/lib/whenIdleOrHidden.ts"],"sourcesContent":["/*\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types.js';\nimport { addPageListener, removePageListener } from './globalListeners.js';\nimport { runOnce } from './runOnce.js';\n\n/**\n * Runs the passed callback during the next idle period, or immediately\n * if the browser's visibility state is (or becomes) hidden.\n */\nexport const whenIdleOrHidden = (cb: () => void) => {\n const rIC = WINDOW.requestIdleCallback || WINDOW.setTimeout;\n\n // If the document is hidden, run the callback immediately, otherwise\n // race an idle callback with the next `visibilitychange` event.\n if (WINDOW.document?.visibilityState === 'hidden') {\n cb();\n } else {\n // eslint-disable-next-line no-param-reassign\n cb = runOnce(cb);\n addPageListener('visibilitychange', cb, { once: true, capture: true });\n // sentry: we use pagehide instead of directly listening to visibilitychange\n // because some browsers we still support (Safari <14.4) don't fully support\n // `visibilitychange` or have known bugs w.r.t the `visibilitychange` event.\n // TODO(v11): remove this once we drop support for Safari <14.4\n addPageListener('pagehide', cb, { once: true, capture: true });\n rIC(() => {\n cb();\n // Remove the above event listener since no longer required.\n // See: https://github.com/GoogleChrome/web-vitals/issues/622\n removePageListener('visibilitychange', cb, { capture: true });\n // TODO(v11): remove this once we drop support for Safari <14.4\n removePageListener('pagehide', cb, { capture: true });\n });\n }\n};\n"],"names":[],"mappings":";;;;AAwBO,MAAM,gBAAA,GAAmB,CAAC,EAAA,KAAmB;AAClD,EAAA,MAAM,GAAA,GAAM,MAAA,CAAO,mBAAA,IAAuB,MAAA,CAAO,UAAA;AAIjD,EAAA,IAAI,MAAA,CAAO,QAAA,EAAU,eAAA,KAAoB,QAAA,EAAU;AACjD,IAAA,EAAA,EAAG;AAAA,EACL,CAAA,MAAO;AAEL,IAAA,EAAA,GAAK,QAAQ,EAAE,CAAA;AACf,IAAA,eAAA,CAAgB,oBAAoB,EAAA,EAAI,EAAE,MAAM,IAAA,EAAM,OAAA,EAAS,MAAM,CAAA;AAKrE,IAAA,eAAA,CAAgB,YAAY,EAAA,EAAI,EAAE,MAAM,IAAA,EAAM,OAAA,EAAS,MAAM,CAAA;AAC7D,IAAA,GAAA,CAAI,MAAM;AACR,MAAA,EAAA,EAAG;AAGH,MAAA,kBAAA,CAAmB,kBAAA,EAAoB,EAAA,EAAI,EAAE,OAAA,EAAS,MAAM,CAAA;AAE5D,MAAA,kBAAA,CAAmB,UAAA,EAAY,EAAA,EAAI,EAAE,OAAA,EAAS,MAAM,CAAA;AAAA,IACtD,CAAC,CAAA;AAAA,EACH;AACF;;;;"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { bindReporter } from './lib/bindReporter.js';
|
|
2
|
-
import { getActivationStart } from './lib/getActivationStart.js';
|
|
3
|
-
import { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';
|
|
4
|
-
import { initMetric } from './lib/initMetric.js';
|
|
5
|
-
import { observe } from './lib/observe.js';
|
|
6
|
-
import { whenActivated } from './lib/whenActivated.js';
|
|
7
|
-
|
|
8
|
-
const FCPThresholds = [1800, 3e3];
|
|
9
|
-
const onFCP = (onReport, opts = {}) => {
|
|
10
|
-
whenActivated(() => {
|
|
11
|
-
const visibilityWatcher = getVisibilityWatcher();
|
|
12
|
-
const metric = initMetric("FCP");
|
|
13
|
-
let report;
|
|
14
|
-
const handleEntries = (entries) => {
|
|
15
|
-
for (const entry of entries) {
|
|
16
|
-
if (entry.name === "first-contentful-paint") {
|
|
17
|
-
po.disconnect();
|
|
18
|
-
if (entry.startTime < visibilityWatcher.firstHiddenTime) {
|
|
19
|
-
metric.value = Math.max(entry.startTime - getActivationStart(), 0);
|
|
20
|
-
metric.entries.push(entry);
|
|
21
|
-
report(true);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
const po = observe("paint", handleEntries);
|
|
27
|
-
if (po) {
|
|
28
|
-
report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export { FCPThresholds, onFCP };
|
|
34
|
-
//# sourceMappingURL=onFCP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onFCP.js","sources":["../../../../src/metrics/web-vitals/onFCP.ts"],"sourcesContent":["/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { getActivationStart } from './lib/getActivationStart';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { whenActivated } from './lib/whenActivated';\nimport type { FCPMetric, MetricRatingThresholds, ReportOpts } from './types';\n\n/** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */\nexport const FCPThresholds: MetricRatingThresholds = [1800, 3000];\n\n/**\n * Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `paint` performance entry used to determine the value. The reported\n * value is a `DOMHighResTimeStamp`.\n */\nexport const onFCP = (onReport: (metric: FCPMetric) => void, opts: ReportOpts = {}) => {\n whenActivated(() => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('FCP');\n let report: ReturnType<typeof bindReporter>;\n\n const handleEntries = (entries: FCPMetric['entries']) => {\n for (const entry of entries) {\n if (entry.name === 'first-contentful-paint') {\n po!.disconnect();\n\n // Only report if the page wasn't hidden prior to the first paint.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n // The activationStart reference is used because FCP should be\n // relative to page activation rather than navigation start if the\n // page was prerendered. But in cases where `activationStart` occurs\n // after the FCP, this time should be clamped at 0.\n metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n metric.entries.push(entry);\n report(true);\n }\n }\n }\n };\n\n const po = observe('paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);\n }\n });\n};\n"],"names":[],"mappings":";;;;;;;AAyBO,MAAM,aAAA,GAAwC,CAAC,IAAA,EAAM,GAAI;AAQzD,MAAM,KAAA,GAAQ,CAAC,QAAA,EAAuC,IAAA,GAAmB,EAAC,KAAM;AACrF,EAAA,aAAA,CAAc,MAAM;AAClB,IAAA,MAAM,oBAAoB,oBAAA,EAAqB;AAC/C,IAAA,MAAM,MAAA,GAAS,WAAW,KAAK,CAAA;AAC/B,IAAA,IAAI,MAAA;AAEJ,IAAA,MAAM,aAAA,GAAgB,CAAC,OAAA,KAAkC;AACvD,MAAA,KAAA,MAAW,SAAS,OAAA,EAAS;AAC3B,QAAA,IAAI,KAAA,CAAM,SAAS,wBAAA,EAA0B;AAC3C,UAAA,EAAA,CAAI,UAAA,EAAW;AAGf,UAAA,IAAI,KAAA,CAAM,SAAA,GAAY,iBAAA,CAAkB,eAAA,EAAiB;AAKvD,YAAA,MAAA,CAAO,QAAQ,IAAA,CAAK,GAAA,CAAI,MAAM,SAAA,GAAY,kBAAA,IAAsB,CAAC,CAAA;AACjE,YAAA,MAAA,CAAO,OAAA,CAAQ,KAAK,KAAK,CAAA;AACzB,YAAA,MAAA,CAAO,IAAI,CAAA;AAAA,UACb;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAA;AAEA,IAAA,MAAM,EAAA,GAAK,OAAA,CAAQ,OAAA,EAAS,aAAa,CAAA;AAEzC,IAAA,IAAI,EAAA,EAAI;AACN,MAAA,MAAA,GAAS,YAAA,CAAa,QAAA,EAAU,MAAA,EAAQ,aAAA,EAAe,KAAK,gBAAgB,CAAA;AAAA,IAC9E;AAAA,EACF,CAAC,CAAA;AACH;;;;"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { WINDOW } from '../../types.js';
|
|
2
|
-
import { bindReporter } from './lib/bindReporter.js';
|
|
3
|
-
import { getActivationStart } from './lib/getActivationStart.js';
|
|
4
|
-
import { getNavigationEntry } from './lib/getNavigationEntry.js';
|
|
5
|
-
import { initMetric } from './lib/initMetric.js';
|
|
6
|
-
import { whenActivated } from './lib/whenActivated.js';
|
|
7
|
-
|
|
8
|
-
const TTFBThresholds = [800, 1800];
|
|
9
|
-
const whenReady = (callback) => {
|
|
10
|
-
if (WINDOW.document?.prerendering) {
|
|
11
|
-
whenActivated(() => whenReady(callback));
|
|
12
|
-
} else if (WINDOW.document?.readyState !== "complete") {
|
|
13
|
-
addEventListener("load", () => whenReady(callback), true);
|
|
14
|
-
} else {
|
|
15
|
-
setTimeout(callback);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
const onTTFB = (onReport, opts = {}) => {
|
|
19
|
-
const metric = initMetric("TTFB");
|
|
20
|
-
const report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);
|
|
21
|
-
whenReady(() => {
|
|
22
|
-
const navigationEntry = getNavigationEntry();
|
|
23
|
-
if (navigationEntry) {
|
|
24
|
-
metric.value = Math.max(navigationEntry.responseStart - getActivationStart(), 0);
|
|
25
|
-
metric.entries = [navigationEntry];
|
|
26
|
-
report(true);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export { TTFBThresholds, onTTFB };
|
|
32
|
-
//# sourceMappingURL=onTTFB.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"onTTFB.js","sources":["../../../../src/metrics/web-vitals/onTTFB.ts"],"sourcesContent":["/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../types';\nimport { bindReporter } from './lib/bindReporter';\nimport { getActivationStart } from './lib/getActivationStart';\nimport { getNavigationEntry } from './lib/getNavigationEntry';\nimport { initMetric } from './lib/initMetric';\nimport { whenActivated } from './lib/whenActivated';\nimport type { MetricRatingThresholds, ReportOpts, TTFBMetric } from './types';\n\n/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */\nexport const TTFBThresholds: MetricRatingThresholds = [800, 1800];\n\n/**\n * Runs in the next task after the page is done loading and/or prerendering.\n * @param callback\n */\nconst whenReady = (callback: () => void) => {\n if (WINDOW.document?.prerendering) {\n whenActivated(() => whenReady(callback));\n } else if (WINDOW.document?.readyState !== 'complete') {\n addEventListener('load', () => whenReady(callback), true);\n } else {\n // Queue a task so the callback runs after `loadEventEnd`.\n setTimeout(callback);\n }\n};\n\n/**\n * Calculates the [TTFB](https://web.dev/articles/ttfb) value for the\n * current page and calls the `callback` function once the page has loaded,\n * along with the relevant `navigation` performance entry used to determine the\n * value. The reported value is a `DOMHighResTimeStamp`.\n *\n * Note, this function waits until after the page is loaded to call `callback`\n * in order to ensure all properties of the `navigation` entry are populated.\n * This is useful if you want to report on other metrics exposed by the\n * [Navigation Timing API](https://w3c.github.io/navigation-timing/). For\n * example, the TTFB metric starts from the page's [time\n * origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it\n * includes time spent on DNS lookup, connection negotiation, network latency,\n * and server processing time.\n */\nexport const onTTFB = (onReport: (metric: TTFBMetric) => void, opts: ReportOpts = {}) => {\n const metric = initMetric('TTFB');\n const report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);\n\n whenReady(() => {\n const navigationEntry = getNavigationEntry();\n\n if (navigationEntry) {\n // The activationStart reference is used because TTFB should be\n // relative to page activation rather than navigation start if the\n // page was prerendered. But in cases where `activationStart` occurs\n // after the first byte is received, this time should be clamped at 0.\n metric.value = Math.max(navigationEntry.responseStart - getActivationStart(), 0);\n\n metric.entries = [navigationEntry];\n report(true);\n }\n });\n};\n"],"names":[],"mappings":";;;;;;;AAyBO,MAAM,cAAA,GAAyC,CAAC,GAAA,EAAK,IAAI;AAMhE,MAAM,SAAA,GAAY,CAAC,QAAA,KAAyB;AAC1C,EAAA,IAAI,MAAA,CAAO,UAAU,YAAA,EAAc;AACjC,IAAA,aAAA,CAAc,MAAM,SAAA,CAAU,QAAQ,CAAC,CAAA;AAAA,EACzC,CAAA,MAAA,IAAW,MAAA,CAAO,QAAA,EAAU,UAAA,KAAe,UAAA,EAAY;AACrD,IAAA,gBAAA,CAAiB,MAAA,EAAQ,MAAM,SAAA,CAAU,QAAQ,GAAG,IAAI,CAAA;AAAA,EAC1D,CAAA,MAAO;AAEL,IAAA,UAAA,CAAW,QAAQ,CAAA;AAAA,EACrB;AACF,CAAA;AAiBO,MAAM,MAAA,GAAS,CAAC,QAAA,EAAwC,IAAA,GAAmB,EAAC,KAAM;AACvF,EAAA,MAAM,MAAA,GAAS,WAAW,MAAM,CAAA;AAChC,EAAA,MAAM,SAAS,YAAA,CAAa,QAAA,EAAU,MAAA,EAAQ,cAAA,EAAgB,KAAK,gBAAgB,CAAA;AAEnF,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,kBAAkB,kBAAA,EAAmB;AAE3C,IAAA,IAAI,eAAA,EAAiB;AAKnB,MAAA,MAAA,CAAO,QAAQ,IAAA,CAAK,GAAA,CAAI,gBAAgB,aAAA,GAAgB,kBAAA,IAAsB,CAAC,CAAA;AAE/E,MAAA,MAAA,CAAO,OAAA,GAAU,CAAC,eAAe,CAAA;AACjC,MAAA,MAAA,CAAO,IAAI,CAAA;AAAA,IACb;AAAA,EACF,CAAC,CAAA;AACH;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webVitalSpans.js","sources":["../../../src/metrics/webVitalSpans.ts"],"sourcesContent":["import type { Client, Span, SpanAttributes } from '@sentry/core';\nimport {\n browserPerformanceTimeOrigin,\n debug,\n getActiveSpan,\n getCurrentScope,\n getRootSpan,\n SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n spanToStreamedSpanJSON,\n startInactiveSpan,\n timestampInSeconds,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { htmlTreeAsString } from '../htmlTreeAsString';\nimport { WINDOW } from '../types';\nimport { getCachedInteractionContext, INP_ENTRY_MAP, MAX_PLAUSIBLE_INP_DURATION } from './inp';\nimport type { InstrumentationHandlerCallback } from './instrument';\nimport { addClsInstrumentationHandler, addInpInstrumentationHandler, addLcpInstrumentationHandler } from './instrument';\nimport { isValidLcpMetric } from './lcp';\nimport type { WebVitalReportEvent } from './utils';\nimport { getBrowserPerformanceAPI, listenForWebVitalReportEvents, msToSec, supportsWebVital } from './utils';\nimport type { PerformanceEventTiming } from './instrument';\nimport { SENTRY_SEGMENT_NAME, SENTRY_TRANSACTION } from '@sentry/conventions/attributes';\n\n// Locally-defined interfaces to avoid leaking bare global type references into the\n// generated .d.ts. The `declare global` augmentations in web-vitals/types.ts make these\n// available during this package's compilation but are NOT carried to consumers.\n// This mirrors the pattern used for PerformanceEventTiming in instrument.ts.\nexport interface LayoutShift extends PerformanceEntry {\n value: number;\n sources: Array<{ node: Node | null }>;\n hadRecentInput: boolean;\n}\n\nexport interface LargestContentfulPaint extends PerformanceEntry {\n readonly renderTime: DOMHighResTimeStamp;\n readonly loadTime: DOMHighResTimeStamp;\n readonly size: number;\n readonly id: string;\n readonly url: string;\n readonly element: Element | null;\n}\n\ninterface WebVitalSpanOptions {\n name: string;\n op: string;\n origin: string;\n metricName: 'lcp' | 'cls' | 'inp';\n value: number;\n attributes?: SpanAttributes;\n parentSpan?: Span;\n reportEvent?: WebVitalReportEvent;\n startTime: number;\n endTime?: number;\n}\n\n/**\n * Emits a web vital span that flows through the span streaming pipeline.\n */\nexport function _emitWebVitalSpan(options: WebVitalSpanOptions): void {\n const {\n name,\n op,\n origin,\n metricName,\n value,\n attributes: passedAttributes,\n parentSpan,\n reportEvent,\n startTime,\n endTime,\n } = options;\n\n const routeName = getCurrentScope().getScopeData().transactionName;\n\n const attributes: SpanAttributes = {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: origin,\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: op,\n [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: 0,\n [`browser.web_vital.${metricName}.value`]: value,\n // oxlint-disable-next-line typescript-eslint/no-deprecated\n [SENTRY_TRANSACTION]: routeName,\n [SENTRY_SEGMENT_NAME]: routeName,\n // Web vital score calculation relies on the user agent\n 'user_agent.original': WINDOW.navigator?.userAgent,\n ...passedAttributes,\n };\n\n if (parentSpan && spanToStreamedSpanJSON(parentSpan).attributes?.[SEMANTIC_ATTRIBUTE_SENTRY_OP] === 'pageload') {\n // for LCP and CLS, we collect the pageload span id as an attribute\n attributes['sentry.pageload.span_id'] = parentSpan.spanContext().spanId;\n }\n\n if (reportEvent) {\n attributes[`browser.web_vital.${metricName}.report_event`] = reportEvent;\n }\n\n const span = startInactiveSpan({\n name,\n attributes,\n startTime,\n // if we have a pageload span, we let the web vital span start as its parent. This ensures that\n // it is not started as a segment span, without having to manually set it to a \"standalone\" v2 span\n // that has `segment: false` but no actual parent span.\n parentSpan: parentSpan,\n });\n\n if (span) {\n span.end(endTime ?? startTime);\n }\n}\n\n/**\n * Tracks LCP as a streamed span.\n */\nexport function trackLcpAsSpan(client: Client): void {\n let lcpValue = 0;\n let lcpEntry: LargestContentfulPaint | undefined;\n\n if (!supportsWebVital('largest-contentful-paint')) {\n return;\n }\n\n const cleanupLcpHandler = addLcpInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1] as LargestContentfulPaint | undefined;\n if (!entry || !isValidLcpMetric(metric.value)) {\n return;\n }\n lcpValue = metric.value;\n lcpEntry = entry;\n }, true);\n\n listenForWebVitalReportEvents(client, (reportEvent, _, pageloadSpan) => {\n _sendLcpSpan(lcpValue, lcpEntry, pageloadSpan, reportEvent);\n cleanupLcpHandler();\n });\n}\n\n/**\n * Exported only for testing.\n */\nexport function _sendLcpSpan(\n lcpValue: number,\n entry: LargestContentfulPaint | undefined,\n pageloadSpan?: Span,\n reportEvent?: WebVitalReportEvent,\n): void {\n if (!isValidLcpMetric(lcpValue)) {\n return;\n }\n\n DEBUG_BUILD && debug.log(`Sending LCP span (${lcpValue})`);\n\n const performanceTimeOrigin = browserPerformanceTimeOrigin() || 0;\n const timeOrigin = msToSec(performanceTimeOrigin);\n const endTime = msToSec(performanceTimeOrigin + (entry?.startTime || 0));\n const name = entry ? htmlTreeAsString(entry.element) : 'Largest contentful paint';\n\n const attributes: SpanAttributes = {};\n\n entry?.element && (attributes['browser.web_vital.lcp.element'] = htmlTreeAsString(entry.element));\n entry?.id && (attributes['browser.web_vital.lcp.id'] = entry.id);\n entry?.url && (attributes['browser.web_vital.lcp.url'] = entry.url);\n entry?.loadTime != null && (attributes['browser.web_vital.lcp.load_time'] = entry.loadTime);\n entry?.renderTime != null && (attributes['browser.web_vital.lcp.render_time'] = entry.renderTime);\n entry?.size != null && (attributes['browser.web_vital.lcp.size'] = entry.size);\n\n _emitWebVitalSpan({\n name,\n op: 'ui.webvital.lcp',\n origin: 'auto.http.browser.lcp',\n metricName: 'lcp',\n value: lcpValue,\n attributes,\n parentSpan: pageloadSpan,\n reportEvent,\n startTime: timeOrigin,\n endTime,\n });\n}\n\n/**\n * Tracks CLS as a streamed span.\n */\nexport function trackClsAsSpan(client: Client): void {\n let clsValue = 0;\n let clsEntry: LayoutShift | undefined;\n\n if (!supportsWebVital('layout-shift')) {\n return;\n }\n\n const cleanupClsHandler = addClsInstrumentationHandler(({ metric }) => {\n const entry = metric.entries[metric.entries.length - 1] as LayoutShift | undefined;\n if (!entry) {\n return;\n }\n clsValue = metric.value;\n clsEntry = entry;\n }, true);\n\n listenForWebVitalReportEvents(client, (reportEvent, _, pageloadSpan) => {\n _sendClsSpan(clsValue, clsEntry, pageloadSpan, reportEvent);\n cleanupClsHandler();\n });\n}\n\n/**\n * Exported only for testing.\n */\nexport function _sendClsSpan(\n clsValue: number,\n entry: LayoutShift | undefined,\n pageloadSpan?: Span,\n reportEvent?: WebVitalReportEvent,\n): void {\n DEBUG_BUILD && debug.log(`Sending CLS span (${clsValue})`);\n\n const startTime = entry ? msToSec((browserPerformanceTimeOrigin() || 0) + entry.startTime) : timestampInSeconds();\n const name = entry ? htmlTreeAsString(entry.sources[0]?.node) : 'Layout shift';\n\n const attributes: SpanAttributes = {};\n\n if (entry?.sources) {\n entry.sources.forEach((source, index) => {\n attributes[`browser.web_vital.cls.source.${index + 1}`] = htmlTreeAsString(source.node);\n });\n }\n\n _emitWebVitalSpan({\n name,\n op: 'ui.webvital.cls',\n origin: 'auto.http.browser.cls',\n metricName: 'cls',\n value: clsValue,\n attributes,\n parentSpan: pageloadSpan,\n reportEvent,\n startTime,\n });\n}\n\n/**\n * Tracks INP as a streamed span.\n *\n * This mirrors the standalone INP tracking logic (`startTrackingINP`) but emits\n * spans through the streaming pipeline instead of as standalone spans.\n * Requires `registerInpInteractionListener()` to be called separately for\n * cached element names and root spans per interaction.\n */\nexport function trackInpAsSpan(): void {\n const performance = getBrowserPerformanceAPI();\n if (!performance || !browserPerformanceTimeOrigin()) {\n return;\n }\n\n const onInp: InstrumentationHandlerCallback = ({ metric }) => {\n if (metric.value == null) {\n return;\n }\n\n const duration = msToSec(metric.value);\n\n if (duration > MAX_PLAUSIBLE_INP_DURATION) {\n return;\n }\n\n const entry = metric.entries.find(e => e.duration === metric.value && INP_ENTRY_MAP[e.name]);\n\n if (!entry) {\n return;\n }\n\n _sendInpSpan(metric.value, entry);\n };\n\n addInpInstrumentationHandler(onInp);\n}\n\n/**\n * Exported only for testing.\n */\nexport function _sendInpSpan(inpValue: number, entry: PerformanceEventTiming): void {\n DEBUG_BUILD && debug.log(`Sending INP span (${inpValue})`);\n\n const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n const duration = msToSec(inpValue);\n const interactionType = INP_ENTRY_MAP[entry.name];\n\n const cachedContext = getCachedInteractionContext(entry.interactionId);\n const activeSpan = getActiveSpan();\n const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined;\n\n const spanToUse = cachedContext?.span || rootSpan;\n const routeName = spanToUse\n ? spanToStreamedSpanJSON(spanToUse).name\n : getCurrentScope().getScopeData().transactionName;\n const name = cachedContext?.elementName || htmlTreeAsString(entry.target);\n\n _emitWebVitalSpan({\n name,\n op: `ui.interaction.${interactionType}`,\n origin: 'auto.http.browser.inp',\n metricName: 'inp',\n value: inpValue,\n attributes: {\n [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry.duration,\n // oxlint-disable-next-line typescript-eslint/no-deprecated\n [SENTRY_TRANSACTION]: routeName,\n [SENTRY_SEGMENT_NAME]: routeName,\n },\n startTime,\n endTime: startTime + duration,\n parentSpan: spanToUse,\n });\n}\n"],"names":[],"mappings":";;;;;;;;;;AA6DO,SAAS,kBAAkB,OAAA,EAAoC;AACpE,EAAA,MAAM;AAAA,IACJ,IAAA;AAAA,IACA,EAAA;AAAA,IACA,MAAA;AAAA,IACA,UAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA,EAAY,gBAAA;AAAA,IACZ,UAAA;AAAA,IACA,WAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACF,GAAI,OAAA;AAEJ,EAAA,MAAM,SAAA,GAAY,eAAA,EAAgB,CAAE,YAAA,EAAa,CAAE,eAAA;AAEnD,EAAA,MAAM,UAAA,GAA6B;AAAA,IACjC,CAAC,gCAAgC,GAAG,MAAA;AAAA,IACpC,CAAC,4BAA4B,GAAG,EAAA;AAAA,IAChC,CAAC,iCAAiC,GAAG,CAAA;AAAA,IACrC,CAAC,CAAA,kBAAA,EAAqB,UAAU,CAAA,MAAA,CAAQ,GAAG,KAAA;AAAA;AAAA,IAE3C,CAAC,kBAAkB,GAAG,SAAA;AAAA,IACtB,CAAC,mBAAmB,GAAG,SAAA;AAAA;AAAA,IAEvB,qBAAA,EAAuB,OAAO,SAAA,EAAW,SAAA;AAAA,IACzC,GAAG;AAAA,GACL;AAEA,EAAA,I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ACP,UAAA,EAAY;AAAA,MACV,CAAC,iCAAiC,GAAG,KAAA,CAAM,QAAA;AAAA;AAAA,MAE3C,CAAC,kBAAkB,GAAG,SAAA;AAAA,MACtB,CAAC,mBAAmB,GAAG;AAAA,KACzB;AAAA,IACA,SAAA;AAAA,IACA,SAAS,SAAA,GAAY,QAAA;AAAA,IACrB,UAAA,EAAY;AAAA,GACb,CAAA;AACH;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/instrument/dom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAiCnD;;;;;GAKG;AACH,wBAAgB,sCAAsC,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI,CAIpG;AAED,+BAA+B;AAC/B,wBAAgB,aAAa,IAAI,IAAI,CAuFpC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../src/instrument/history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAMvD;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,IAAI,GAAG,IAAI,CAIlG;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAmDxC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../src/instrument/location.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAQxD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xhr.d.ts","sourceRoot":"","sources":["../../../src/instrument/xhr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAA+B,MAAM,cAAc,CAAC;AAIhF,eAAO,MAAM,mBAAmB,sBAAsB,CAAC;AAIvD;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI,CAI1F;AAED,+BAA+B;AAC/B,wBAAgB,aAAa,IAAI,IAAI,CA0IpC"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import type { 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: [keyof PerformanceResourceTiming | ExperimentalResourceTimingProperty, string][]): void;
|
|
116
|
-
//# sourceMappingURL=browserMetrics.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browserMetrics.d.ts","sourceRoot":"","sources":["../../../src/metrics/browserMetrics.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAgB,IAAI,EAAE,cAAc,EAAwC,MAAM,cAAc,CAAC;AA6ErH,UAAU,6BAA6B;IACrC;;;;OAIG;IACH,wBAAwB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9C;;;;OAIG;IACH,wBAAwB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9C,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,wBAAwB,EACxB,wBAAwB,EACxB,MAAM,GACP,EAAE,6BAA6B,GAAG,MAAM,IAAI,CAgC5C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CA8B7C;AAED;;GAEG;AACH,wBAAgB,gCAAgC,IAAI,IAAI,CAsDvD;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CA6BhD;AAED,OAAO,EAAE,8BAA8B,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AA0DzE,UAAU,4BAA4B;IACpC;;;;OAIG;IACH,mBAAmB,EAAE,KAAK,CAAC,gBAAgB,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GACnC,sBAAsB,GACtB,cAAc,GAKd,gBAAgB,CAAC;AAErB;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,kCAAkC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,EAChH,UAAU,EAAE,cAAc,EAC1B,UAAU,EAAE,CAAC,MAAM,yBAAyB,GAAG,kCAAkC,EAAE,MAAM,CAAC,EAAE,GAC3F,IAAI,CAUN"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Client } from '@sentry/core';
|
|
2
|
-
import type { 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cls.d.ts","sourceRoot":"","sources":["../../../src/metrics/cls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,cAAc,CAAC;AAe3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGnD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAqB7D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,WAAW,GAAG,SAAS,EAC9B,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,mBAAmB,QA4CjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"elementTiming.d.ts","sourceRoot":"","sources":["../../../src/metrics/elementTiming.ts"],"names":[],"mappings":"AA0FA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB;;CAA+C,CAAC;AAErF;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,IAAI,CAEvD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inp.d.ts","sourceRoot":"","sources":["../../../src/metrics/inp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAgBzD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAQnE,UAAU,kBAAkB;IAC1B,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAQD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,IAAI,CAW7C;AAED,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CA2B9E,CAAC;AAEF;;GAEG;AACH,wBAAgB,SAAS,IAAI,MAAM,IAAI,CAEtC;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,8BA4DpB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,kBAAkB,GAAG,SAAS,CAE7G;AAED;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,IAAI,CA6FrD"}
|
|
@@ -1 +0,0 @@
|
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AAsB,CAAC,EAAE,CAAA;CAAE,KAAK,IAAI,GACnH,sBAAsB,CAAC;AAC1B,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,wCAAwC,EAC9C,QAAQ,EAAE,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,gBAAgB,EAAE,CAAA;CAAE,KAAK,IAAI,GACxD,sBAAsB,CAAC;AA6J1B;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,gBAAgB,GAAG,KAAK,IAAI,sBAAsB,CAEjG"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Client } from '@sentry/core';
|
|
2
|
-
import type { 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lcp.d.ts","sourceRoot":"","sources":["../../../src/metrics/lcp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,cAAc,CAAC;AAc3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGnD;;GAEG;AACH,eAAO,MAAM,0BAA0B,QAAS,CAAC;AAEjD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,IAAI,MAAM,CAEjF;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAqB7D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,sBAAsB,GAAG,SAAS,EACzC,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,mBAAmB,QAwDjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourceTiming.d.ts","sourceRoot":"","sources":["../../../src/metrics/resourceTiming.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAUnD;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAAC,cAAc,EAAE,yBAAyB,GAAG,cAAc,CA0CxG"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import type { 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/metrics/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAGN,IAAI,EACJ,cAAc,EACd,aAAa,EACb,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAKtB,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,YAAY,CAAC;AAE5D;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAElE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,IAAI,EAChB,kBAAkB,EAAE,MAAM,EAC1B,OAAO,EAAE,aAAa,EACtB,EAAE,GAAG,GAAG,EAAE,EAAE,gBAAgB,GAC3B,IAAI,GAAG,SAAS,CAsBlB;AAED,UAAU,6BAA6B;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,cAAc,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,6BAA6B,GAAG,IAAI,GAAG,SAAS,CAyDpG;AAED,uCAAuC;AACvC,wBAAgB,wBAAwB,IAAI,WAAW,GAAG,SAAS,CAGlE;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAuBjG;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,cAAc,GAAG,0BAA0B,GAAG,OAAO,CAMhG;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,CAAC,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,IAAI,KAAK,IAAI,QA8BrG"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getCLS.d.ts","sourceRoot":"","sources":["../../../../src/metrics/web-vitals/getCLS.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7E,oFAAoF;AACpF,eAAO,MAAM,aAAa,EAAE,sBAAoC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,KAAK,GAAI,UAAU,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,EAAE,OAAM,UAAe,SAyCjF,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getINP.d.ts","sourceRoot":"","sources":["../../../../src/metrics/web-vitals/getINP.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEhF,oFAAoF;AACpF,eAAO,MAAM,aAAa,EAAE,sBAAmC,CAAC;AAMhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,KAAK,GAAI,UAAU,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,EAAE,OAAM,aAAkB,SA+DpF,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { 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
|