Skip to content

Commit

Permalink
Update DSN in react-router.mdx
Browse files Browse the repository at this point in the history
Was referencing the Javascript docs for configuring Sentry with React and noticed that the DSN client key did not appear in some of the example router configurations. Modified the examples so that each one has a DSN. (https://docs.sentry.io/platforms/javascript/guides/react/configuration/integrations/react-router/)
  • Loading branch information
michellewzhang authored Jul 12, 2023
1 parent ca02c49 commit b11360b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ import {
import * as Sentry from "@sentry/react";

Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [
new Sentry.BrowserTracing({
routingInstrumentation: Sentry.reactRouterV6Instrumentation(
Expand Down Expand Up @@ -202,6 +203,7 @@ const SentryRoute = Sentry.withSentryRouting(Route);
const history = createBrowserHistory();

Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [
new Sentry.BrowserTracing({
routingInstrumentation: Sentry.reactRouterV5Instrumentation(history),
Expand Down Expand Up @@ -241,6 +243,7 @@ const history = createBrowserHistory();
const routes = [{ path: '/users/:userid' }, { path: '/users' }, { path: '/' }];

Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [
new Sentry.BrowserTracing({
routingInstrumentation: Sentry.reactRouterV5Instrumentation(history, routes, matchPath),
Expand Down Expand Up @@ -286,6 +289,7 @@ const routes = (
);

Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [
new Sentry.BrowserTracing({
routingInstrumentation: Sentry.reactRouterV3Instrumentation(
Expand Down

0 comments on commit b11360b

Please sign in to comment.