-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[@sentry.nextjs] webvitals like LCP and FID are missing due to pageload transaction finishes early #3803
Comments
@AbhiPrasad Please visit this test page for reproduction: https://cp-student-center-kk7qwhuq5-wukong-frontend.vercel.app/login I've enabled debug logs. As you can see below, LCP and FID were added after pageload transaction finished. Sentry Logger [Log]: Integration installed: InboundFilters |
Thank you for reporting, fix is on the way! |
Affected Link
https://sentry.io/organizations/wukong-fe/performance/cp-student-center:acb9ce58ea414c6f829c53fd6779bc1f/?display=vitals&project=5860551&query=transaction.duration%3A%3C15m+has%3Ameasurements.fcp&showTransactions=recent&statsPeriod=24h&transaction=%2F&unselectedSeries=p100%28%29
Package + Version
Description
After integrating our project(nextjs on Vercel) with Sentry, we found most of the pageload transactions do not have LCP and FID data.
After some investigation we found that the pageload transaction ends when Router.changeState is triggered:
https://github.com/getsentry/sentry-javascript/blob/master/packages/nextjs/src/performance/client.ts#L91
However
Router.changeState
will be called when the Router component mounts. This leads pageload transaction finish immediately:https://github.com/vercel/next.js/blob/e89b8e466aad110f8af3f60ef7d8292f6064a245/packages/next/client/index.tsx#L204
Reproducible Demo
Please visit this test page for reproduction:
https://cp-student-center-kk7qwhuq5-wukong-frontend.vercel.app/login
The text was updated successfully, but these errors were encountered: