Skip to content

Commit

Permalink
Update DSN in react-router.mdx (#7423)
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 committed Jul 12, 2023
1 parent ca02c49 commit 3b39c79
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

1 comment on commit 3b39c79

@vercel
Copy link

@vercel vercel bot commented on 3b39c79 Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sentry-docs – ./

sentry-docs.sentry.dev
docs.sentry.io
sentry-docs-git-master.sentry.dev

Please sign in to comment.