Skip to content
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(nextjs): Add captureRouterTransitionStart hook for capturing navigations #15981

Merged
merged 5 commits into from
Apr 7, 2025

Conversation

lforst
Copy link
Member

@lforst lforst commented Apr 4, 2025

We relied on Next.js internals for navigation spans and that inevitably broke so Next.js added a onRouterTransitionStart hook in instrumentation-client.ts (vercel/next.js#77791) for us to use.

This PR exposes a handler called captureRouterTransitionStart for that hook so that we can actually instrument navigations again.

lforst

This comment was marked as resolved.

Copy link
Contributor

github-actions bot commented Apr 4, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.26 KB - -
@sentry/browser - with treeshaking flags 23.09 KB - -
@sentry/browser (incl. Tracing) 36.91 KB - -
@sentry/browser (incl. Tracing, Replay) 74.11 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.48 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 78.77 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 90.58 KB - -
@sentry/browser (incl. Feedback) 39.65 KB - -
@sentry/browser (incl. sendFeedback) 27.87 KB - -
@sentry/browser (incl. FeedbackAsync) 32.65 KB - -
@sentry/react 25.06 KB - -
@sentry/react (incl. Tracing) 38.83 KB - -
@sentry/vue 27.47 KB - -
@sentry/vue (incl. Tracing) 38.64 KB - -
@sentry/svelte 23.29 KB - -
CDN Bundle 24.5 KB - -
CDN Bundle (incl. Tracing) 36.94 KB - -
CDN Bundle (incl. Tracing, Replay) 71.99 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 77.15 KB - -
CDN Bundle - uncompressed 71.45 KB - -
CDN Bundle (incl. Tracing) - uncompressed 109.21 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 220.5 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 233.03 KB - -
@sentry/nextjs (client) 40.46 KB +0.29% +116 B 🔺
@sentry/sveltekit (client) 37.35 KB - -
@sentry/node 142.92 KB - -
@sentry/node - without tracing 96.13 KB +0.01% +1 B 🔺
@sentry/aws-serverless 120.47 KB -0.01% -1 B 🔽

View base workflow run

@lforst lforst marked this pull request as draft April 4, 2025 08:52
@lforst lforst marked this pull request as ready for review April 7, 2025 11:17
@lforst lforst requested review from mydea, Lms24 and AbhiPrasad April 7, 2025 11:17
@@ -1,5 +1,3 @@
'use client';
Copy link
Member

Choose a reason for hiding this comment

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

lol i guess that makes sense

@lforst lforst merged commit 9e477cd into develop Apr 7, 2025
129 checks passed
@lforst lforst deleted the lforst-capture-router-transition-start branch April 7, 2025 11:53
Sign up for free to 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.

2 participants