Lesson 9 of 9 · 27m
Real-User Monitoring and the Performance Operations Loop
Design RUM telemetry, alerting, dashboards, budgets, and incident workflows that catch regressions in real traffic without drowning teams in noise.
Performance optimization fails as an operating model when it is treated as a quarterly cleanup. Software ships daily, dependencies change, experiments mutate markup, vendors alter scripts, and traffic mix moves. Real-user monitoring is how you keep truth in the room. Done badly, RUM is a privacy liability and a pile of unusable dashboards. Done well, it closes the loop between user experience, deploys, and engineering decisions.
Collect enough context to act
Browser performance entries provide raw measurements, but raw measurements need shape. At minimum capture metric, route, release, device class, connection class, geography at coarse resolution, and relevant cache state:
import {onLCP, onINP, onCLS} from "web-vitals";
function report(metric) {
navigator.sendBeacon("/rum", JSON.stringify({
name: metric.name, value: metric.value, id: metric.id,
route: location.pathname, release: window.APP_RELEASE
}));
}
onLCP(report); onINP(report); onCLS(report);Use sendBeacon or carefully batched fetch so measurement does not depend on a long-lived page. Sampling is acceptable, but document it. A 10% sample can still show p75 regression while reducing cost and privacy surface.
Segment before you celebrate or panic
Aggregate movement has causes. A migration to more mobile traffic can worsen global p75 even if every device class improved. That is Simpson's paradox showing up in performance clothing. Segment dashboards by:
route family, device class, region, cache state, browser family, release version, experiment variant
A regression isolated to release=2026.11.30-4 on mobile checkout is actionable. A company-wide chart with one red line is anxiety.
Alert on user pain, not noise
Do not page because LCP moved 20ms. Alert on sustained threshold breaches in meaningful cohorts:
checkout p75 LCP > 3.0s for 2h with volume; dashboard p75 INP > 300ms post-release
global CLS p75 > 0.15 with release correlationUse minimum traffic thresholds to avoid a handful of unusual sessions triggering incident theater. Pair RUM alerts with synthetic checks. RUM tells you users hurt; synthetic tests often reproduce and isolate why.
Budgets fail when nobody owns enforcement
Performance budgets should be small, testable, and tied to deployment or review:
{"budgets":[{"path":"/checkout","lcp_p75_ms":2500,"inp_p75_ms":200,"cls_p75":0.1},
{"path":"/checkout","js_compressed_kb":220,"image_hero_kb":120}]}A bundle-size budget catches artifact growth. A lab budget catches deterministic regressions. A field budget catches real user pain. You need all three because they fail differently. If every regression is 'approved as an exception,' the budget is decorative.
Performance incidents need a runbook
When telemetry goes red, teams need a sequence:
1. Confirm routes, devices, regions, release correlation, deploys, experiments, vendors, and traffic mix.
2. Reproduce cold/warm states; inspect waterfall and main-thread trace.
3. Mitigate material user impact; preserve evidence before purges and hotfixes erase it.Privacy is part of telemetry design
Do not beacon full URLs containing tokens, emails, search queries, or user identifiers. Normalize routes (/orders/:id), hash stable identifiers where a legitimate need exists, and keep retention bounded. Performance monitoring is not consent to product analytics surveillance.
Field notes
- SPA route transitions need separate measurement. Initial-load metrics do not describe client-side navigation cost.
- Attribution libraries help, but validate them against traces before trusting blame assignments.
- Telemetry itself costs performance. Batch it, sample it, and keep it off the critical path.
- Dashboards nobody looks at are not monitoring. Tie every chart to an owner, threshold, or decision.
Was this lesson helpful?