fix(vue): Correct span name assignment for matched routes in VueRouter#12398
fix(vue): Correct span name assignment for matched routes in VueRouter#12398Lms24 merged 3 commits intogetsentry:developfrom
Conversation
There was a problem hiding this comment.
Hey @soch4n thanks for opening this PR! The changes look good to me on first glance.
Have you tested this with Vue 3 and/or Vue 2? Similarly, does this change work with all Vue router versions we support (2,3,4) ? I'm not saying you necessarily have to test in all of these combinations but it would be great to know where this was tested.
Similarly, I think it'd be best if we could Add an E2E test for nested routes so that we don't only rely on artificially created routing events in the unit tests.
If you take a look at our Vue E2E test, I think it should be fairly straight forward to add a nested route and a test similar to this one. Are you interested in adding this test? If not, just let me know then we'll take over.
|
Oh also, it seems like CI isn't happy with file formatting. It's easiest to run |
@Lms24
I have verified that to.matched behaves similarly across these versions. I've added an E2E test. 1319288 |
@Lms24 |
|
Argh right, I forgot, E2E tests don't run in CI for external PRs. I'll clone your branch and submit a draft PR to run e2e tests. Will keep you posted. |
…12398) Fix an issue where the correct transactionName could not be obtained when using nested routes in VueRouter.

Fixed an issue where the correct transactionName could not be obtained when using nested routes in VueRouter.
Nested Routes Example
Before
TransactionName would always be "/" for nestedRoute.
After
The correct value (/categories/:categoryId) is set.
Reference
https://router.vuejs.org/guide/essentials/nested-routes.html