Skip to content

Conversation

@kanerep
Copy link
Contributor

@kanerep kanerep commented Nov 3, 2025

This PR adds core web vitals to umami and will need testing by a team member with access to umami.

I decided to implement this feature because performance is crucial to defillama so I believe this feature gives us additional visibility where performance might be improved.

Changes

  • Core Web Vitals (LCP, CLS, INP, etc.) are reported via Next.js’ reportWebVitals hook with a light retry while the self-hosted Umami script loads. Every event lands under the web-vital tag with the route, rating bucket, and key device hints. The thresholds are based on the recommended values: https://web.dev/articles/defining-core-web-vitals-thresholds
  • Use Umami’s Events view to filter by metric (e.g. LCP) and bucket (>4000ms) to see where bottlenecks cluster; combining with the built-in path/device filters highlights slow segments quickly.

How to test

  1. yarn build and yarn start - this should generate the core web vitals metrics (they do not get exposed on dev builds)
  2. check umami to see if web-vital events are being captured

@kanerep kanerep marked this pull request as ready for review November 3, 2025 13:49
@kanerep kanerep force-pushed the feat/core-web-vitals-tracking branch from d200c1c to c895711 Compare December 12, 2025 10:33
@kanerep
Copy link
Contributor Author

kanerep commented Dec 12, 2025

@mintdart resolved the conflict on this PR. It's good for review when you get some time, cheers.

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.

1 participant