-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
React Router 7 Library Mode: Navigation transactions are not created #16062
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
Comments
Assigning to @getsentry/support for routing ⏲️ |
Extra information that may be useful: import {
createBrowserRouter,
createRoutesFromChildren,
matchRoutes,
useLocation,
useNavigationType,
} from 'react-router';
import * as Sentry from '@sentry/react';
import { routes } from '@generouted/react-router';
const sentryCreateBrowserRouter = Sentry.wrapCreateBrowserRouterV7(createBrowserRouter);
const router = sentryCreateBrowserRouter(routes);
Sentry.init({
dsn: config.sentry.dsn,
environment: config.sentry.environment,
release: `antaeus@${config.app.version}`,
integrations: [
Sentry.reactRouterV7BrowserTracingIntegration({
useEffect,
useLocation,
useNavigationType,
createRoutesFromChildren,
matchRoutes,
}),
],
tracesSampleRate: 1.0,
});
const element = document.getElementById('root');
if (element) {
const root = ReactDOM.createRoot(element);
root.render(<App router={router} />);
} where import { RouterProvider, RouterProviderProps } from 'react-router';
export interface AppProps {
router: RouterProviderProps['router'];
}
export default function App({ router }: AppProps) {
return <RouterProvider router={router} />
} |
I have figure out what is going on here. This means, the |
Hey @jacquesg, thanks for filing this. Yes this checks out, I'll leave a comment in our docs to make this more visible! |
Environment
SaaS (https://sentry.io/)
Steps to Reproduce
Setup as per: https://docs.sentry.io/platforms/javascript/guides/react/features/react-router/v7/
Expected Result
Navigation transactions to be created.
Actual Result
No navigation transactions are created.
They are expected to be sprinkled between the NestJS lines in the screenshot. The pageload transaction is present though.
Product Area
Unknown
Link
No response
DSN
No response
Version
No response
The text was updated successfully, but these errors were encountered: