Skip to content

Conversation

@lforst
Copy link
Contributor

@lforst lforst commented Aug 29, 2022

Fixes #5641

Currently we are not starting transactions in Next.js when navigating from one page to another, but within the same route (eg. from /users/42 to /users/1337, both are on the same route /users/[id]).

This PR fixes this by starting a transaction for those navigations by looking at the window pathname instead. (See code changes for reason why we're not starting transactions when just the query string changes)

@github-actions
Copy link
Contributor

github-actions bot commented Aug 29, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.41 KB (+0.02% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 60.06 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 17.98 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 52.92 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 19.77 KB (0%)
@sentry/browser - Webpack (minified) 64.31 KB (0%)
@sentry/react - Webpack (gzipped + minified) 19.79 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 44.71 KB (+0.02% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 25.9 KB (+0.01% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.27 KB (+0.01% 🔺)

@lforst lforst merged commit 7633952 into master Aug 29, 2022
@lforst lforst deleted the lforst-fix-same-route-navigations branch August 29, 2022 19:17
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.

Next.js navigation transactions are broken for same-route navigations

3 participants