Move sentry DSN as environment variable (#356)

This commit is contained in:
2024-04-24 16:00:41 +02:00
committed by GitHub
parent 63502becd6
commit c21a5945fd
3 changed files with 37 additions and 25 deletions

View File

@@ -4,8 +4,11 @@
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "https://a6fb679d6e99e303bb2ea0e2d68bfe46@o1376440.ingest.sentry.io/4505634666577920",
const SENTRY_DSN = process.env.SENTRY_DSN;
if (SENTRY_DSN) {
Sentry.init({
dsn: SENTRY_DSN,
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 0,
@@ -18,4 +21,5 @@ Sentry.init({
// 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.0,
});
});
}

View File

@@ -5,12 +5,16 @@
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "https://a6fb679d6e99e303bb2ea0e2d68bfe46@o1376440.ingest.sentry.io/4505634666577920",
const SENTRY_DSN = process.env.SENTRY_DSN;
if (SENTRY_DSN) {
Sentry.init({
dsn: SENTRY_DSN,
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 0,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
});
}

View File

@@ -4,12 +4,16 @@
import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "https://a6fb679d6e99e303bb2ea0e2d68bfe46@o1376440.ingest.sentry.io/4505634666577920",
const SENTRY_DSN = process.env.SENTRY_DSN;
if (SENTRY_DSN) {
Sentry.init({
dsn: SENTRY_DSN,
// Adjust this value in production, or use tracesSampler for greater control
tracesSampleRate: 0,
// Setting this option to true will print useful information to the console while you're setting up Sentry.
debug: false,
});
});
}