File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 11import * as Sentry from '@sentry/node' ;
22import { nodeProfilingIntegration } from "@sentry/profiling-node" ;
33
4+ const env = process . env . SENTRY_ENVIRONMENT ;
5+
46// Ensure to call this before importing any other modules!
57Sentry . init ( {
68 dsn : process . env . SENTRY_DSN ,
79 integrations : [
810 nodeProfilingIntegration ( ) ,
911 ] ,
1012 enabled :
11- process . env . SENTRY_ENVIRONMENT === "production" ||
12- process . env . SENTRY_ENVIRONMENT === "staging" ,
13+ env === "production" ||
14+ env === "staging" ,
1315
1416 // Add Performance Monitoring by setting tracesSampleRate
15- // We recommend adjusting this value in production
16- tracesSampleRate : 1.0 ,
17+ tracesSampleRate : env === "production" ? 0.1 : 1.0 ,
18+
19+ profilesSampleRate : env === "production" ? 0.1 : 1.0 ,
1720} ) ;
You can’t perform that action at this time.
0 commit comments