Skip to content

Commit

Permalink
update warning
Browse files Browse the repository at this point in the history
  • Loading branch information
chargome committed Dec 19, 2024
1 parent 99016ee commit d4951dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ Update your `Sentry.browserTracingIntegration` to `Sentry.reactRouterV6BrowserTr

<Alert level="warning">

Make sure you call `Sentry.init`, **before** you wrap your `<Routes />` component or the `useRoutes` hook. Otherwise, the routing instrumentation may not work properly.
To ensure proper routing instrumentation, initialize Sentry by calling `Sentry.init` **before**:
- Wrapping your `<Routes />` component
- Using `useRoutes`
- Using `createBrowserRouterV6`

</Alert>

Expand Down Expand Up @@ -56,7 +59,7 @@ Sentry.init({
});

const sentryCreateBrowserRouter =
Sentry.wrapCreateBrowserRouter(createBrowserRouter);
Sentry.wrapCreateBrowserRouterV6(createBrowserRouter);

const router = sentryCreateBrowserRouter([
// your routes...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ Update your `Sentry.browserTracingIntegration` to `Sentry.reactRouterV7BrowserTr

<Alert level="warning">

Make sure you call `Sentry.init`, **before** you wrap your `<Routes />` component or the `useRoutes` hook. Otherwise, the routing instrumentation may not work properly.
To ensure proper routing instrumentation, initialize Sentry by calling `Sentry.init` **before**:
- Wrapping your `<Routes />` component
- Using `useRoutes`
- Using `createBrowserRouterV7`

</Alert>

Expand Down

0 comments on commit d4951dd

Please sign in to comment.