Skip to content

Commit cd6d3bf

Browse files
committed
Disable error reporting in CI environments
1 parent 2ef4bc1 commit cd6d3bf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/error-tracking.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ let sentryInitialized = false;
99
export function initErrorTracking() {
1010
const packageJson = require('../package.json');
1111

12-
let { SENTRY_DSN } = process.env;
13-
if (!SENTRY_DSN && IS_PROD_BUILD) {
12+
let { SENTRY_DSN, CI } = process.env;
13+
14+
const shouldBeEnabled = IS_PROD_BUILD && !CI;
15+
16+
// Note that we disable all error reporting in CI envs, both our own & others. They
17+
// tend to be weird configurations that aren't representative so this isn't useful.
18+
19+
if (!SENTRY_DSN && shouldBeEnabled) {
1420
// If we're a built binary, use the standard DSN automatically
1521
SENTRY_DSN = 'https://[email protected]/1371158';
1622
}

0 commit comments

Comments
 (0)