axiomhq / next-axiom

The official Next.js library for Axiom.
https://axiom.co/vercel
MIT License
363 stars 27 forks source link

Cannot see Web Vitals in Vercel project #17

Closed enricoros closed 2 years ago

enricoros commented 2 years ago

Hello, I love the Vercel integration! I followed the instructions but cannot get the web vitals metrics on the dashboard (FCP and all).

Added the following to pages/_app.tsx

export { reportWebVitals } from 'next-axiom';

Wrapped next.config.js: image

Vercel logs work, as well as Axiom log functions (I see the output in the stream as a 'message').

However I don't see WebVitals metrics.

The frontend is sending them to Vercel: image

Is this expected?

enricoros commented 2 years ago

I just started receiving web-vitals data. Turns out only the main branch of a repository will send out the data, other branches will not.

Would update the doc adding a couple of info that could be useful:

  1. Web Vitals to Axiom is in addition to the web-vitals captured by Vercel delopments (data sent to 2 different websites)
  2. Only the production branch in Vercel will get the vitals. Other branches will still get logs, but no vitals.
enricoros commented 2 years ago

I just started receiving web-vitals data. Turns out only the main branch of a repository will send out the data, other branches will not.

Would update the doc adding a couple of info that could be useful:

Web Vitals to Axiom is in addition to the web-vitals captured by Vercel delopments (data sent to 2 different websites) Only the production branch in Vercel will get the vitals. Other branches will still get logs, but no vitals.