-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[react-router-6] Nested Routers produce wrong parametrized URL #5997
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/react
SDK Version
7.16
Framework Version
React 18
Link to Sentry event
Steps to Reproduce
I have quite a complex router so I recreated a small part of it here with repro steps in the readme: https://github.com/tirli/repro-sentry-react-router
I'm pretty sure several nested SentryRoutes are to blame here but I cannot rewrite my usage of the router :( Also, I've seen a lot of similar issues that are blaming the wrong order of sentry init and router usage so I checked this case and I feel like it's not the problem here
Expected Result
http://localhost:5173/monitor/projects/:projectId/:siteId in error details
Actual Result
http://localhost:5173/monitor/projects/someProjectId/someSiteId
Metadata
Metadata
Assignees
Labels
Fields
Give feedbackProjects
Status
Status
Status