-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
134 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
REACT_APP_IS_SENTRY_ENABLED=true | ||
REACT_APP_SENTRY_DSN = "https://3355df2870ed3e9d7eae3bba47350ed0@o4506633352577024.ingest.sentry.io/4506633358868480" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { initializeSentry } from "#/sdk/sentry" | ||
import { useEffect } from "react" | ||
|
||
export const useSentry = () => { | ||
useEffect(() => { | ||
if (process.env.REACT_APP_IS_SENTRY_ENABLED) { | ||
initializeSentry() | ||
} | ||
}, []) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as Sentry from "@sentry/react" | ||
|
||
export const initializeSentry = () => { | ||
Sentry.init({ | ||
dsn: process.env.SENTRY_DSN, | ||
integrations: [ | ||
new Sentry.BrowserTracing({ | ||
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled | ||
tracePropagationTargets: ["localhost"], | ||
}), | ||
new Sentry.Replay({ | ||
maskAllText: false, | ||
blockAllMedia: false, | ||
}), | ||
], | ||
// Performance Monitoring | ||
tracesSampleRate: 1.0, // Capture 100% of the transactions | ||
// Session Replay | ||
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production. | ||
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur. | ||
}) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.