feat(solid): Add route parametrization for Solid Router#20031
Merged
andreiborza merged 1 commit intodevelopfrom Mar 30, 2026
Merged
feat(solid): Add route parametrization for Solid Router#20031andreiborza merged 1 commit intodevelopfrom
andreiborza merged 1 commit intodevelopfrom
Conversation
This PR adds route parametrization for the solidRouterBrowserTracingIntegration. It replaces raw URLs (e.g. /users/5) with parametrized routes (e.g. /users/:id) in transaction names.
Contributor
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Deps
Nuxt
Other
Bug Fixes 🐛
Documentation 📚
Internal Changes 🔧Core
Deps
Deps Dev
Other
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: Negative assertion checks wrong source, weakening regression test
- Changed test assertions from 'route' to 'url' to match the source value at span creation time when spanStart event fires.
- ✅ Fixed: Numeric navigation deltas beyond -1 block effect updates
- Updated pendingNavigationTarget guard to use regex pattern /^-\d+$/ to handle all numeric deltas, not just -1.
Or push these changes by commenting:
@cursor push 98f020cc69
Preview (98f020cc69)
diff --git a/packages/solid/src/solidrouter.ts b/packages/solid/src/solidrouter.ts
--- a/packages/solid/src/solidrouter.ts
+++ b/packages/solid/src/solidrouter.ts
@@ -91,9 +91,9 @@
// transition completes. In that case, location.pathname still points
// to the old route while the active span is already the navigation span.
// Skip the update to avoid overwriting the span with stale route data.
- // `-1` is solid router's representation of a browser back-button
- // navigation, where we don't know the target URL upfront.
- if (pendingNavigationTarget && pendingNavigationTarget !== '-1' && name !== pendingNavigationTarget) {
+ // Numeric deltas (e.g., `-1`, `-2`) are solid router's representation of
+ // browser back/forward navigations, where we don't know the target URL upfront.
+ if (pendingNavigationTarget && !pendingNavigationTarget.match(/^-\d+$/) && name !== pendingNavigationTarget) {
return;
}
pendingNavigationTarget = undefined;
diff --git a/packages/solid/test/solidrouter.test.tsx b/packages/solid/test/solidrouter.test.tsx
--- a/packages/solid/test/solidrouter.test.tsx
+++ b/packages/solid/test/solidrouter.test.tsx
@@ -188,7 +188,7 @@
op: 'navigation',
description: '/about',
data: expect.objectContaining({
- [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',
+ [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.solid.solidrouter',
}),
diff --git a/packages/solidstart/test/client/solidrouter.test.tsx b/packages/solidstart/test/client/solidrouter.test.tsx
--- a/packages/solidstart/test/client/solidrouter.test.tsx
+++ b/packages/solidstart/test/client/solidrouter.test.tsx
@@ -188,7 +188,7 @@
op: 'navigation',
description: '/about',
data: expect.objectContaining({
- [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',
+ [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.solidstart.solidrouter',
}),This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
Contributor
size-limit report 📦
|
nicohrubec
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This PR adds route parametrization for the solidRouterBrowserTracingIntegration. It replaces raw URLs (e.g. /users/5) with parametrized routes (e.g. /users/:id) in transaction names.
Closes: #16685