MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / startTrackingINP

Function startTrackingINP

packages/browser-utils/src/metrics/inp.ts:44–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42 * Start tracking INP webvital events.
43 */
44export function startTrackingINP(): () => void {
45 const performance = getBrowserPerformanceAPI();
46 if (performance && browserPerformanceTimeOrigin()) {
47 const inpCallback = _trackINP();
48
49 return (): void => {
50 inpCallback();
51 };
52 }
53
54 return () => undefined;
55}
56
57export const INP_ENTRY_MAP: Record<string, 'click' | 'hover' | 'drag' | 'press'> = {
58 click: 'click',

Callers 1

setupFunction · 0.90

Calls 3

getBrowserPerformanceAPIFunction · 0.90
_trackINPFunction · 0.85

Tested by

no test coverage detected