Closed
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.8.0
Framework Version
18.1.0
Link to Sentry event
Steps to Reproduce
Here's a simplified version of my relevant react-router (react-router-dom
version 6.2.1
) and Sentry config:
Sentry.init({
...
integrations: [
new BrowserTracing({
routingInstrumentation: Sentry.reactRouterV6Instrumentation(
useEffect,
useLocation,
useNavigationType,
createRoutesFromChildren,
matchRoutes,
),
}),
],
});
const SentryRoutes = Sentry.withSentryReactRouterV6Routing(Routes);
const MyRoutes = () => {
return (
<SentryRoutes>
<Route index element={<Navigate to="/projects" />} />
<Route path="/account" element={<AccountPage />} />
<Route path="/projects">
<Route index element={<ProjectBrowser />} />
<Route path=":projectId" element={<ProjectPage />}>
<Route index element={<ProjectPageRoot />} />
<Route element={<EditorPage />}>
<Route path="views/:viewId" element={<ViewCanvas />} />
<Route path="spaces/:spaceId" element={<SpaceCanvas />} />
</Route>
</Route>
</Route>
<Route path="*" element={<NoMatchPage />} />
</SentryRoutes>
);
};
export default MyRoutes
As far as I can tell, I'm not doing anything unusual, except possibly the use of react router's Outlets and Layout Routes.
Expected Result
With this config, I'd expect to get transactions with names like /projects/:projectId/views/:viewId
.
Actual Result
Instead, I'm getting transactions with names like /projects/e7962d8a-e041-4006-9f44-d84ffabbdad9/views/982ebfaa-1e51-4726-9ca4-b04869e395b5
.