in dotcom-rendering/src/components/Metrics.importable.tsx [106:131]
function coreWebVitals() {
if (isUndefined(abTestApi)) return;
if (isUndefined(browserId)) return;
if (isUndefined(isDev)) return;
if (isUndefined(pageViewId)) return;
const bypassSampling = shouldBypassSampling(abTestApi);
/**
* We rely on `bypassSampling` rather than the built-in sampling,
* but set the value to greater than 0 to avoid console warnings.
*/
const nearZeroSampling = Number.MIN_VALUE;
void initCoreWebVitals({
browserId,
pageViewId,
isDev,
sampling: nearZeroSampling,
team: 'dotcom',
});
if (bypassSampling || isDev) {
void bypassCoreWebVitalsSampling('commercial');
}
},