feat(browser): Core Web Vitals as browser.web_vital log events - #1150
Merged
Makisuo merged 4 commits intoSep 29, 2026
Merged
Maple Review Bot / Maple / review
succeeded
Sep 29, 2026 in 8m 55s
Confidence 5/5 · No issues found
Confidence 5/5 · safe to merge
The web-vitals code itself is contained and tested; the two files the kickoff named are not part of this PR's diff against its base and could not be reviewed here.
quality 100/100 · no findings · tests covered · risk low · 1/1 new units observable
Adds Core Web Vitals to the browser SDK as browser.web_vital log events emitted from the deferred chunk, each linked to the document's pageload span and gated by a new webVitals flag. Contained and tested; safe to merge.
startWebVitalsreports LCP/CLS/INP/FCP/TTFB asbrowser.web_vitallog events- The deferred chunk links each vital to the document
pageloadspan - New
webVitalsconfig flag, default true, gates reporting
What was checked
- Earlier F1 is fixed:
reportno longer gates emission on a pageload span (web-vitals.ts:14-31), and the untraced browser test asserts an event with nospanContext. webVitals: falseis threaded throughresolveConfig(config.ts:222) and set in both browser test configs, so vitals cannot leak between tests in one file.startWebVitalskeeps the once-per-page library registration and only gates reporting, so a laterinit()resumes reporting (web-vitals.ts:38-45).
Observability coverage: 1 of 1 changes observable
| Change | Kind | Observable | Evidence |
|---|---|---|---|
Web vital reporting (LCP, CLS, INP, FCP, TTFB) → browser.web_vital log event |
log-based event | yes | web-vitals.ts:16-31 emits a structured event with semconv attributes, session.id, url.path and the pageload span link |
ab3f6b9 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple to ask about one.
Loading