Skip to content

feat(vue): Register a route provider read off the Vue app - #23793

Draft
logaretm wants to merge 1 commit into
awad/route-provider-astrofrom
awad/route-provider-vue-app
Draft

feat(vue): Register a route provider read off the Vue app#23793
logaretm wants to merge 1 commit into
awad/route-provider-astrofrom
awad/route-provider-vue-app

Conversation

@logaretm

Copy link
Copy Markdown
Member

Registers a route provider for Vue, read off the Vue app the SDK is already given.

vue-router sets app.config.globalProperties.$router when it installs, so the provider needs no new option and no router passed to the tracing integration. That means it works for users who never pass router to browserTracingIntegration, and route parameterization no longer depends on tracing being enabled.

The router is looked up per call rather than captured at registration, because app.use(router) may legitimately run either side of Sentry.init().

Returns the matched path rather than route.name, even under routeLabel: 'name'. Callers set url.template from this and a route name is an identifier, not a template. The navigation instrumentation still names the span after the route name when the user asked for it.

Part of #23556

`vue-router` sets `app.config.globalProperties.$router` when it installs, and the
SDK is already given the app, so the provider needs no new option and no router
passed to the tracing integration.

Registered from `init()`, so route parameterization no longer depends on tracing
being enabled and works for users who never pass `router` to
`browserTracingIntegration`. The router is looked up per call rather than
captured, because `app.use(router)` may run either side of `Sentry.init()`.

Returns the matched path rather than `route.name` even under
`routeLabel: 'name'`: callers set `url.template` from this and a route name is an
identifier, not a template. The navigation instrumentation still names the span
after the route name when the user asked for it.
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.56 kB added added
@sentry/browser - with treeshaking flags 26.92 kB added added
@sentry/browser - with treeshaking flags tracing without tracing 26.82 kB added added
@sentry/browser (incl. Tracing) 48.75 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 48.76 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.68 kB added added
@sentry/browser (incl. Tracing, Replay) 88.23 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.63 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 92.93 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 105.85 kB added added
@sentry/browser (incl. Feedback) 46.05 kB added added
@sentry/browser (incl. sendFeedback) 33.62 kB added added
@sentry/browser (incl. FeedbackAsync) 38.73 kB added added
@sentry/browser (incl. Metrics) 29.51 kB added added
@sentry/browser (incl. Logs) 29.8 kB added added
@sentry/browser (incl. Metrics & Logs) 30.43 kB added added
@sentry/react 30.3 kB added added
@sentry/react (incl. Tracing) 50.94 kB added added
@sentry/vue 36.03 kB added added
@sentry/vue (incl. Tracing) 51.33 kB added added
@sentry/svelte 28.59 kB added added
CDN Bundle 30.72 kB added added
CDN Bundle (incl. Tracing) 49.77 kB added added
CDN Bundle (incl. Logs, Metrics) 32.98 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 51.66 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 73.51 kB added added
CDN Bundle (incl. Tracing, Replay) 87.24 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.09 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 93.13 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.06 kB added added
CDN Bundle - uncompressed 91.23 kB added added
CDN Bundle (incl. Tracing) - uncompressed 148.48 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.53 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 154.17 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.69 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 267.98 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.65 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.68 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 287.35 kB added added
@sentry/nextjs (client) 53.97 kB added added
@sentry/sveltekit (client) 49.19 kB added added
@sentry/core/server 65.67 kB added added
@sentry/core/browser 52.26 kB added added
@sentry/node 123.77 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 85.53 kB added added
@sentry/node - without tracing 88.03 kB added added
@sentry/node - without channel injection 103.18 kB added added
@sentry/aws-serverless 96.42 kB added added
@sentry/cloudflare (withSentry) - minified 201.04 kB added added
@sentry/cloudflare (withSentry) 500.26 kB added added

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