Skip to content

feat(vue): Register a route provider backed by the Vue router matcher - #23553

Closed
logaretm wants to merge 1 commit into
awad/route-provider-react-routerfrom
awad/route-provider-vue
Closed

feat(vue): Register a route provider backed by the Vue router matcher#23553
logaretm wants to merge 1 commit into
awad/route-provider-react-routerfrom
awad/route-provider-vue

Conversation

@logaretm

@logaretm logaretm commented Aug 24, 2026

Copy link
Copy Markdown
Member

Registers a route provider backed by Vue Router's own matcher.

The provider always returns the matched path, never route.name, even under routeLabel: 'name'. Callers set url.template from the resolved string and a route name is not a template, so the provider has to stay a path. The navigation instrumentation still names the span after the route name when the user asked for it.

Matcher-backed rather than fed from beforeEach, because beforeEach is registered after the pageload span is already created. Resolving against the router means Vue is one of the SDKs that can name its pageload span at creation once the consumers land, instead of renaming it after the fact.

Vue Router 3 resolves to { route } while 4+ returns the route directly, so the provider discriminates on matched.

Part of #23556

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.56 kB - -
@sentry/browser - with treeshaking flags 26.92 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.82 kB - -
@sentry/browser (incl. Tracing) 48.96 kB +0.43% +207 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 48.97 kB +0.43% +205 B 🔺
@sentry/browser (incl. Tracing, Profiling) 51.89 kB +0.41% +211 B 🔺
@sentry/browser (incl. Tracing, Replay) 88.47 kB +0.28% +245 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.8 kB +0.23% +173 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 93.16 kB +0.25% +225 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 106.11 kB +0.24% +253 B 🔺
@sentry/browser (incl. Feedback) 46.05 kB - -
@sentry/browser (incl. sendFeedback) 33.62 kB - -
@sentry/browser (incl. FeedbackAsync) 38.73 kB - -
@sentry/browser (incl. Metrics) 29.51 kB - -
@sentry/browser (incl. Logs) 29.8 kB - -
@sentry/browser (incl. Metrics & Logs) 30.43 kB - -
@sentry/react 30.3 kB - -
@sentry/react (incl. Tracing) 51.17 kB +0.45% +225 B 🔺
@sentry/vue 35.73 kB - -
@sentry/vue (incl. Tracing) 51.46 kB +0.87% +440 B 🔺
@sentry/svelte 28.59 kB - -
CDN Bundle 30.72 kB +1.23% +372 B 🔺
CDN Bundle (incl. Tracing) 49.82 kB +0.89% +438 B 🔺
CDN Bundle (incl. Logs, Metrics) 32.98 kB +1.24% +402 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 51.7 kB +0.88% +450 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 73.51 kB +0.47% +337 B 🔺
CDN Bundle (incl. Tracing, Replay) 87.28 kB +0.49% +421 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.15 kB +0.47% +417 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 93.2 kB +0.44% +400 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.14 kB +0.53% +498 B 🔺
CDN Bundle - uncompressed 91.23 kB +1.43% +1.28 kB 🔺
CDN Bundle (incl. Tracing) - uncompressed 148.6 kB +0.96% +1.4 kB 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.53 kB +1.34% +1.28 kB 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 154.29 kB +0.92% +1.4 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.69 kB +0.57% +1.28 kB 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 268.1 kB +0.53% +1.4 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.77 kB +0.52% +1.4 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.8 kB +0.5% +1.4 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 287.46 kB +0.49% +1.4 kB 🔺
@sentry/nextjs (client) 53.99 kB +0.8% +428 B 🔺
@sentry/sveltekit (client) 49.74 kB +1.13% +551 B 🔺
@sentry/core/server 65.67 kB - -
@sentry/core/browser 52.26 kB +0.77% +395 B 🔺
@sentry/node 123.77 kB +0.02% +20 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 85.53 kB - -
@sentry/node - without tracing 88.03 kB +0.02% +14 B 🔺
@sentry/node - without channel injection 103.18 kB +0.03% +22 B 🔺
@sentry/aws-serverless 96.42 kB +0.03% +26 B 🔺
@sentry/cloudflare (withSentry) - minified 201.04 kB - -
@sentry/cloudflare (withSentry) 500.26 kB - -

View base workflow run

@logaretm
logaretm force-pushed the awad/route-provider-nextjs branch from af59909 to 737c9cf Compare August 24, 2026 20:11
@logaretm
logaretm force-pushed the awad/route-provider-vue branch from 3232b67 to 09293e3 Compare August 24, 2026 20:11
@logaretm
logaretm force-pushed the awad/route-provider-nextjs branch from 737c9cf to 5d8e20b Compare August 24, 2026 20:17
@logaretm
logaretm force-pushed the awad/route-provider-vue branch 2 times, most recently from 2270fa1 to 0329f44 Compare August 24, 2026 20:27
@logaretm
logaretm force-pushed the awad/route-provider-nextjs branch from 5d8e20b to 464c7d0 Compare August 24, 2026 20:52
@logaretm
logaretm force-pushed the awad/route-provider-vue branch from 0329f44 to b97883e Compare August 24, 2026 20:52
@logaretm
logaretm force-pushed the awad/route-provider-nextjs branch from 464c7d0 to 1eb7910 Compare August 24, 2026 20:57
@logaretm
logaretm force-pushed the awad/route-provider-vue branch from b97883e to 03f9074 Compare August 24, 2026 20:57
@logaretm
logaretm force-pushed the awad/route-provider-nextjs branch from 1eb7910 to 21288e6 Compare August 31, 2026 16:39
@logaretm
logaretm force-pushed the awad/route-provider-vue branch from 03f9074 to 76f3c07 Compare August 31, 2026 16:39
Labels routes through the same helper the navigation instrumentation uses, so a
route resolved by the provider can't disagree with the one on the span.

Handles both resolve shapes: Vue Router 3 returns `{ route }`, Vue Router 4+
returns the route itself.
@logaretm
logaretm force-pushed the awad/route-provider-nextjs branch from 21288e6 to fec1a68 Compare August 31, 2026 17:05
@logaretm
logaretm force-pushed the awad/route-provider-vue branch from 76f3c07 to beda5be Compare August 31, 2026 17:05
@logaretm
logaretm changed the base branch from awad/route-provider-nextjs to awad/route-provider-react-router August 31, 2026 17:13
@logaretm logaretm closed this Aug 31, 2026
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.

1 participant