Skip to content

Commit 5677317

Browse files
committed
refactor sentry initialization
1 parent 8867485 commit 5677317

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

sentry.client.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44

55
import * as Sentry from '@sentry/nextjs'
66

7-
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
8-
97
Sentry.init({
10-
dsn: SENTRY_DSN,
8+
dsn: process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN,
119
// Adjust this value in production, or use tracesSampler for greater control
1210
// ref: https://develop.sentry.dev/sdk/performance/#sdk-configuration
1311
tracesSampleRate: 1.0,

sentry.edge.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44

55
import * as Sentry from '@sentry/nextjs'
66

7-
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
8-
97
Sentry.init({
10-
dsn: SENTRY_DSN,
8+
dsn: process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN,
119
// Adjust this value in production, or use tracesSampler for greater control
1210
// ref: https://develop.sentry.dev/sdk/performance/#sdk-configuration
1311
tracesSampleRate: 1.0,

sentry.server.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44

55
import * as Sentry from '@sentry/nextjs'
66

7-
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
8-
97
Sentry.init({
10-
dsn: SENTRY_DSN,
8+
dsn: process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN,
119
// Adjust this value in production, or use tracesSampler for greater control
1210
// ref: https://develop.sentry.dev/sdk/performance/#sdk-configuration
1311
tracesSampleRate: 1.0,

0 commit comments

Comments
 (0)