Skip to content

fix(replays): Handle replay frames without data or payload - #128517

Merged
gggritso merged 4 commits into
masterfrom
georgegritsouk/replay-1022-missing-replay-breadcrumb-data-causes-minor-incomplete-ui
Oct 26, 2026
Merged

gggritso merged 4 commits into
masterfrom
georgegritsouk/replay-1022-missing-replay-breadcrumb-data-causes-minor-incomplete-ui

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Generally, SDKs often send Replay events (breadcrumbs) with no payload and when we try to inflate them into the UI, the code errors out in small ways and big. In this day and age, we just cannot rely on all the data being there, so we're going to gracefully degrade instead.

For breadcrumbs, depending on type, we're going to reconstruct as much as possible based on the data, but without assuming we have it. e.g., an incomplete CLS might be "Cumulative Layout Shift" in the UI, even if we lost the attribution information and we don't know the CLS element.

Closes REPLAY-1022

via George Gritsouk.

--

View Junior Session [Sentry]

Some SDKs send breadcrumb events without a payload and breadcrumb or span frames without data, even where the SDK types require them. A breadcrumb with no payload threw in hydrateFrames and blanked the whole replay, and a resource span with no data crashed the Network tab.

Make data optional on hydrated breadcrumb and span types so the compiler flags every unguarded read, and use optional chaining at those reads. Hydration skips payload-less breadcrumbs and logs missing data without backfilling it.

Refs REPLAY-1022

Co-Authored-By: George Gritsouk <[email protected]>
@linear-code

linear-code Bot commented Oct 22, 2026

Copy link
Copy Markdown

REPLAY-1022

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 95.78% 95.78% ±0%
Typed 141,775 141,792 🟢 +17
Untyped 6,253 6,254 🔴 +1
🔍 1 new type safety issue introduced

Type assertions (as) (1 new)

File Line Detail
static/app/utils/replays/hydrateFrames.tsx 32 `as RawBreadcrumbFrame

This is informational only and does not block the PR.

When a frame is missing data, describe it with a sentence that omits the missing value and its unit instead of leaving a blank (e.g. "took  ms"). Clicks on a missing node now read "an unknown element" instead of "undefined".

Refs REPLAY-1022

Co-Authored-By: George Gritsouk <[email protected]>

@gggritso gggritso left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense overall. One ask is to make sure that the UI recovers some value whenever possible. If an event is known at all, ideally something shows up in the UI.

When a CLS web vital frame has no attributions (or no extracted
selectors), still render a Layout shifts row using the frame's overall
score with an unknown element, instead of dropping the row.
@gggritso

Copy link
Copy Markdown
Member

@cursor review

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

A web vital frame with a value but no rating rendered 'No value
recorded'. Show the value instead, and only fall back to that text
when the value is missing too.

@gggritso gggritso left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense, just one request for clarification

@gggritso

Copy link
Copy Markdown
Member

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 3f138d1. Configure here.

@gggritso
gggritso marked this pull request as ready for review October 22, 2026 19:49
@gggritso
gggritso requested a review from a team as a code owner October 22, 2026 19:49
@gggritso
gggritso merged commit ee29716 into master Oct 26, 2026
76 checks passed
@gggritso
gggritso deleted the georgegritsouk/replay-1022-missing-replay-breadcrumb-data-causes-minor-incomplete-ui branch October 26, 2026 15:40

This branch was successfully deployed

1 active deployment
Preview — 3f138d17 Deployed Oct 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants