Skip to content

SDK: Web Vitals ingest (LCP, INP, CLS, TTFB) (#193) - #281

Merged
unjica merged 2 commits into
developfrom
feature/web-vitals-ingest-193
Jul 8, 2026
Merged

unjica merged 2 commits into
developfrom
feature/web-vitals-ingest-193

Conversation

@unjica

@unjica unjica commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add @telemetry-tracker/core Web Vitals capture via the web-vitals library
  • Emit auto-captured $web_vital events with metric, value, rating, path, navigation type, and connection type
  • Enabled by default on browser init() / Next TelemetryProvider; disable with webVitals: false
  • Document event shape in SDK docs; no ingest schema or API changes required

Closes #193

Test plan

Made with Cursor

Add web-vitals integration to @telemetry-tracker/core with LCP, INP,
CLS, and TTFB auto-capture on init (opt-out via webVitals: false).
Closes #193.

Co-authored-by: Cursor <[email protected]>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5c35a39. Configure here.

Comment thread packages/telemetry-core/src/index.ts Resolved
Comment thread packages/telemetry-core/src/index.ts Resolved
Gate $web_vital capture via setWebVitalsCaptureEnabled so re-init with
webVitals: false stops reports (including async import race). Flush the
batched event queue with keepalive on pagehide and visibility hidden so
final CLS/LCP samples are not dropped on unload.

Co-authored-by: Cursor <[email protected]>
@unjica
unjica merged commit 5ce3b07 into develop Jul 8, 2026
4 checks passed
@unjica
unjica deleted the feature/web-vitals-ingest-193 branch July 8, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SDK: Web Vitals ingest (LCP, INP/FID, CLS, TTFB)

1 participant