Skip to content

Commit 03b4f9c

Browse files
authored
Update instrument.ts
1 parent 6fedbb0 commit 03b4f9c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

indexer/src/kadena-server/plugins/instrument.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ import { nodeProfilingIntegration } from '@sentry/profiling-node';
55
/**
66
* Sentry configuration
77
*/
8-
const SENTRY_DSN = getRequiredEnvString('SENTRY_DSN');
8+
const SENTRY_DSN = process.env['SENTRY_DSN'];
99
const SENTRY_ENVIRONMENT = 'production';
1010
const SENTRY_RELEASE = 'v1.0.0';
1111

12+
if (SENTRY_DSN === undefined || SENTRY_DSN === 0) {
13+
console.info('[INFO][SENTRY][LOG] Not using Sentry as it is disabled by not setting SENTRY_DSN env var');
14+
return;
15+
}
16+
1217
// Initialize Sentry
1318
console.info('[INFO][SENTRY][INIT] Initializing Sentry error reporting');
1419
Sentry.init({

0 commit comments

Comments
 (0)