sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

web-vitals not logging - except INP

Open rajat2502 opened this issue 1 year ago • 10 comments

Is there an existing issue for this?

  • [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
  • [X] I have reviewed the documentation https://docs.sentry.io/
  • [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

7.107.0

Framework Version

Next 12.3.1, React 17.0.2

Link to Sentry event

No response

SDK Setup

import { browserTracingIntegration, init as initSentry } from '@sentry/nextjs';

initSentry({
  dsn: SENTRY_DSN,
  tracesSampleRate: 0.05,
  integrations: [
    browserTracingIntegration({
      enableInp: true,
    }),
  ],
});

Steps to Reproduce

  1. This started happening since we upgraded @sentry/nextjs to accommodate for the INP changes. Interestingly INP is logging correct but other web vitals are not showing up on the dashboard.

Expected Result

Should have all the web vitals.

Actual Result

Screenshot 2024-04-18 at 2 17 40 PM

rajat2502 avatar Apr 18 '24 08:04 rajat2502

Hey @rajat2502 thanks for writing in!

Any chance you're using the new de region in your Sentry organization/project? (If you didn't change anything in the past couple of weeks you're probably not using it) Also, you said you upgraded your Sentry SDK version. What was the version you used previously?

Lms24 avatar Apr 18 '24 09:04 Lms24

I'm not sure what you mean by the de region, can you please link me to that? Although I'm sure we haven't changed anything in the last 2 weeks.

The earlier version of @sentry/nextjs was 7.14.2. I Interestingly, there is another project where we made the same changes and everything is logging as expected for that project.

rajat2502 avatar Apr 18 '24 11:04 rajat2502

Both these projects lie in the same organisation (in case it helps)

rajat2502 avatar Apr 18 '24 11:04 rajat2502

@rajat2502 we fixed some bugs around web vitals collection, could you try updating to the latest SDK version and checking the results?

AbhiPrasad avatar Apr 18 '24 13:04 AbhiPrasad

Yeah, we upgraded to the latest version of nextjs SDK but no luck so far.

rajat2502 avatar Apr 18 '24 17:04 rajat2502

@rajat2502 I think this is just a case of sampling, you have way more interactions then you do pageloads, so the score is primarily made of of those samples.

You can either bump tracesSampleRate, or use interactionsSampleRate in https://github.com/getsentry/sentry-javascript/releases/tag/7.110.0 to sample down interactions (and less INP).

AbhiPrasad avatar Apr 18 '24 17:04 AbhiPrasad

Yeah, that might be the case, let me give it a try. I'm assuming there are no recommended sample rates for interaction as this would very from site to site?

rajat2502 avatar Apr 19 '24 04:04 rajat2502

Unfortunately, even this didn't help. I had configured it to sample only 1% of INP samples. Should I try turning the enableInp flag to false?

Screenshot 2024-04-20 at 7 18 20 PM

rajat2502 avatar Apr 20 '24 13:04 rajat2502

@rajat2502 are you using the tunnelRoute option? If so, can you try turning it off?

lforst avatar Apr 23 '24 07:04 lforst

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

getsantry[bot] avatar May 16 '24 07:05 getsantry[bot]