File tree Expand file tree Collapse file tree 3 files changed +24
-18
lines changed Expand file tree Collapse file tree 3 files changed +24
-18
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,13 @@ import * as Sentry from "@sentry/nextjs"
2
2
3
3
const environment = process . env . NEXT_PUBLIC_CONTEXT || "development"
4
4
5
- Sentry . init ( {
6
- dsn : process . env . NEXT_PUBLIC_SENTRY_DSN ,
7
- tracesSampleRate : 1 ,
8
- debug : environment === "development" ,
9
- environment,
10
- } )
5
+ if ( environment === "production" ) {
6
+ Sentry . init ( {
7
+ dsn : process . env . NEXT_PUBLIC_SENTRY_DSN ,
8
+ tracesSampleRate : 0.1 ,
9
+ debug : false ,
10
+ environment,
11
+ } )
12
+ }
11
13
12
14
export const onRouterTransitionStart = Sentry . captureRouterTransitionStart
Original file line number Diff line number Diff line change @@ -2,9 +2,11 @@ import * as Sentry from "@sentry/nextjs"
2
2
3
3
const environment = process . env . NEXT_PUBLIC_CONTEXT || "development"
4
4
5
- Sentry . init ( {
6
- dsn : process . env . NEXT_PUBLIC_SENTRY_DSN ,
7
- tracesSampleRate : 1 ,
8
- debug : environment === "development" ,
9
- environment,
10
- } )
5
+ if ( environment === "production" ) {
6
+ Sentry . init ( {
7
+ dsn : process . env . NEXT_PUBLIC_SENTRY_DSN ,
8
+ tracesSampleRate : 0.1 ,
9
+ debug : false ,
10
+ environment,
11
+ } )
12
+ }
Original file line number Diff line number Diff line change @@ -2,9 +2,11 @@ import * as Sentry from "@sentry/nextjs"
2
2
3
3
const environment = process . env . NEXT_PUBLIC_CONTEXT || "development"
4
4
5
- Sentry . init ( {
6
- dsn : process . env . NEXT_PUBLIC_SENTRY_DSN ,
7
- tracesSampleRate : 1 ,
8
- debug : environment === "development" ,
9
- environment,
10
- } )
5
+ if ( environment === "production" ) {
6
+ Sentry . init ( {
7
+ dsn : process . env . NEXT_PUBLIC_SENTRY_DSN ,
8
+ tracesSampleRate : 0.1 ,
9
+ debug : false ,
10
+ environment,
11
+ } )
12
+ }
You can’t perform that action at this time.
0 commit comments