Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit 60221c5

Browse files
committed
Sentry testing
1 parent 62cd3f0 commit 60221c5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ GA_UACODE=UA-XXXXXXXXX-X
55
# NODE_DEBUG=request # debug requests in analytics
66
# DEBUG_PROD=true
77
# FORCE_ENABLE_ANALYTICS=true
8-
8+
# FORCE_ENABLE_SENTRY=true

src/shared/initSentry.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import log from 'electron-log';
2+
23
Object.assign(console, log.functions);
34

45
const Sentry =
@@ -7,7 +8,11 @@ const Sentry =
78
: require('@sentry/electron/dist/renderer');
89

910
export function initSentry() {
10-
if (process.env.NODE_ENV === 'production' && process.env.SENTRY_DSN) {
11+
if (
12+
(process.env.NODE_ENV === 'production' ||
13+
process.env.FORCE_ENABLE_SENTRY === 'true') &&
14+
process.env.SENTRY_DSN
15+
) {
1116
Sentry.init({
1217
dsn: process.env.SENTRY_DSN,
1318
});

0 commit comments

Comments
 (0)