@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,61 +1,30 @@
|
|
|
1
|
-
import { browserPerformanceTimeOrigin, spanToJSON,
|
|
1
|
+
import { browserPerformanceTimeOrigin, spanToJSON, getActiveSpan, parseUrl, filterCollectedUrl, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, setMeasurement, getComponentName } from '@sentry/core';
|
|
2
|
+
import { SENTRY_OP, URL_FULL } from '@sentry/conventions/attributes';
|
|
3
|
+
import { BROWSER_BROWSER_PAINT_SPAN_OP } from '@sentry/conventions/op';
|
|
2
4
|
import { htmlTreeAsString } from '../htmlTreeAsString.js';
|
|
5
|
+
import { addPerformanceInstrumentationHandler } from '../instrumentation/performanceObserver.js';
|
|
3
6
|
import { WINDOW } from '../types.js';
|
|
4
|
-
import { trackClsAsStandaloneSpan } from './cls.js';
|
|
5
|
-
import { addPerformanceInstrumentationHandler, addLcpInstrumentationHandler, addClsInstrumentationHandler, addTtfbInstrumentationHandler } from './instrument.js';
|
|
6
|
-
import { trackLcpAsStandaloneSpan, isValidLcpMetric } from './lcp.js';
|
|
7
7
|
import { resourceTimingToSpanAttributes } from './resourceTiming.js';
|
|
8
8
|
import { getBrowserPerformanceAPI, msToSec, startAndEndSpan, isMeasurementValue } from './utils.js';
|
|
9
|
-
import { getActivationStart } from './web-vitals/lib/getActivationStart.js';
|
|
10
|
-
import { getNavigationEntry } from './web-vitals/lib/getNavigationEntry.js';
|
|
11
|
-
import { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher.js';
|
|
12
|
-
import { DEBUG_BUILD } from '../debug-build.js';
|
|
13
|
-
import { URL_FULL } from '@sentry/conventions/attributes';
|
|
14
9
|
|
|
15
10
|
const MAX_INT_AS_BYTES = 2147483647;
|
|
16
11
|
let _performanceCursor = 0;
|
|
17
|
-
let _measurements = {};
|
|
18
|
-
let _lcpEntry;
|
|
19
|
-
let _clsEntry;
|
|
20
|
-
function startTrackingWebVitals({
|
|
21
|
-
recordClsStandaloneSpans,
|
|
22
|
-
recordLcpStandaloneSpans,
|
|
23
|
-
client
|
|
24
|
-
}) {
|
|
25
|
-
const performance = getBrowserPerformanceAPI();
|
|
26
|
-
if (performance && browserPerformanceTimeOrigin()) {
|
|
27
|
-
if (performance.mark) {
|
|
28
|
-
WINDOW.performance.mark("sentry-tracing-init");
|
|
29
|
-
}
|
|
30
|
-
const lcpCleanupCallback = recordLcpStandaloneSpans ? trackLcpAsStandaloneSpan(client) : recordLcpStandaloneSpans === false ? _trackLCP() : void 0;
|
|
31
|
-
const clsCleanupCallback = recordClsStandaloneSpans ? trackClsAsStandaloneSpan(client) : recordClsStandaloneSpans === false ? _trackCLS() : void 0;
|
|
32
|
-
const ttfbCleanupCallback = _trackTtfb();
|
|
33
|
-
const fpFcpCleanupCallback = _trackFpFcp();
|
|
34
|
-
return () => {
|
|
35
|
-
ttfbCleanupCallback();
|
|
36
|
-
fpFcpCleanupCallback();
|
|
37
|
-
lcpCleanupCallback?.();
|
|
38
|
-
clsCleanupCallback?.();
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
return () => void 0;
|
|
42
|
-
}
|
|
43
12
|
function startTrackingLongTasks() {
|
|
44
13
|
addPerformanceInstrumentationHandler("longtask", ({ entries }) => {
|
|
45
14
|
const parent = getActiveSpan();
|
|
46
15
|
if (!parent) {
|
|
47
16
|
return;
|
|
48
17
|
}
|
|
49
|
-
const {
|
|
18
|
+
const { attributes: parentAttributes, start_timestamp: parentStartTimestamp } = spanToJSON(parent);
|
|
50
19
|
for (const entry of entries) {
|
|
51
20
|
const startTime = msToSec(browserPerformanceTimeOrigin() + entry.startTime);
|
|
52
21
|
const duration = msToSec(entry.duration);
|
|
53
|
-
if (
|
|
22
|
+
if (parentAttributes[SENTRY_OP] === "navigation" && parentStartTimestamp && startTime < parentStartTimestamp) {
|
|
54
23
|
continue;
|
|
55
24
|
}
|
|
56
25
|
startAndEndSpan(parent, startTime, startTime + duration, {
|
|
57
26
|
name: "Main UI thread blocked",
|
|
58
|
-
op: "ui.
|
|
27
|
+
op: "ui.long_task",
|
|
59
28
|
attributes: {
|
|
60
29
|
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.browser.metrics"
|
|
61
30
|
}
|
|
@@ -74,7 +43,10 @@ function startTrackingLongAnimationFrames() {
|
|
|
74
43
|
continue;
|
|
75
44
|
}
|
|
76
45
|
const startTime = msToSec(browserPerformanceTimeOrigin() + entry.startTime);
|
|
77
|
-
const {
|
|
46
|
+
const {
|
|
47
|
+
start_timestamp: parentStartTimestamp,
|
|
48
|
+
attributes: { [SENTRY_OP]: parentOp }
|
|
49
|
+
} = spanToJSON(parent);
|
|
78
50
|
if (parentOp === "navigation" && parentStartTimestamp && startTime < parentStartTimestamp) {
|
|
79
51
|
continue;
|
|
80
52
|
}
|
|
@@ -97,7 +69,7 @@ function startTrackingLongAnimationFrames() {
|
|
|
97
69
|
}
|
|
98
70
|
startAndEndSpan(parent, startTime, startTime + duration, {
|
|
99
71
|
name: "Main UI thread blocked",
|
|
100
|
-
op: "ui.
|
|
72
|
+
op: "ui.long_animation_frame",
|
|
101
73
|
attributes
|
|
102
74
|
});
|
|
103
75
|
}
|
|
@@ -131,59 +103,16 @@ function startTrackingInteractions() {
|
|
|
131
103
|
}
|
|
132
104
|
});
|
|
133
105
|
}
|
|
134
|
-
function _trackCLS() {
|
|
135
|
-
return addClsInstrumentationHandler(({ metric }) => {
|
|
136
|
-
const entry = metric.entries[metric.entries.length - 1];
|
|
137
|
-
if (!entry) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
_measurements["cls"] = { value: metric.value, unit: "" };
|
|
141
|
-
_clsEntry = entry;
|
|
142
|
-
}, true);
|
|
143
|
-
}
|
|
144
|
-
function _trackLCP() {
|
|
145
|
-
return addLcpInstrumentationHandler(({ metric }) => {
|
|
146
|
-
const entry = metric.entries[metric.entries.length - 1];
|
|
147
|
-
if (!entry || !isValidLcpMetric(metric.value)) {
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
_measurements["lcp"] = { value: metric.value, unit: "millisecond" };
|
|
151
|
-
_lcpEntry = entry;
|
|
152
|
-
}, true);
|
|
153
|
-
}
|
|
154
|
-
function _trackTtfb() {
|
|
155
|
-
return addTtfbInstrumentationHandler(({ metric }) => {
|
|
156
|
-
const entry = metric.entries[metric.entries.length - 1];
|
|
157
|
-
if (!entry) {
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
_measurements["ttfb"] = { value: metric.value, unit: "millisecond" };
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
function _trackFpFcp() {
|
|
164
|
-
return addPerformanceInstrumentationHandler("paint", ({ entries }) => {
|
|
165
|
-
const firstHidden = getVisibilityWatcher();
|
|
166
|
-
for (const entry of entries) {
|
|
167
|
-
const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;
|
|
168
|
-
if (entry.name === "first-paint" && shouldRecord) {
|
|
169
|
-
_measurements["fp"] = { value: entry.startTime, unit: "millisecond" };
|
|
170
|
-
}
|
|
171
|
-
if (entry.name === "first-contentful-paint" && shouldRecord) {
|
|
172
|
-
_measurements["fcp"] = { value: entry.startTime, unit: "millisecond" };
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
106
|
function addPerformanceEntries(span, options) {
|
|
178
107
|
const performance = getBrowserPerformanceAPI();
|
|
179
108
|
const origin = browserPerformanceTimeOrigin();
|
|
180
109
|
if (!performance?.getEntries || !origin) {
|
|
181
110
|
return;
|
|
182
111
|
}
|
|
183
|
-
const { spanStreamingEnabled,
|
|
112
|
+
const { spanStreamingEnabled, ignoreResourceSpans } = options;
|
|
184
113
|
const timeOrigin = msToSec(origin);
|
|
185
114
|
const performanceEntries = performance.getEntries();
|
|
186
|
-
const {
|
|
115
|
+
const { attributes, start_timestamp: transactionStartTime } = spanToJSON(span);
|
|
187
116
|
performanceEntries.slice(_performanceCursor).forEach((entry) => {
|
|
188
117
|
const startTime = msToSec(entry.startTime);
|
|
189
118
|
const duration = msToSec(
|
|
@@ -193,7 +122,7 @@ function addPerformanceEntries(span, options) {
|
|
|
193
122
|
// TODO: Investigate why this happens and how to properly mitigate. For now, this is a workaround to prevent transactions being dropped due to negative duration spans.
|
|
194
123
|
Math.max(0, entry.duration)
|
|
195
124
|
);
|
|
196
|
-
if (
|
|
125
|
+
if (attributes[SENTRY_OP] === "navigation" && transactionStartTime && timeOrigin + startTime < transactionStartTime) {
|
|
197
126
|
return;
|
|
198
127
|
}
|
|
199
128
|
switch (entry.entryType) {
|
|
@@ -201,10 +130,8 @@ function addPerformanceEntries(span, options) {
|
|
|
201
130
|
_addNavigationSpans(span, entry, timeOrigin);
|
|
202
131
|
break;
|
|
203
132
|
}
|
|
204
|
-
case "
|
|
205
|
-
|
|
206
|
-
case "measure": {
|
|
207
|
-
_addMeasureSpans(span, entry, startTime, duration, timeOrigin, ignorePerformanceApiSpans);
|
|
133
|
+
case "paint": {
|
|
134
|
+
_addPaintSpan(span, entry, startTime, duration, timeOrigin);
|
|
208
135
|
break;
|
|
209
136
|
}
|
|
210
137
|
case "resource": {
|
|
@@ -224,130 +151,25 @@ function addPerformanceEntries(span, options) {
|
|
|
224
151
|
_performanceCursor = Math.max(performanceEntries.length - 1, 0);
|
|
225
152
|
_trackNavigator(span, spanStreamingEnabled);
|
|
226
153
|
}
|
|
227
|
-
function
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
const timeOrigin = msToSec(origin);
|
|
235
|
-
if (spanToJSON(span).op === "pageload") {
|
|
236
|
-
_addTtfbRequestTimeToMeasurements(_measurements);
|
|
237
|
-
if (spanStreamingEnabled) {
|
|
238
|
-
const setAttr = (shortWebVitalName, value, customAttrName) => {
|
|
239
|
-
const attrKey = customAttrName ?? `browser.web_vital.${shortWebVitalName}.value`;
|
|
240
|
-
span.setAttribute(attrKey, value);
|
|
241
|
-
DEBUG_BUILD && debug.log("Setting web vital attribute", { [attrKey]: value }, "on pageload span");
|
|
242
|
-
};
|
|
243
|
-
["ttfb", "fp", "fcp"].forEach((measurementName) => {
|
|
244
|
-
if (_measurements[measurementName]) {
|
|
245
|
-
setAttr(measurementName, _measurements[measurementName].value);
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
if (_measurements["ttfb.requestTime"]) {
|
|
249
|
-
setAttr("ttfb.requestTime", _measurements["ttfb.requestTime"].value, "browser.web_vital.ttfb.request_time");
|
|
250
|
-
}
|
|
251
|
-
} else {
|
|
252
|
-
if (!recordClsOnPageloadSpan) {
|
|
253
|
-
delete _measurements.cls;
|
|
254
|
-
}
|
|
255
|
-
if (!recordLcpOnPageloadSpan) {
|
|
256
|
-
delete _measurements.lcp;
|
|
257
|
-
}
|
|
258
|
-
Object.entries(_measurements).forEach(([measurementName, measurement]) => {
|
|
259
|
-
setMeasurement(measurementName, measurement.value, measurement.unit, span);
|
|
260
|
-
});
|
|
261
|
-
_setWebVitalAttributes(span, options);
|
|
262
|
-
}
|
|
263
|
-
span.setAttribute(spanStreamingEnabled ? "browser.performance.time_origin" : "performance.timeOrigin", timeOrigin);
|
|
264
|
-
span.setAttribute(
|
|
265
|
-
spanStreamingEnabled ? "browser.performance.navigation.activation_start" : "performance.activationStart",
|
|
266
|
-
getActivationStart()
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
resetWebVitalState();
|
|
270
|
-
}
|
|
271
|
-
function resetWebVitalState() {
|
|
272
|
-
_lcpEntry = void 0;
|
|
273
|
-
_clsEntry = void 0;
|
|
274
|
-
_measurements = {};
|
|
275
|
-
}
|
|
276
|
-
function isReact19MeasureEntry(entry) {
|
|
277
|
-
if (entry?.entryType !== "measure") {
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
try {
|
|
281
|
-
return entry.detail.devtools.track === "Components \u269B";
|
|
282
|
-
} catch {
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
function _addMeasureSpans(span, entry, startTime, duration, timeOrigin, ignorePerformanceApiSpans) {
|
|
287
|
-
if (isReact19MeasureEntry(entry)) {
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
if (["mark", "measure"].includes(entry.entryType) && stringMatchesSomePattern(entry.name, ignorePerformanceApiSpans)) {
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
const navEntry = getNavigationEntry(false);
|
|
294
|
-
const requestTime = msToSec(navEntry ? navEntry.requestStart : 0);
|
|
295
|
-
const measureStartTimestamp = timeOrigin + Math.max(startTime, requestTime);
|
|
296
|
-
const startTimeStamp = timeOrigin + startTime;
|
|
297
|
-
const measureEndTimestamp = startTimeStamp + duration;
|
|
298
|
-
const attributes = {
|
|
299
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.resource.browser.metrics"
|
|
300
|
-
};
|
|
301
|
-
if (measureStartTimestamp !== startTimeStamp) {
|
|
302
|
-
attributes["sentry.browser.measure_happened_before_request"] = true;
|
|
303
|
-
attributes["sentry.browser.measure_start_time"] = measureStartTimestamp;
|
|
304
|
-
}
|
|
305
|
-
_addDetailToSpanAttributes(attributes, entry);
|
|
306
|
-
if (measureStartTimestamp <= measureEndTimestamp) {
|
|
307
|
-
startAndEndSpan(span, measureStartTimestamp, measureEndTimestamp, {
|
|
308
|
-
name: entry.name,
|
|
309
|
-
op: entry.entryType,
|
|
310
|
-
attributes
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
function _addDetailToSpanAttributes(attributes, performanceMeasure) {
|
|
315
|
-
try {
|
|
316
|
-
const detail = performanceMeasure.detail;
|
|
317
|
-
if (!detail) {
|
|
318
|
-
return;
|
|
319
|
-
}
|
|
320
|
-
if (typeof detail === "object") {
|
|
321
|
-
for (const [key, value] of Object.entries(detail)) {
|
|
322
|
-
if (value && isPrimitive(value)) {
|
|
323
|
-
attributes[`sentry.browser.measure.detail.${key}`] = value;
|
|
324
|
-
} else if (value !== void 0) {
|
|
325
|
-
try {
|
|
326
|
-
attributes[`sentry.browser.measure.detail.${key}`] = JSON.stringify(value);
|
|
327
|
-
} catch {
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
if (isPrimitive(detail)) {
|
|
334
|
-
attributes["sentry.browser.measure.detail"] = detail;
|
|
335
|
-
return;
|
|
336
|
-
}
|
|
337
|
-
try {
|
|
338
|
-
attributes["sentry.browser.measure.detail"] = JSON.stringify(detail);
|
|
339
|
-
} catch {
|
|
154
|
+
function _addPaintSpan(span, entry, startTime, duration, timeOrigin) {
|
|
155
|
+
const startTimestamp = timeOrigin + startTime;
|
|
156
|
+
startAndEndSpan(span, startTimestamp, startTimestamp + duration, {
|
|
157
|
+
name: entry.name,
|
|
158
|
+
attributes: {
|
|
159
|
+
[SENTRY_OP]: BROWSER_BROWSER_PAINT_SPAN_OP,
|
|
160
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.resource.browser.metrics"
|
|
340
161
|
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
162
|
+
});
|
|
343
163
|
}
|
|
344
164
|
function _addNavigationSpans(span, entry, timeOrigin) {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
_addPerformanceNavigationTiming(span, entry, "
|
|
165
|
+
_addPerformanceNavigationTiming(span, entry, "unloadEvent", timeOrigin, "unload_event");
|
|
166
|
+
_addPerformanceNavigationTiming(span, entry, "redirect", timeOrigin, "redirect");
|
|
167
|
+
_addPerformanceNavigationTiming(span, entry, "domContentLoadedEvent", timeOrigin, "dom_content_loaded_event");
|
|
168
|
+
_addPerformanceNavigationTiming(span, entry, "loadEvent", timeOrigin, "load_event");
|
|
169
|
+
_addPerformanceNavigationTiming(span, entry, "connect", timeOrigin, "connect");
|
|
170
|
+
_addPerformanceNavigationTiming(span, entry, "secureConnection", timeOrigin, "tls_ssl");
|
|
349
171
|
_addPerformanceNavigationTiming(span, entry, "fetch", timeOrigin, "cache");
|
|
350
|
-
_addPerformanceNavigationTiming(span, entry, "domainLookup", timeOrigin, "
|
|
172
|
+
_addPerformanceNavigationTiming(span, entry, "domainLookup", timeOrigin, "dns");
|
|
351
173
|
_addRequest(span, entry, timeOrigin);
|
|
352
174
|
}
|
|
353
175
|
function _addPerformanceNavigationTiming(span, entry, event, timeOrigin, name = event) {
|
|
@@ -415,7 +237,7 @@ function _addResourceSpans(span, entry, resourceUrl, startTime, duration, timeOr
|
|
|
415
237
|
attributes["server.address"] = parsedUrl.host;
|
|
416
238
|
}
|
|
417
239
|
attributes["url.same_origin"] = resourceUrl.includes(WINDOW.location.origin);
|
|
418
|
-
attributes[URL_FULL] = resourceUrl;
|
|
240
|
+
attributes[URL_FULL] = filterCollectedUrl(resourceUrl);
|
|
419
241
|
_setResourceRequestAttributes(entry, attributes, [
|
|
420
242
|
// https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStatus
|
|
421
243
|
["responseStatus", "http.response.status_code"],
|
|
@@ -455,7 +277,7 @@ function _trackNavigator(span, spanStreamingEnabled) {
|
|
|
455
277
|
if (isMeasurementValue(connection.rtt)) {
|
|
456
278
|
if (spanStreamingEnabled) {
|
|
457
279
|
span.setAttribute("network.connection.rtt", connection.rtt);
|
|
458
|
-
} else if (spanToJSON(span).
|
|
280
|
+
} else if (spanToJSON(span).attributes[SENTRY_OP] === "pageload") {
|
|
459
281
|
setMeasurement("connection.rtt", connection.rtt, "millisecond");
|
|
460
282
|
}
|
|
461
283
|
}
|
|
@@ -475,31 +297,6 @@ function _trackNavigator(span, spanStreamingEnabled) {
|
|
|
475
297
|
}
|
|
476
298
|
}
|
|
477
299
|
}
|
|
478
|
-
function _setWebVitalAttributes(span, options) {
|
|
479
|
-
if (_lcpEntry && options.recordLcpOnPageloadSpan) {
|
|
480
|
-
if (_lcpEntry.element) {
|
|
481
|
-
span.setAttribute("lcp.element", htmlTreeAsString(_lcpEntry.element));
|
|
482
|
-
}
|
|
483
|
-
if (_lcpEntry.id) {
|
|
484
|
-
span.setAttribute("lcp.id", _lcpEntry.id);
|
|
485
|
-
}
|
|
486
|
-
if (_lcpEntry.url) {
|
|
487
|
-
span.setAttribute("lcp.url", _lcpEntry.url.trim().slice(0, 200));
|
|
488
|
-
}
|
|
489
|
-
if (_lcpEntry.loadTime != null) {
|
|
490
|
-
span.setAttribute("lcp.loadTime", _lcpEntry.loadTime);
|
|
491
|
-
}
|
|
492
|
-
if (_lcpEntry.renderTime != null) {
|
|
493
|
-
span.setAttribute("lcp.renderTime", _lcpEntry.renderTime);
|
|
494
|
-
}
|
|
495
|
-
span.setAttribute("lcp.size", _lcpEntry.size);
|
|
496
|
-
}
|
|
497
|
-
if (_clsEntry?.sources && options.recordClsOnPageloadSpan) {
|
|
498
|
-
_clsEntry.sources.forEach(
|
|
499
|
-
(source, index) => span.setAttribute(`cls.source.${index + 1}`, htmlTreeAsString(source.node))
|
|
500
|
-
);
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
300
|
function _setResourceRequestAttributes(entry, attributes, properties) {
|
|
504
301
|
properties.forEach(([entryKey, attributeKey]) => {
|
|
505
302
|
const entryVal = entry[entryKey];
|
|
@@ -508,19 +305,6 @@ function _setResourceRequestAttributes(entry, attributes, properties) {
|
|
|
508
305
|
}
|
|
509
306
|
});
|
|
510
307
|
}
|
|
511
|
-
function _addTtfbRequestTimeToMeasurements(_measurements2) {
|
|
512
|
-
const navEntry = getNavigationEntry(false);
|
|
513
|
-
if (!navEntry) {
|
|
514
|
-
return;
|
|
515
|
-
}
|
|
516
|
-
const { responseStart, requestStart } = navEntry;
|
|
517
|
-
if (requestStart <= responseStart) {
|
|
518
|
-
_measurements2["ttfb.requestTime"] = {
|
|
519
|
-
value: responseStart - requestStart,
|
|
520
|
-
unit: "millisecond"
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
308
|
|
|
525
|
-
export {
|
|
526
|
-
//# sourceMappingURL=
|
|
309
|
+
export { _addNavigationSpans, _addResourceSpans, _setResourceRequestAttributes, addPerformanceEntries, startTrackingInteractions, startTrackingLongAnimationFrames, startTrackingLongTasks };
|
|
310
|
+
//# sourceMappingURL=entries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entries.js","sources":["../../../src/performance/entries.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport type { Span, SpanAttributes, StartSpanOptions } from '@sentry/core';\nimport {\n browserPerformanceTimeOrigin,\n getActiveSpan,\n getComponentName,\n parseUrl,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n setMeasurement,\n spanToJSON,\n filterCollectedUrl,\n} from '@sentry/core';\nimport { SENTRY_OP, URL_FULL } from '@sentry/conventions/attributes';\nimport { BROWSER_BROWSER_PAINT_SPAN_OP } from '@sentry/conventions/op';\nimport { htmlTreeAsString } from '../htmlTreeAsString';\nimport {\n addPerformanceInstrumentationHandler,\n type PerformanceLongAnimationFrameTiming,\n} from '../instrumentation/performanceObserver';\nimport { WINDOW } from '../types';\nimport { resourceTimingToSpanAttributes } from './resourceTiming';\nimport { getBrowserPerformanceAPI, isMeasurementValue, msToSec, startAndEndSpan } from './utils';\n\ninterface NavigatorNetworkInformation {\n readonly connection?: NetworkInformation;\n}\n\n// http://wicg.github.io/netinfo/#connection-types\ntype ConnectionType = 'bluetooth' | 'cellular' | 'ethernet' | 'mixed' | 'none' | 'other' | 'unknown' | 'wifi' | 'wimax';\n\n// http://wicg.github.io/netinfo/#effectiveconnectiontype-enum\ntype EffectiveConnectionType = '2g' | '3g' | '4g' | 'slow-2g';\n\n// http://wicg.github.io/netinfo/#dom-megabit\ntype Megabit = number;\n// http://wicg.github.io/netinfo/#dom-millisecond\ntype Millisecond = number;\n\n// http://wicg.github.io/netinfo/#networkinformation-interface\ninterface NetworkInformation extends EventTarget {\n // http://wicg.github.io/netinfo/#type-attribute\n readonly type?: ConnectionType;\n // http://wicg.github.io/netinfo/#effectivetype-attribute\n readonly effectiveType?: EffectiveConnectionType;\n // http://wicg.github.io/netinfo/#downlinkmax-attribute\n readonly downlinkMax?: Megabit;\n // http://wicg.github.io/netinfo/#downlink-attribute\n readonly downlink?: Megabit;\n // http://wicg.github.io/netinfo/#rtt-attribute\n readonly rtt?: Millisecond;\n // http://wicg.github.io/netinfo/#savedata-attribute\n readonly saveData?: boolean;\n // http://wicg.github.io/netinfo/#handling-changes-to-the-underlying-connection\n onchange?: EventListener;\n}\n\n// https://w3c.github.io/device-memory/#sec-device-memory-js-api\ninterface NavigatorDeviceMemory {\n readonly deviceMemory?: number;\n}\n\nconst MAX_INT_AS_BYTES = 2147483647;\n\nlet _performanceCursor: number = 0;\n\n/**\n * Start tracking long tasks.\n */\nexport function startTrackingLongTasks(): void {\n addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n const parent = getActiveSpan();\n if (!parent) {\n return;\n }\n\n const { attributes: parentAttributes, start_timestamp: parentStartTimestamp } = spanToJSON(parent);\n\n for (const entry of entries) {\n const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n if (parentAttributes[SENTRY_OP] === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n // Skip adding a span if the long task started before the navigation started.\n // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n // time, potentially skewing the duration of the actual navigation as reported via our\n // routing instrumentations\n continue;\n }\n\n startAndEndSpan(parent, startTime, startTime + duration, {\n name: 'Main UI thread blocked',\n op: 'ui.long_task',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n });\n }\n });\n}\n\n/**\n * Start tracking long animation frames.\n */\nexport function startTrackingLongAnimationFrames(): void {\n // NOTE: the current web-vitals version (3.5.2) does not support long-animation-frame, so\n // we directly observe `long-animation-frame` events instead of through the web-vitals\n // `observe` helper function.\n const observer = new PerformanceObserver(list => {\n const parent = getActiveSpan();\n if (!parent) {\n return;\n }\n for (const entry of list.getEntries() as PerformanceLongAnimationFrameTiming[]) {\n if (!entry.scripts[0]) {\n continue;\n }\n\n const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n\n const {\n start_timestamp: parentStartTimestamp,\n attributes: { [SENTRY_OP]: parentOp },\n } = spanToJSON(parent);\n\n if (parentOp === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n // Skip adding the span if the long animation frame started before the navigation started.\n // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n // time, potentially skewing the duration of the actual navigation as reported via our\n // routing instrumentations\n continue;\n }\n const duration = msToSec(entry.duration);\n\n const attributes: SpanAttributes = {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n };\n\n const initialScript = entry.scripts[0];\n const { invoker, invokerType, sourceURL, sourceFunctionName, sourceCharPosition } = initialScript;\n attributes['browser.script.invoker'] = invoker;\n attributes['browser.script.invoker_type'] = invokerType;\n if (sourceURL) {\n attributes['code.filepath'] = sourceURL;\n }\n if (sourceFunctionName) {\n attributes['code.function'] = sourceFunctionName;\n }\n if (sourceCharPosition !== -1) {\n attributes['browser.script.source_char_position'] = sourceCharPosition;\n }\n\n startAndEndSpan(parent, startTime, startTime + duration, {\n name: 'Main UI thread blocked',\n op: 'ui.long_animation_frame',\n attributes,\n });\n }\n });\n\n observer.observe({ type: 'long-animation-frame', buffered: true });\n}\n\n/**\n * Start tracking interaction events.\n */\nexport function startTrackingInteractions(): void {\n addPerformanceInstrumentationHandler('event', ({ entries }) => {\n const parent = getActiveSpan();\n if (!parent) {\n return;\n }\n for (const entry of entries) {\n if (entry.name === 'click') {\n const startTime = msToSec((browserPerformanceTimeOrigin() as number) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n const spanOptions: StartSpanOptions & Required<Pick<StartSpanOptions, 'attributes'>> = {\n name: htmlTreeAsString(entry.target),\n op: `ui.interaction.${entry.name}`,\n startTime: startTime,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n };\n\n const componentName = getComponentName(entry.target);\n if (componentName) {\n spanOptions.attributes['ui.component_name'] = componentName;\n }\n\n startAndEndSpan(parent, startTime, startTime + duration, spanOptions);\n }\n }\n });\n}\n\ninterface AddPerformanceEntriesOptions {\n /**\n * Resource spans with `op`s matching strings in the array will not be emitted.\n *\n * Default: []\n */\n ignoreResourceSpans: Array<'resource.script' | 'resource.css' | 'resource.img' | 'resource.other' | string>;\n\n /**\n * Whether span streaming is enabled.\n */\n spanStreamingEnabled?: boolean;\n}\n\n/** Add performance related spans to a transaction */\nexport function addPerformanceEntries(span: Span, options: AddPerformanceEntriesOptions): void {\n const performance = getBrowserPerformanceAPI();\n const origin = browserPerformanceTimeOrigin();\n if (!performance?.getEntries || !origin) {\n // Gatekeeper if performance API not available\n return;\n }\n\n const { spanStreamingEnabled, ignoreResourceSpans } = options;\n\n const timeOrigin = msToSec(origin);\n\n const performanceEntries = performance.getEntries();\n\n const { attributes, start_timestamp: transactionStartTime } = spanToJSON(span);\n\n performanceEntries.slice(_performanceCursor).forEach(entry => {\n const startTime = msToSec(entry.startTime);\n const duration = msToSec(\n // Inexplicably, Chrome sometimes emits a negative duration. We need to work around this.\n // There is a SO post attempting to explain this, but it leaves one with open questions: https://stackoverflow.com/questions/23191918/peformance-getentries-and-negative-duration-display\n // The way we clamp the value is probably not accurate, since we have observed this happen for things that may take a while to load, like for example the replay worker.\n // TODO: Investigate why this happens and how to properly mitigate. For now, this is a workaround to prevent transactions being dropped due to negative duration spans.\n Math.max(0, entry.duration),\n );\n\n if (\n attributes[SENTRY_OP] === 'navigation' &&\n transactionStartTime &&\n timeOrigin + startTime < transactionStartTime\n ) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation': {\n _addNavigationSpans(span, entry as PerformanceNavigationTiming, timeOrigin);\n break;\n }\n case 'paint': {\n _addPaintSpan(span, entry, startTime, duration, timeOrigin);\n break;\n }\n case 'resource': {\n _addResourceSpans(\n span,\n entry as PerformanceResourceTiming,\n entry.name,\n startTime,\n duration,\n timeOrigin,\n ignoreResourceSpans,\n );\n break;\n }\n // Ignore other entry types.\n }\n });\n\n _performanceCursor = Math.max(performanceEntries.length - 1, 0);\n\n _trackNavigator(span, spanStreamingEnabled);\n}\n\n/** Create a span for a browser paint performance entry. */\nfunction _addPaintSpan(\n span: Span,\n entry: PerformanceEntry,\n startTime: number,\n duration: number,\n timeOrigin: number,\n): void {\n const startTimestamp = timeOrigin + startTime;\n\n startAndEndSpan(span, startTimestamp, startTimestamp + duration, {\n name: entry.name,\n attributes: {\n [SENTRY_OP]: BROWSER_BROWSER_PAINT_SPAN_OP,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n },\n });\n}\n\n/**\n * Instrument navigation entries\n * exported only for tests\n */\nexport function _addNavigationSpans(span: Span, entry: PerformanceNavigationTiming, timeOrigin: number): void {\n _addPerformanceNavigationTiming(span, entry, 'unloadEvent', timeOrigin, 'unload_event');\n _addPerformanceNavigationTiming(span, entry, 'redirect', timeOrigin, 'redirect');\n _addPerformanceNavigationTiming(span, entry, 'domContentLoadedEvent', timeOrigin, 'dom_content_loaded_event');\n _addPerformanceNavigationTiming(span, entry, 'loadEvent', timeOrigin, 'load_event');\n _addPerformanceNavigationTiming(span, entry, 'connect', timeOrigin, 'connect');\n _addPerformanceNavigationTiming(span, entry, 'secureConnection', timeOrigin, 'tls_ssl');\n _addPerformanceNavigationTiming(span, entry, 'fetch', timeOrigin, 'cache');\n _addPerformanceNavigationTiming(span, entry, 'domainLookup', timeOrigin, 'dns');\n\n _addRequest(span, entry, timeOrigin);\n}\n\ntype StartEventName =\n | 'secureConnection'\n | 'fetch'\n | 'domainLookup'\n | 'unloadEvent'\n | 'redirect'\n | 'connect'\n | 'domContentLoadedEvent'\n | 'loadEvent';\n\ntype EndEventName =\n | 'domainLookupStart'\n | 'domainLookupEnd'\n | 'unloadEventEnd'\n | 'redirectEnd'\n | 'connectEnd'\n | 'domContentLoadedEventEnd'\n | 'loadEventEnd';\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n span: Span,\n entry: PerformanceNavigationTiming,\n event: StartEventName,\n timeOrigin: number,\n name: string = event,\n): void {\n const eventEnd = _getEndPropertyNameForNavigationTiming(event) satisfies keyof PerformanceNavigationTiming;\n const end = entry[eventEnd];\n const start = entry[`${event}Start`];\n if (!start || !end) {\n return;\n }\n startAndEndSpan(span, timeOrigin + msToSec(start), timeOrigin + msToSec(end), {\n op: `browser.${name}`,\n name: entry.name,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n ...(event === 'redirect' && entry.redirectCount != null ? { 'http.redirect_count': entry.redirectCount } : {}),\n },\n });\n}\n\nfunction _getEndPropertyNameForNavigationTiming(event: StartEventName): EndEventName {\n if (event === 'secureConnection') {\n return 'connectEnd';\n }\n if (event === 'fetch') {\n return 'domainLookupStart';\n }\n return `${event}End`;\n}\n\n/** Create request and response related spans */\nfunction _addRequest(span: Span, entry: PerformanceNavigationTiming, timeOrigin: number): void {\n const requestStartTimestamp = timeOrigin + msToSec(entry.requestStart);\n const responseEndTimestamp = timeOrigin + msToSec(entry.responseEnd);\n const responseStartTimestamp = timeOrigin + msToSec(entry.responseStart);\n if (entry.responseEnd) {\n // It is possible that we are collecting these metrics when the page hasn't finished loading yet, for example when the HTML slowly streams in.\n // In this case, ie. when the document request hasn't finished yet, `entry.responseEnd` will be 0.\n // In order not to produce faulty spans, where the end timestamp is before the start timestamp, we will only collect\n // these spans when the responseEnd value is available. The backend (Relay) would drop the entire span if it contained faulty spans.\n startAndEndSpan(span, requestStartTimestamp, responseEndTimestamp, {\n op: 'browser.request',\n name: entry.name,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n });\n\n startAndEndSpan(span, responseStartTimestamp, responseEndTimestamp, {\n op: 'browser.response',\n name: entry.name,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n },\n });\n }\n}\n\n/**\n * Create resource-related spans.\n * Exported only for tests.\n */\nexport function _addResourceSpans(\n span: Span,\n entry: PerformanceResourceTiming,\n resourceUrl: string,\n startTime: number,\n duration: number,\n timeOrigin: number,\n ignoredResourceSpanOps?: Array<string>,\n): void {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return;\n }\n\n const op = entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other';\n if (ignoredResourceSpanOps?.includes(op)) {\n return;\n }\n\n const attributes: SpanAttributes = {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n };\n\n const parsedUrl = parseUrl(resourceUrl);\n\n if (parsedUrl.protocol) {\n attributes['url.scheme'] = parsedUrl.protocol.split(':').pop(); // the protocol returned by parseUrl includes a :, but OTEL spec does not, so we remove it.\n }\n\n if (parsedUrl.host) {\n attributes['server.address'] = parsedUrl.host;\n }\n\n attributes['url.same_origin'] = resourceUrl.includes(WINDOW.location.origin);\n\n attributes[URL_FULL] = filterCollectedUrl(resourceUrl);\n\n _setResourceRequestAttributes(entry, attributes, [\n // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStatus\n ['responseStatus', 'http.response.status_code'],\n\n ['transferSize', 'http.response_transfer_size'],\n ['encodedBodySize', 'http.response_content_length'],\n ['decodedBodySize', 'http.decoded_response_content_length'],\n\n // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/renderBlockingStatus\n ['renderBlockingStatus', 'resource.render_blocking_status'],\n\n // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/deliveryType\n ['deliveryType', 'http.response_delivery_type'],\n ]);\n\n const attributesWithResourceTiming: SpanAttributes = { ...attributes, ...resourceTimingToSpanAttributes(entry) };\n\n const startTimestamp = timeOrigin + startTime;\n const endTimestamp = startTimestamp + duration;\n\n startAndEndSpan(span, startTimestamp, endTimestamp, {\n name: resourceUrl.replace(WINDOW.location.origin, ''),\n op,\n attributes: attributesWithResourceTiming,\n });\n}\n\n/**\n * Capture the information of the user agent.\n * TODO v11: Remove non-span-streaming attributes and measurements once we removed transactions\n */\nfunction _trackNavigator(span: Span, spanStreamingEnabled: boolean | undefined): void {\n const navigator = WINDOW.navigator as null | (Navigator & NavigatorNetworkInformation & NavigatorDeviceMemory);\n if (!navigator) {\n return;\n }\n\n // track network connectivity\n const connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) {\n span.setAttribute(\n spanStreamingEnabled ? 'network.connection.effective_type' : 'effectiveConnectionType',\n connection.effectiveType,\n );\n }\n\n if (connection.type) {\n span.setAttribute(spanStreamingEnabled ? 'network.connection.type' : 'connectionType', connection.type);\n }\n\n if (isMeasurementValue(connection.rtt)) {\n if (spanStreamingEnabled) {\n span.setAttribute('network.connection.rtt', connection.rtt);\n } else if (spanToJSON(span).attributes[SENTRY_OP] === 'pageload') {\n // Measurements are only recorded on the pageload span, matching the historical\n // behavior where `connection.rtt` was only flushed for pageload transactions.\n setMeasurement('connection.rtt', connection.rtt, 'millisecond');\n }\n }\n }\n\n if (isMeasurementValue(navigator.deviceMemory)) {\n if (spanStreamingEnabled) {\n span.setAttribute('device.memory.estimated_capacity', navigator.deviceMemory);\n } else {\n span.setAttribute('deviceMemory', `${navigator.deviceMemory} GB`);\n }\n }\n\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n if (spanStreamingEnabled) {\n span.setAttribute('device.processor_count', navigator.hardwareConcurrency);\n } else {\n span.setAttribute('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n }\n}\n\ntype ExperimentalResourceTimingProperty =\n | 'renderBlockingStatus'\n | 'deliveryType'\n // For some reason, TS during build, errors on `responseStatus` not being a property of\n // PerformanceResourceTiming while it actually is. Hence, we're adding it here.\n // Perhaps because response status is not yet available in Webkit/Safari.\n // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStatus\n | 'responseStatus';\n\n/**\n * Use this to set any attributes we can take directly form the PerformanceResourceTiming entry.\n *\n * This is just a mapping function for entry->attribute to keep bundle-size minimal.\n * Experimental properties are also accepted (see {@link ExperimentalResourceTimingProperty}).\n * Assumes that all entry properties might be undefined for browser-specific differences.\n * Only accepts string and number values for now and also sets 0-values.\n */\nexport function _setResourceRequestAttributes(\n entry: Partial<PerformanceResourceTiming> & Partial<Record<ExperimentalResourceTimingProperty, number | string>>,\n attributes: SpanAttributes,\n properties: [keyof PerformanceResourceTiming | ExperimentalResourceTimingProperty, string][],\n): void {\n properties.forEach(([entryKey, attributeKey]) => {\n const entryVal = entry[entryKey];\n if (\n entryVal != null &&\n ((typeof entryVal === 'number' && entryVal < MAX_INT_AS_BYTES) || typeof entryVal === 'string')\n ) {\n attributes[attributeKey] = entryVal;\n }\n });\n}\n"],"names":[],"mappings":";;;;;;;;;AA6DA,MAAM,gBAAA,GAAmB,UAAA;AAEzB,IAAI,kBAAA,GAA6B,CAAA;AAK1B,SAAS,sBAAA,GAA+B;AAC7C,EAAA,oCAAA,CAAqC,UAAA,EAAY,CAAC,EAAE,OAAA,EAAQ,KAAM;AAChE,IAAA,MAAM,SAAS,aAAA,EAAc;AAC7B,IAAA,IAAI,CAAC,MAAA,EAAQ;AACX,MAAA;AAAA,IACF;AAEA,IAAA,MAAM,EAAE,UAAA,EAAY,gBAAA,EAAkB,iBAAiB,oBAAA,EAAqB,GAAI,WAAW,MAAM,CAAA;AAEjG,IAAA,KAAA,MAAW,SAAS,OAAA,EAAS;AAC3B,MAAA,MAAM,SAAA,G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,IAAqB,OAAO,QAAA,KAAa,QAAA,CAAA,EACtF;AACA,MAAA,UAAA,CAAW,YAAY,CAAA,GAAI,QAAA;AAAA,IAC7B;AAAA,EACF,CAAC,CAAA;AACH;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceTiming.js","sources":["../../../src/performance/resourceTiming.ts"],"sourcesContent":["import type { SpanAttributes } from '@sentry/core';\nimport { browserPerformanceTimeOrigin } from '@sentry/core';\nimport { extractNetworkProtocol, getBrowserPerformanceAPI } from './utils';\n\nfunction getAbsoluteTime(time: number | undefined): number | undefined {\n // falsy values should be preserved so that we can later on drop undefined values and\n // preserve 0 vals for cross-origin resources without proper `Timing-Allow-Origin` header.\n return time ? ((browserPerformanceTimeOrigin() || performance.timeOrigin) + time) / 1000 : time;\n}\n\n/**\n * Converts a PerformanceResourceTiming entry to span data for the resource span. Most importantly,\n * it converts the timing values from timestamps relative to the `performance.timeOrigin` to absolute timestamps\n * in seconds.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming#timestamps\n *\n * @param resourceTiming\n * @returns An array where the first element is the attribute name and the second element is the attribute value.\n */\nexport function resourceTimingToSpanAttributes(resourceTiming: PerformanceResourceTiming): SpanAttributes {\n const timingSpanData: SpanAttributes = {};\n // Checking for only `undefined` and `null` is intentional because it's\n // valid for `nextHopProtocol` to be an empty string.\n if (resourceTiming.nextHopProtocol != undefined) {\n const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);\n timingSpanData['network.protocol.version'] = version;\n timingSpanData['network.protocol.name'] = name;\n }\n\n if (!(browserPerformanceTimeOrigin() || getBrowserPerformanceAPI()?.timeOrigin)) {\n return timingSpanData;\n }\n\n return dropUndefinedKeysFromObject({\n ...timingSpanData,\n\n 'http.request.redirect_start': getAbsoluteTime(resourceTiming.redirectStart),\n 'http.request.redirect_end': getAbsoluteTime(resourceTiming.redirectEnd),\n\n 'http.request.worker_start': getAbsoluteTime(resourceTiming.workerStart),\n\n 'http.request.fetch_start': getAbsoluteTime(resourceTiming.fetchStart),\n\n 'http.request.domain_lookup_start': getAbsoluteTime(resourceTiming.domainLookupStart),\n 'http.request.domain_lookup_end': getAbsoluteTime(resourceTiming.domainLookupEnd),\n\n 'http.request.connect_start': getAbsoluteTime(resourceTiming.connectStart),\n 'http.request.secure_connection_start': getAbsoluteTime(resourceTiming.secureConnectionStart),\n 'http.request.connection_end': getAbsoluteTime(resourceTiming.connectEnd),\n\n 'http.request.request_start': getAbsoluteTime(resourceTiming.requestStart),\n\n 'http.request.response_start': getAbsoluteTime(resourceTiming.responseStart),\n 'http.request.response_end': getAbsoluteTime(resourceTiming.responseEnd),\n\n // For TTFB we actually want the relative time from timeOrigin to responseStart\n // This way, TTFB always measures the \"first page load\" experience.\n // see: https://web.dev/articles/ttfb#measure-resource-requests\n 'http.request.time_to_first_byte':\n resourceTiming.responseStart != null ? resourceTiming.responseStart / 1000 : undefined,\n });\n}\n\n/**\n * Remove properties with `undefined` as value from an object.\n * In contrast to `dropUndefinedKeys` in core this funciton only works on first-level\n * key-value objects and does not recursively go into object properties or arrays.\n */\nfunction dropUndefinedKeysFromObject<T extends object>(attrs: T): Partial<T> {\n return Object.fromEntries(Object.entries(attrs).filter(([, value]) => value != null)) as Partial<T>;\n}\n"],"names":[],"mappings":";;;AAIA,SAAS,gBAAgB,IAAA,EAA8C;AAGrE,EAAA,OAAO,SAAS,4BAAA,EAA6B,IAAK,WAAA,CAAY,UAAA,IAAc,QAAQ,GAAA,GAAO,IAAA;AAC7F;AAYO,SAAS,+BAA+B,cAAA,EAA2D;AACxG,EAAA,MAAM,iBAAiC,EAAC;AAGxC,EAAA,IAAI,cAAA,CAAe,mBAAmB,MAAA,EAAW;AAC/C,IAAA,MAAM,EAAE,IAAA,EAAM,OAAA,EAAQ,GAAI,sBAAA,CAAuB,eAAe,eAAe,CAAA;AAC/E,IAAA,cAAA,CAAe,0BAA0B,CAAA,GAAI,OAAA;AAC7C,IAAA,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KAAK,CAAA,CAAE,MAAA,CAAO,CAAC,GAAG,KAAK,CAAA,KAAM,KAAA,IAAS,IAAI,CAAC,CAAA;AACtF;;;;"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { SENTRY_OP, SENTRY_ORIGIN } from '@sentry/conventions/attributes';
|
|
2
|
+
import { defineIntegration, browserPerformanceTimeOrigin, spanToJSON, stringMatchesSomePattern, isPrimitive } from '@sentry/core';
|
|
3
|
+
import { getBrowserPerformanceAPI, msToSec, startAndEndSpan } from './utils.js';
|
|
4
|
+
import { getNavigationEntry } from '../web-vitals/utils.js';
|
|
5
|
+
|
|
6
|
+
const INTEGRATION_NAME = "UserTiming";
|
|
7
|
+
const _userTimingIntegration = ((options = {}) => {
|
|
8
|
+
return {
|
|
9
|
+
name: INTEGRATION_NAME,
|
|
10
|
+
setup(client) {
|
|
11
|
+
const performance = getBrowserPerformanceAPI();
|
|
12
|
+
const timeOrigin = browserPerformanceTimeOrigin();
|
|
13
|
+
if (!performance?.getEntries || !timeOrigin) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const timeOriginInSeconds = msToSec(timeOrigin);
|
|
17
|
+
let performanceCursor = 0;
|
|
18
|
+
client.on("beforeIdleSpanEnd", (idleSpan) => {
|
|
19
|
+
const { attributes, start_timestamp: parentStartTimestamp } = spanToJSON(idleSpan);
|
|
20
|
+
const parentOp = attributes[SENTRY_OP];
|
|
21
|
+
if (parentOp !== "pageload" && parentOp !== "navigation") {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const requestTime = msToSec(getNavigationEntry(false)?.requestStart ?? 0);
|
|
25
|
+
const performanceEntries = performance.getEntries();
|
|
26
|
+
for (const entry of performanceEntries.slice(performanceCursor)) {
|
|
27
|
+
if (entry.entryType !== "mark" && entry.entryType !== "measure") {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
const startTime = msToSec(entry.startTime);
|
|
31
|
+
const absoluteStartTime = timeOriginInSeconds + startTime;
|
|
32
|
+
if (parentOp === "navigation" && parentStartTimestamp && absoluteStartTime < parentStartTimestamp) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
_addUserTimingSpan(
|
|
36
|
+
idleSpan,
|
|
37
|
+
entry,
|
|
38
|
+
startTime,
|
|
39
|
+
msToSec(Math.max(0, entry.duration)),
|
|
40
|
+
timeOriginInSeconds,
|
|
41
|
+
requestTime,
|
|
42
|
+
options.ignore ?? []
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
performanceCursor = performanceEntries.length;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
const userTimingIntegration = defineIntegration(_userTimingIntegration);
|
|
51
|
+
function _addUserTimingSpan(parentSpan, entry, startTime, duration, timeOrigin, requestTime, ignore) {
|
|
52
|
+
if (isReact19MeasureEntry(entry) || stringMatchesSomePattern(entry.name, ignore)) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const spanStartTimestamp = timeOrigin + Math.max(startTime, requestTime);
|
|
56
|
+
const originalStartTimestamp = timeOrigin + startTime;
|
|
57
|
+
const spanEndTimestamp = originalStartTimestamp + duration;
|
|
58
|
+
const attributes = {
|
|
59
|
+
[SENTRY_ORIGIN]: `auto.browser.user_timing.${entry.entryType}`
|
|
60
|
+
};
|
|
61
|
+
if (spanStartTimestamp !== originalStartTimestamp) {
|
|
62
|
+
attributes["sentry.browser.measure_happened_before_request"] = true;
|
|
63
|
+
attributes["sentry.browser.measure_start_time"] = spanStartTimestamp;
|
|
64
|
+
}
|
|
65
|
+
addDetailToSpanAttributes(attributes, entry);
|
|
66
|
+
if (spanStartTimestamp <= spanEndTimestamp) {
|
|
67
|
+
startAndEndSpan(parentSpan, spanStartTimestamp, spanEndTimestamp, {
|
|
68
|
+
name: entry.name,
|
|
69
|
+
op: entry.entryType,
|
|
70
|
+
attributes
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function isReact19MeasureEntry(entry) {
|
|
75
|
+
if (entry.entryType !== "measure") {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
return entry.detail.devtools.track === "Components \u269B";
|
|
80
|
+
} catch {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function addDetailToSpanAttributes(attributes, entry) {
|
|
85
|
+
try {
|
|
86
|
+
const detail = entry.detail;
|
|
87
|
+
if (!detail) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (typeof detail === "object") {
|
|
91
|
+
for (const [key, value] of Object.entries(detail)) {
|
|
92
|
+
if (value && isPrimitive(value)) {
|
|
93
|
+
attributes[`sentry.browser.measure.detail.${key}`] = value;
|
|
94
|
+
} else if (value !== void 0) {
|
|
95
|
+
try {
|
|
96
|
+
attributes[`sentry.browser.measure.detail.${key}`] = JSON.stringify(value);
|
|
97
|
+
} catch {
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (isPrimitive(detail)) {
|
|
104
|
+
attributes["sentry.browser.measure.detail"] = detail;
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
try {
|
|
108
|
+
attributes["sentry.browser.measure.detail"] = JSON.stringify(detail);
|
|
109
|
+
} catch {
|
|
110
|
+
}
|
|
111
|
+
} catch {
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export { _addUserTimingSpan, userTimingIntegration };
|
|
116
|
+
//# sourceMappingURL=userTiming.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userTiming.js","sources":["../../../src/performance/userTiming.ts"],"sourcesContent":["import { SENTRY_OP, SENTRY_ORIGIN } from '@sentry/conventions/attributes';\nimport type { IntegrationFn, Span, SpanAttributes, SpanAttributeValue } from '@sentry/core';\nimport {\n browserPerformanceTimeOrigin,\n defineIntegration,\n isPrimitive,\n spanToJSON,\n stringMatchesSomePattern,\n} from '@sentry/core';\nimport { getBrowserPerformanceAPI, msToSec, startAndEndSpan } from './utils';\nimport { getNavigationEntry } from '../web-vitals/utils';\n\ninterface UserTimingOptions {\n /**\n * User Timing entries with names matching any of these strings or regular expressions will not be emitted.\n *\n * Default: []\n */\n ignore?: Array<string | RegExp>;\n}\n\nconst INTEGRATION_NAME = 'UserTiming';\n\nconst _userTimingIntegration = ((options: UserTimingOptions = {}) => {\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n const performance = getBrowserPerformanceAPI();\n const timeOrigin = browserPerformanceTimeOrigin();\n if (!performance?.getEntries || !timeOrigin) {\n return;\n }\n const timeOriginInSeconds = msToSec(timeOrigin);\n let performanceCursor = 0;\n\n client.on('beforeIdleSpanEnd', idleSpan => {\n const { attributes, start_timestamp: parentStartTimestamp } = spanToJSON(idleSpan);\n const parentOp = attributes[SENTRY_OP];\n\n if (parentOp !== 'pageload' && parentOp !== 'navigation') {\n return;\n }\n\n const requestTime = msToSec(getNavigationEntry(false)?.requestStart ?? 0);\n const performanceEntries = performance.getEntries();\n\n for (const entry of performanceEntries.slice(performanceCursor)) {\n if (entry.entryType !== 'mark' && entry.entryType !== 'measure') {\n continue;\n }\n\n const startTime = msToSec(entry.startTime);\n const absoluteStartTime = timeOriginInSeconds + startTime;\n\n if (parentOp === 'navigation' && parentStartTimestamp && absoluteStartTime < parentStartTimestamp) {\n continue;\n }\n\n _addUserTimingSpan(\n idleSpan,\n entry,\n startTime,\n msToSec(Math.max(0, entry.duration)),\n timeOriginInSeconds,\n requestTime,\n options.ignore ?? [],\n );\n }\n\n performanceCursor = performanceEntries.length;\n });\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Captures spans created with the browser's User Timing APIs, `performance.mark` and `performance.measure`.\n *\n * The integration must be explicitly added to `Sentry.init`. Entries are attached to the active pageload or\n * navigation span when it ends.\n *\n * @example\n * ```ts\n * Sentry.init({\n * integrations: [\n * Sentry.browserTracingIntegration(),\n * Sentry.userTimingIntegration({\n * ignore: ['third-party-mark', /framework-measure/],\n * }),\n * ],\n * });\n * ```\n */\nexport const userTimingIntegration = defineIntegration(_userTimingIntegration);\n\n/**\n * Creates a span for a browser User Timing entry.\n * Exported only for tests.\n */\nexport function _addUserTimingSpan(\n parentSpan: Span,\n entry: PerformanceEntry,\n startTime: number,\n duration: number,\n timeOrigin: number,\n requestTime: number,\n ignore: Array<string | RegExp>,\n): void {\n if (isReact19MeasureEntry(entry) || stringMatchesSomePattern(entry.name, ignore)) {\n return;\n }\n\n // Measures can reference arbitrary timestamps, including timestamps before the page request started.\n const spanStartTimestamp = timeOrigin + Math.max(startTime, requestTime);\n const originalStartTimestamp = timeOrigin + startTime;\n const spanEndTimestamp = originalStartTimestamp + duration;\n\n const attributes: SpanAttributes = {\n [SENTRY_ORIGIN]: `auto.browser.user_timing.${entry.entryType}`,\n };\n\n if (spanStartTimestamp !== originalStartTimestamp) {\n attributes['sentry.browser.measure_happened_before_request'] = true;\n attributes['sentry.browser.measure_start_time'] = spanStartTimestamp;\n }\n\n addDetailToSpanAttributes(attributes, entry as PerformanceMeasure);\n\n // Third-party measurements can contain timestamps which would produce invalid spans.\n if (spanStartTimestamp <= spanEndTimestamp) {\n startAndEndSpan(parentSpan, spanStartTimestamp, spanEndTimestamp, {\n name: entry.name,\n op: entry.entryType,\n attributes,\n });\n }\n}\n\n/**\n * React 19.2+ creates performance.measure entries for component renders.\n * We can identify them by the `detail.devtools.track` property being set to 'Components ⚛'.\n * See https://react.dev/reference/dev-tools/react-performance-tracks.\n */\nfunction isReact19MeasureEntry(entry: PerformanceEntry): boolean | void {\n if (entry.entryType !== 'measure') {\n return;\n }\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return (entry as PerformanceMeasure).detail.devtools.track === 'Components ⚛';\n } catch {\n return;\n }\n}\n\nfunction addDetailToSpanAttributes(attributes: SpanAttributes, entry: PerformanceMeasure): void {\n try {\n // Accessing detail can throw in some browsers due to security restrictions.\n const detail = entry.detail;\n if (!detail) {\n return;\n }\n\n if (typeof detail === 'object') {\n for (const [key, value] of Object.entries(detail)) {\n if (value && isPrimitive(value)) {\n attributes[`sentry.browser.measure.detail.${key}`] = value as SpanAttributeValue;\n } else if (value !== undefined) {\n try {\n attributes[`sentry.browser.measure.detail.${key}`] = JSON.stringify(value);\n } catch {\n // User-provided detail values are not guaranteed to be serializable.\n }\n }\n }\n return;\n }\n\n if (isPrimitive(detail)) {\n attributes['sentry.browser.measure.detail'] = detail as SpanAttributeValue;\n return;\n }\n\n try {\n attributes['sentry.browser.measure.detail'] = JSON.stringify(detail);\n } catch {\n // User-provided detail values are not guaranteed to be serializable.\n }\n } catch {\n // Accessing detail can throw in some browsers due to security restrictions.\n }\n}\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,gBAAA,GAAmB,YAAA;AAEzB,MAAM,sBAAA,IAA0B,CAAC,OAAA,GAA6B,EAAC,KAAM;AACnE,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,MAAM,MAAA,EAAQ;AACZ,MAAA,MAAM,cAAc,wBAAA,EAAyB;AAC7C,MAAA,MAAM,aAAa,4BAAA,EAA6B;AAChD,MAAA,IAAI,CAAC,WAAA,EAAa,UAAA,IAAc,CAAC,UAAA,EAAY;AAC3C,QAAA;AAAA,MACF;AACA,MAAA,MAAM,mBAAA,GAAsB,QAAQ,UAAU,CAAA;AAC9C,MAAA,IAAI,iBAAA,GAAoB,CAAA;AAExB,MAAA,MAAA,CAAO,EAAA,CAAG,qBAAqB,CAAA,QAAA,KAAY;AACzC,QAAA,MAAM,EAAE,UAAA,EAAY,eAAA,EAAiB,oBAAA,EAAqB,GAAI,WAAW,QAAQ,CAAA;AACjF,QAAA,MAAM,QAAA,GAAW,WAAW,SAAS,CAAA;AAErC,QAAA,IAAI,QAAA,KAAa,UAAA,IAAc,QAAA,KAAa,YAAA,EAAc;AACxD,UAAA;AAAA,QACF;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