Disable Sentry in dev mode (#26)

This commit is contained in:
Stan Wohlwend 2024-05-04 15:04:54 +02:00 committed by GitHub
parent 0eb7822569
commit bcce00ff59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 9 deletions

View File

@ -11,20 +11,22 @@ Sentry.init({
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
debug: process.env.NODE_ENV === "development",
enabled: process.env.NODE_ENV !== "development" && process.env.NODE_ENV !== "test",
replaysOnErrorSampleRate: 1.0,
// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production
replaysSessionSampleRate: 0.1,
replaysSessionSampleRate: 1.0,
// You can remove this option if you're not planning to use the Sentry Session Replay feature:
integrations: [
Sentry.replayIntegration({
// Additional Replay configuration goes in here, for example:
maskAllText: true,
blockAllMedia: true,
maskAllText: false,
blockAllMedia: false,
}),
],
});

View File

@ -12,5 +12,7 @@ Sentry.init({
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
debug: process.env.NODE_ENV === "development",
enabled: process.env.NODE_ENV !== "development" && process.env.NODE_ENV !== "test",
});

View File

@ -11,9 +11,7 @@ Sentry.init({
tracesSampleRate: 1,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
debug: process.env.NODE_ENV === "development",
// uncomment the line below to enable Spotlight (https://spotlightjs.com)
// spotlight: process.env.NODE_ENV === 'development',
enabled: process.env.NODE_ENV !== "development" && process.env.NODE_ENV !== "test",
});