Skip to content

feat(nuxt): Register nuxt route provider - #23794

Open
logaretm wants to merge 5 commits into
awad/route-provider-vue-appfrom
awad/route-provider-nuxt
Open

logaretm wants to merge 5 commits into
awad/route-provider-vue-appfrom
awad/route-provider-nuxt

Conversation

@logaretm

Copy link
Copy Markdown
Member

Registers a route provider for Nuxt in the client plugin, outside the __SENTRY_TRACING__ guard.

Nuxt installs the router before its plugins run, so the plugin can read it straight off nuxtApp rather than waiting for a Vue app the way @sentry/vue has to. Reuses createVueRouteProvider from #23553's successor rather than reimplementing the vue-router resolve handling.

Because it sits outside the tracing guard, route parameterization survives when tracing is tree-shaken away.

Part of #23556

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you apply the label PR: no-auto-close I will leave it alone ... forever!

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.24 kB - -
@sentry/browser - with treeshaking flags 27.5 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.4 kB - -
@sentry/browser (incl. Tracing) 51.16 kB +0.02% +9 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 51.18 kB +0.02% +8 B 🔺
@sentry/browser (incl. Tracing, Profiling) 54.19 kB +0.02% +9 B 🔺
@sentry/browser (incl. Tracing, Replay) 90.77 kB +0.01% +8 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 79.87 kB +0.02% +9 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 95.47 kB +0.01% +7 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 108.42 kB +0.01% +8 B 🔺
@sentry/browser (incl. Feedback) 46.76 kB - -
@sentry/browser (incl. sendFeedback) 34.3 kB - -
@sentry/browser (incl. FeedbackAsync) 39.41 kB - -
@sentry/browser (incl. Metrics) 30.25 kB - -
@sentry/browser (incl. Logs) 30.51 kB - -
@sentry/browser (incl. Metrics & Logs) 31.18 kB - -
@sentry/react 31 kB - -
@sentry/react (incl. Tracing) 53.46 kB +0.03% +11 B 🔺
@sentry/vue 37 kB +0.72% +261 B 🔺
@sentry/vue (incl. Tracing) 53.86 kB +0.3% +159 B 🔺
@sentry/svelte 29.26 kB - -
CDN Bundle 30.93 kB - -
CDN Bundle (incl. Tracing) 51.7 kB +0.03% +12 B 🔺
CDN Bundle (incl. Logs, Metrics) 33.2 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 53.67 kB +0.03% +11 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 73.92 kB - -
CDN Bundle (incl. Tracing, Replay) 89.29 kB +0.02% +9 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.25 kB +0.01% +9 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 95.46 kB +0.02% +11 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 97.43 kB +0.02% +12 B 🔺
CDN Bundle - uncompressed 91.4 kB - -
CDN Bundle (incl. Tracing) - uncompressed 153.81 kB +0.03% +41 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.97 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 159.77 kB +0.03% +41 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 227.54 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 273.54 kB +0.02% +41 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 279.48 kB +0.02% +41 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.25 kB +0.02% +41 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 293.17 kB +0.02% +41 B 🔺
@sentry/nextjs (client) 56.03 kB +0.46% +254 B 🔺
@sentry/sveltekit (client) 51.6 kB +0.02% +9 B 🔺
@sentry/core/server 39.96 kB +0.03% +11 B 🔺
@sentry/core/browser 13.63 kB - -
@sentry/node 133.91 kB +0.02% +18 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.43 kB - -
@sentry/node - without tracing 90.47 kB +0.04% +28 B 🔺
@sentry/node - without channel injection 112.42 kB +0.02% +20 B 🔺
@sentry/aws-serverless 98.72 kB +0.02% +13 B 🔺
@sentry/cloudflare (withSentry) - minified 206.53 kB +0.03% +49 B 🔺
@sentry/cloudflare (withSentry) 513.8 kB +0.02% +70 B 🔺

View base workflow run

@logaretm
logaretm force-pushed the awad/route-provider-nuxt branch 2 times, most recently from 54f0ca2 to 0766878 Compare September 24, 2026 18:50
@logaretm
logaretm force-pushed the awad/route-provider-nuxt branch from 0766878 to 33c0138 Compare September 24, 2026 19:11
@logaretm
logaretm force-pushed the awad/route-provider-nuxt branch from 33c0138 to b00dc56 Compare September 24, 2026 19:59
@logaretm logaretm changed the title feat(nuxt): Register a route provider outside the tracing guard feat(nuxt): Register nuxt route provider Sep 24, 2026
@logaretm

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b00dc56. Configure here.

Comment thread packages/nuxt/src/runtime/plugins/sentry.client.ts
Nuxt installs the router before its plugins run, so the client plugin can read
it straight off `nuxtApp` rather than waiting for a Vue app the way
`@sentry/vue` does.

Registered outside the `__SENTRY_TRACING__` guard, so route parameterization
survives when tracing is tree-shaken away. Reuses `createVueRouteProvider`
rather than reimplementing the vue-router resolve handling.
@logaretm
logaretm force-pushed the awad/route-provider-nuxt branch from b00dc56 to 25a1d20 Compare September 24, 2026 21:20
@logaretm
logaretm marked this pull request as ready for review September 24, 2026 21:26
@logaretm
logaretm requested a review from a team as a code owner September 24, 2026 21:26
@logaretm
logaretm requested review from chargome and nicohrubec and removed request for a team September 24, 2026 21:26
@logaretm
logaretm requested a review from s1gr1d September 24, 2026 21:26

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants