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

[Question/Bug] _reportAllChanges is not applied in CLS

Open akbarnafisa opened this issue 3 years ago • 2 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 package are you using?

@sentry/vue

SDK Version

7.9.0

Framework Version

Vue 2.6.0

Link to Sentry event

No response

Steps to Reproduce

  1. Set configuration with _reportAllChanges
new BrowserTracing({
  idleTimeout: 3000,
  _metricOptions: {
    _reportAllChanges: false,
  },
})
  1. enable debug mode
  2. open the web page and see pageload transaction

After doing quick search, the reportAllChanges is not used for CLS, only for LCP, is there any reason behind this? image

Expected Result

CLS score should be measured

Actual Result

CLS score is not measured

akbarnafisa avatar Aug 22 '22 06:08 akbarnafisa

Hi @akbarnafisa thanks for writing in. Apologies for the late reply!

That's interesting, because getCLS does have reportAllChanges as an optional param in its signature but the variable isn't passed in the call. Might be an oversight but it might also be intentional.

Since my context on web vitals is limited: @AbhiPrasad do you have more details on this?

Lms24 avatar Aug 29 '22 08:08 Lms24

reportAllChanges only affecting LCP is intentional, since we put that option to help increase LCP count on transactions. I think we can re-evaluate this, but let's do it when we upgrade to web-vitals v3 https://github.com/getsentry/sentry-javascript/issues/5462

AbhiPrasad avatar Aug 29 '22 20:08 AbhiPrasad

As with https://github.com/getsentry/sentry-javascript/releases/tag/7.42.0 we've made sure to report CLS when possible on transaction finish, so closing this issue.

AbhiPrasad avatar Mar 09 '23 14:03 AbhiPrasad