Commit b82e753
feat(browser): Emit web vitals as streamed spans when span streaming is enabled
Add non-standalone web vital spans that flow through the v2 span streaming
pipeline (afterSpanEnd -> captureSpan -> SpanBuffer). Each web vital gets
`browser.web_vital.<metric>.value` attributes and span events for measurement
extraction. Spans have meaningful durations showing time from navigation start
to the web vital event (except CLS which is a score, not a duration).
New tracking functions: trackLcpAsSpan, trackClsAsSpan, trackInpAsSpan,
trackTtfbAsSpan, trackFcpAsSpan, trackFpAsSpan — wired up in
browserTracingIntegration.setup() when hasSpanStreamingEnabled(client).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 5bd81ce commit b82e753
File tree
4 files changed
+928
-0
lines changed- packages
- browser-utils
- src
- metrics
- test/metrics
- browser/src/tracing
4 files changed
+928
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
23 | 33 | | |
24 | 34 | | |
25 | 35 | | |
| |||
0 commit comments