Use the web-vitals JavaScript library to observe LCP, INP, and CLS metric callbacks in the browser
Inside each callback, record the value as an OTel histogram or gauge using the browser-compatible OTel JS SDK
Attach page URL, device category, and connection type as attributes to each metric measurement
Export the metrics via OTLP/HTTP to a collector or directly to a compatible backend
Create Grafana or Datadog dashboards with p75 percentile views of each Core Web Vital segmented by page route
Known gotchas
INP replaced FID as the interaction metric; ensure you are collecting INP rather than FID if targeting current Web Vitals definitions
CLS accumulates over the full page lifecycle; capturing it only on page unload can miss intermediate layout shifts and requires a beforeunload or visibilitychange handler
Core Web Vitals thresholds are defined at the 75th percentile; avoid reporting only averages which can obscure poor tail experiences
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp