Skip to content

Conversation

@billyvg
Copy link
Member

@billyvg billyvg commented Feb 18, 2023

value was being used as ms but start/end timestamps are in seconds. Changed start and end to be equal because LCP does not have a duration, it is a single point in time. This also corrects the timestamp to be when the LCP occurs (rather than the previous start timestamp which is wrong and generally ends up around page load time).

`value` was being used as ms but start/end timestamps are in seconds. Changed start and end to be equal because LCP does not have a duration, it is a single point in time.
billyvg added a commit to getsentry/sentry that referenced this pull request Feb 18, 2023
Changes LCP breadcrumb rendering to use `data.value` instead of trying to calculate the value (which ends up resulting in incorrect values as it uses the replay start timestamp, so LCP from a refresh will be wrong).

Related getsentry/sentry-javascript#7225
@billyvg billyvg marked this pull request as ready for review February 18, 2023 00:44
@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.07 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 62.3 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.69 KB (-0.01% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 55.31 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.41 KB (0%)
@sentry/browser - Webpack (minified) 66.76 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.44 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.86 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.94 KB (0%)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.2 KB (-0.01% 🔽)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 42.57 KB (+0.01% 🔺)
@sentry/replay - Webpack (gzipped + minified) 36.78 KB (+0.01% 🔺)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 60.21 KB (+0.01% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 53.81 KB (+0.01% 🔺)

Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - we should def. add some integration tests checking the actual captured values from the browser there cc @Lms24

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

LGTM - we should def. add some integration tests checking the actual captured values from the browser there

Sure, it's probably simplest to adjust the custom events integration test to check that the LCP entry has equal start and end times. Will open a quick PR

EDIT: #7229

@billyvg billyvg merged commit 8e27ff9 into develop Feb 23, 2023
@billyvg billyvg deleted the fix-replay-fix-timestamps-for-lcp branch February 23, 2023 14:23
billyvg added a commit to getsentry/sentry that referenced this pull request Feb 28, 2023
Changes LCP breadcrumb rendering to use `data.value` instead of trying to calculate the value (which ends up resulting in incorrect values as it uses the replay start timestamp, so LCP from a refresh will be wrong).



Related getsentry/sentry-javascript#7225

Note that the above PR changes start + end timestamps to be equal since LCP is a single point in time rather than a range. The above PR also corrects the timestamp to be when the LCP occurs (rather than the previous start timestamp which is wrong and generally ends up around page load time).

Adds a warning for old SDK versions: 
![image](https://user-images.githubusercontent.com/79684/221275312-bbd5d365-4d33-483b-a6b7-658a5c325b9e.png)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants