Conversation
size-limit report 📦
|
|
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 |
a1394dd to
ece4da5
Compare
ece4da5 to
a309ce7
Compare
a309ce7 to
3dbcc53
Compare
3dbcc53 to
227053e
Compare
22d7992 to
e741e61
Compare
|
bugbot run |
e741e61 to
b344925
Compare
| defaultIntegrations: [...getDefaultIntegrations(options), vueIntegration()], | ||
| // The router is read off the app on each call, so `app.use(router)` can run either side of `init`, and | ||
| // users who never pass `router` to the tracing integration still get parameterized routes. | ||
| ...(options.app && { routeProvider: createVueRouteProvider(() => getRouterFromApp(options.app)) }), |
There was a problem hiding this comment.
In Vue 2, this would be options.App (make sure to also test Vue 2 E2E)
There was a problem hiding this comment.
do we have a Vue 2 E2E? should I add one?
b344925 to
fa6bf94
Compare
|
👋 @chargome, @nicohrubec — Please review this PR when you get a chance! |
fa6bf94 to
57914a9
Compare
57914a9 to
63d9a6f
Compare
63d9a6f to
8a6336a
Compare
8a6336a to
3f219dc
Compare
`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.
3f219dc to
0b03209
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 89d893e. Configure here.
| // The router is looked up lazily because it may be installed after `init`. A user's `routeProvider` wins. | ||
| if (!getRouteProvider(client)) { | ||
| const { app, Vue } = options; | ||
| const getRouter = app ? () => getRouterFromApp(app) : captureRouterFromVue(Vue!); |
There was a problem hiding this comment.
Non-null assertion lacks required comment
Low Severity
A new non-null assertion on Vue has no comment explaining why a safer type is not possible. The earlier app/Vue guard makes the assertion valid, but the project rule still requires that comment on new ! uses in SDK source. Flagged because this was mentioned in the review rules file.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 89d893e. Configure here.


Registers a route provider for Vue, read off the Vue app the SDK is already given.
vue-routersetsapp.config.globalProperties.$routerwhen 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 passroutertobrowserTracingIntegration, 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 ofSentry.init().Returns the matched path rather than
route.name, even underrouteLabel: 'name'. Callers seturl.templatefrom 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