Browse Source

fix(replay): LCP breadcrumbs link to wrong tab (#44466)

Fix to open DOM Events tab instead of Console

Closes https://github.com/getsentry/sentry/issues/44416
Billy Vong 2 years ago
parent
commit
338645fac2
1 changed files with 9 additions and 0 deletions
  1. 9 0
      static/app/utils/replays/hooks/useCrumbHandlers.tsx

+ 9 - 0
static/app/utils/replays/hooks/useCrumbHandlers.tsx

@@ -49,6 +49,15 @@ function useCrumbHandlers(startTimestampMs: number = 0) {
         setCurrentTime(relativeTimeInMs(crumb.timestamp, startTimestampMs));
       }
 
+      if (
+        crumb.data &&
+        'action' in crumb.data &&
+        crumb.data.action === 'largest-contentful-paint'
+      ) {
+        setActiveTab('dom');
+        return;
+      }
+
       if ('type' in crumb) {
         switch (crumb.type) {
           case BreadcrumbType.NAVIGATION: