Merged
Conversation
`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
Contributor
size-limit report 📦
|
Lms24
approved these changes
Feb 20, 2023
Member
There was a problem hiding this comment.
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
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: 
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
valuewas 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).