Skip to content

refactor(web-vitals): require explicit trackingLevel for all metrics#1024

Merged
overbalance merged 1 commit intomainfrom
overbalance/adjust-web-vitals-logic
Dec 19, 2025
Merged

refactor(web-vitals): require explicit trackingLevel for all metrics#1024
overbalance merged 1 commit intomainfrom
overbalance/adjust-web-vitals-logic

Conversation

@overbalance
Copy link
Copy Markdown
Member

What problem is this solving?

Makes the trackingLevel option require explicit 'all' value to track FCP and TTFB, aligning with test expectations.

Short description of changes

  • Changed condition from checking trackingLevel === 'core' to trackingLevel === 'all'
  • CORE_WEB_VITALS (CLS, INP, LCP) tracked unless explicitly set to 'all'
  • ALL_WEB_VITALS (CLS, INP, LCP, FCP, TTFB) requires trackingLevel: 'all'

Testing

  • Existing tests verify this behavior and pass

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 16, 2025

Chrome DevTools Protocol Tracing (Script: 107.10ms, Heap: 13.58MB)
Number of Requests Size of Requests Script Duration Task Duration Heap Used Size
Requests +3 requests +29.72 KB
Page Loaded +14.28 ms +4.87 ms +0.95 MB
Generate 100 fetch requests +16.17 ms +60.22 ms +1.76 MB
Generate 100 XHR requests +41.59 ms +121.29 ms +2.35 MB
Click 100 buttons and generate 100 logs +24.21 ms +35.65 ms +2.95 MB
Throw a 100 exceptions +3.39 ms +15.31 ms +2.45 MB
End Session +7.45 ms +14.91 ms +3.13 MB
Total +3 requests +29.72 KB +107.10 ms +252.25 ms +13.58 MB
Lighthouse (Script Eval: 46.02ms)
Difference Description
Total Blocking Time 0 ms Difference in Total Blocking Time: Sum of all time periods between FCP and Time to Interactive, when task length exceeded 50ms, expressed in milliseconds. Learn more about the Total Blocking Time metric.
Main Thread Time +63.65 ms Difference in Main Thread Time: Consider reducing the time spent parsing, compiling and executing JS. You may find delivering smaller JS payloads helps with this. Learn how to minimize main-thread work
Script Evaluation Time +46.02 ms Difference in Script Evaluation Time: Consider reducing the time spent parsing, compiling, and executing JS. You may find delivering smaller JS payloads helps with this. Learn how to reduce Javascript execution time.
Platform Tests (vite-7 gzip: 47.99KB)

vite-7 Platform Tests

Total Uncompressed Size Total Gzip Size
vite-7 - esnext +164.67 KB +47.99 KB
vite-7 - es2015 +171.51 KB +49.67 KB

vite-otel-latest Platform Tests

Total Uncompressed Size Total Gzip Size
vite-otel-latest - esnext +163.74 KB +49.69 KB
vite-otel-latest - es2015 +170.50 KB +51.32 KB

webpack-5 Platform Tests

Total Uncompressed Size Total Gzip Size
webpack-5 - esnext +121.11 KB +43.17 KB
webpack-5 - es2015 +122.22 KB +44.65 KB

@overbalance overbalance force-pushed the overbalance/adjust-web-vitals-logic branch from 7c88baa to ac8cf6b Compare December 17, 2025 21:05
@overbalance overbalance merged commit 5b32f3c into main Dec 19, 2025
17 checks passed
@overbalance overbalance deleted the overbalance/adjust-web-vitals-logic branch December 19, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants