-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat(replay): Use SDK value for LCP #44868
Conversation
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
size-limit report 📦
|
if (crumb.data?.value !== undefined) { | ||
return `${crumb.data.value}ms`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means replays with older SDKs will not have any value, but only the first LCP value would be accurate. Wonder if we stick a SDK upgrade CTA here 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing is better than something which is wrong imo.
if we're doing a cta to upgrade the sdk we should be looking at the most recent replay and it's version, because they might've just updated and this a replay from last week that's being viewed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point re: most recent replay -- I think we'll make the CTA just a tooltip so it's less intrusive and keep it simple by looking at the replay's version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
show the timestamp we get from the sdk, less frontend converting values.
if (crumb.timestamp && startTimestampMs) { | ||
return `${new Date(crumb.timestamp).getTime() - startTimestampMs}ms`; | ||
if (crumb.data?.value !== undefined) { | ||
return `${Math.round(crumb.data.value)}ms`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just float things
if (crumb.data?.duration !== undefined) { | ||
// this means user is using an old SDK where LCP values are not | ||
// always correct. Prompt them to upgrade | ||
return ( | ||
<Tooltip | ||
title={t( | ||
'This replay uses a SDK version that is subject to inaccurate LCP values. Please upgrade to the latest version for best results if you have not already done so.' | ||
)} | ||
> | ||
<IconWarning /> | ||
</Tooltip> | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is new since last PR -- ss in PR desc.
@@ -74,7 +75,9 @@ function BreadcrumbItem({ | |||
) : null} | |||
</TitleContainer> | |||
|
|||
<Description title={description}>{description}</Description> | |||
<Tooltip title={description} showOnlyOnOverflow> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously it was expecting a string, now it uses <Tooltip>
so that we can also hide the native tooltip when it is not overflowing.
* master: (37 commits) ref(ppf): Don't use --commit-batch-size for futures queue length (#45182) feat(codecov-v2): Add more logging (#45225) fix(alerts): Center table items on alert history page (#45226) feat(CapMan): Pass `tenant_ids` to Snuba (#44788) ref(db): Drop `project_id` from Environment (model state) (#45207) chore(profiling): Rename context in profiles task (#45208) feat(replays): Improve index page query performance (#45098) chore(issue assignment): Add logging for`GroupOwner` auto assignment (#45142) fix(hybrid-cloud): Uncache organization when queueing it for deletion (#45213) fix(perf): Navigating to Transaction Summary from Trends widget should persist custom date selection (#45190) fix(pageFilter): Fix overflow (#45169) ref(git hooks): Only suggest autoupdate variable when pulling if not already set (#45179) fix(dashboard): Include dashboard filters in widget viewer (#45106) fix(alerts): Remove null projects from alerts list (#45202) feat(replay): Update Inline replay onboarding img to support dark mode (#45084) __iexact reduce call has default value now. (#45206) feat(replay): Use SDK value for LCP (#44868) chore(hybrid-cloud): breaking foreign keys (#45203) Revert "ref(db): Drop `project_id` from Environment (model state) (#45094)" ref(db): Drop `project_id` from Environment (model state) (#45094) ...
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: