-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(vue): Correct span name assignment for matched routes in VueRouter #12398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(vue): Correct span name assignment for matched routes in VueRouter #12398
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for adding the test @soch4n! It looks fine to me. Let's see if CI is happy but from my PoV we can merge this and include it in the next release.
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