Skip to content

fix(react): Detect React Router v6/v7 navigations in a layout effect to propagate the correct trace - #21326

Merged
chargome merged 4 commits into
developfrom
cg/rr-trace-fix
Jun 3, 2026
Merged

fix(react): Detect React Router v6/v7 navigations in a layout effect to propagate the correct trace#21326
chargome merged 4 commits into
developfrom
cg/rr-trace-fix

Conversation

@chargome

Copy link
Copy Markdown
Member

Fixes React Router v6/v7 propagating the stale pageload trace for requests in route mount effects

closes#21322

@chargomechargome self-assigned this Jun 3, 2026
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser27.2 kB--
@sentry/browser - with treeshaking flags25.65 kB--
@sentry/browser (incl. Tracing)45.25 kB--
@sentry/browser (incl. Tracing + Span Streaming)47.48 kB--
@sentry/browser (incl. Tracing, Profiling)50.24 kB--
@sentry/browser (incl. Tracing, Replay)84.87 kB--
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags74.44 kB--
@sentry/browser (incl. Tracing, Replay with Canvas)89.58 kB--
@sentry/browser (incl. Tracing, Replay, Feedback)102.2 kB--
@sentry/browser (incl. Feedback)44.36 kB--
@sentry/browser (incl. sendFeedback)32.02 kB--
@sentry/browser (incl. FeedbackAsync)37.11 kB--
@sentry/browser (incl. Metrics)28.27 kB--
@sentry/browser (incl. Logs)28.51 kB--
@sentry/browser (incl. Metrics & Logs)29.22 kB--
@sentry/react29.03 kB--
@sentry/react (incl. Tracing)47.58 kB+0.12%+53 B 🔺
@sentry/vue32.22 kB--
@sentry/vue (incl. Tracing)47.17 kB--
@sentry/svelte27.23 kB--
CDN Bundle29.57 kB--
CDN Bundle (incl. Tracing)47.82 kB--
CDN Bundle (incl. Logs, Metrics)31.08 kB--
CDN Bundle (incl. Tracing, Logs, Metrics)49.06 kB--
CDN Bundle (incl. Replay, Logs, Metrics)70.36 kB--
CDN Bundle (incl. Tracing, Replay)85.22 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)86.39 kB--
CDN Bundle (incl. Tracing, Replay, Feedback)91.08 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)92.23 kB--
CDN Bundle - uncompressed87.7 kB--
CDN Bundle (incl. Tracing) - uncompressed144.13 kB--
CDN Bundle (incl. Logs, Metrics) - uncompressed92.19 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed147.88 kB--
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed217 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed262.99 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed266.74 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed276.69 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed280.42 kB--
@sentry/nextjs (client)50.05 kB--
@sentry/sveltekit (client)45.71 kB--
@sentry/core/server75.94 kB--
@sentry/core/browser63.09 kB--
@sentry/node-core61.7 kB+0.01%+4 B 🔺
@sentry/node130.4 kB--
@sentry/node - without tracing74.06 kB+0.01%+2 B 🔺
@sentry/aws-serverless86.26 kB--
@sentry/cloudflare (withSentry) - minified171.85 kB--
@sentry/cloudflare (withSentry)429.49 kB--

View base workflow run

@chargome

Copy link
Copy Markdown
MemberAuthor

bugbot run

@cursorcursorBot left a comment

Copy link
Copy Markdown

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 b0fdf27. Configure here.

@chargome
chargome marked this pull request as ready for review June 3, 2026 13:17
@chargome
chargome requested a review from a team as a code ownerJune 3, 2026 13:17
@chargome
chargome requested review from nicohrubec and s1gr1d and removed request for a teamJune 3, 2026 13:17
Sign up for freeto 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.

React Router v6 propagates stale pageload trace for requests fired in a route's mount effect

2 participants

@chargome@s1gr1d