Skip to content
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

The LCP metric is missing from the collection, resulting in an average LCP value that is less than the FCP. #9977

Open
3 tasks done
yl1033669613 opened this issue Dec 25, 2023 · 3 comments

Comments

@yl1033669613
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/react

SDK Version

7.80.1

Framework Version

17.0.2

Link to Sentry event

https://international-smart-card.sentry.io/performance/browser/pageloads/overview/?environment=LOCAL&project=4506075654782976&statsPeriod=7d&transaction=%2Fsupport

SDK Setup

Sentry.init({
  dsn: 'dsn',
  integrations: [
    new Sentry.BrowserTracing({
      routingInstrumentation: customReactRouterV6Instrumentation(
        React.useEffect,
        useLocation,
        useNavigationType,
        createRoutesFromChildren,
        matchRoutes,
      ),
      idleTimeout: 5000,
    }),
  ],
  tracesSampleRate: 1,
  environment: 'LOCAL',
  transport: customTransport,
  enabled: canMonitor,
});

Steps to Reproduce

  1. Open page.
  2. Without any interaction, wait for the monitoring to complete the report.
  3. Go to the Sentry backend Web Vitals to view the corresponding page events, and find that the LCP metric is missing.
  4. Repeat the above steps, but click on the page before the report is completed, and thus you can obtain the LCP metric.

Expected Result

Whether or not the user interacts with the page, the LCP (Largest Contentful Paint) can be collected.

Actual Result

The LCP (Largest Contentful Paint) can only be collected if the user interacts with the page before the report, resulting in a widespread absence of the LCP metric and consequently causing the average LCP to be less than the FCP (First Contentful Paint).
image

@lforst
Copy link
Member

lforst commented Dec 27, 2023

Thanks for raising this. @AbhiPrasad do we have plans to move web-vitals collection to a model that allows "out-of-span" collection?

@yl1033669613
Copy link
Author

@lforst
Hello, I was wondering if Sentry has any plans to make adjustments in response to this issue?

@AbhiPrasad
Copy link
Member

do we have plans to move web-vitals collection to a model that allows "out-of-span" collection?

Yes we'll be tackling this after we release the new major version of the SDK, v8. This will allow us to support INP, and send web vitals like LCP outside of a typical transaction.

Important to note, we also have a metrics product in alpha that might help with this! #9938

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants