|
@@ -27,12 +27,14 @@ const SentryEnvHostnameMap: { [key: string]: string } = {
|
27
|
27
|
"now.sh": "staging",
|
28
|
28
|
};
|
29
|
29
|
|
30
|
|
-const onlineEnv = Object.keys(SentryEnvHostnameMap).find(
|
31
|
|
- (item) => window.location.hostname.indexOf(item) >= 0,
|
32
|
|
-);
|
|
30
|
+// Disable Sentry locally or inside the Docker to avoid noise/respect privacy
|
|
31
|
+const onlineEnv =
|
|
32
|
+ process.env.REACT_APP_DISABLE_SENTRY !== "true" &&
|
|
33
|
+ Object.keys(SentryEnvHostnameMap).find(
|
|
34
|
+ (item) => window.location.hostname.indexOf(item) >= 0,
|
|
35
|
+ );
|
33
|
36
|
|
34
|
37
|
Sentry.init({
|
35
|
|
- // Disable Sentry locally to avoid noise
|
36
|
38
|
dsn: onlineEnv
|
37
|
39
|
? "https://7bfc596a5bf945eda6b660d3015a5460@sentry.io/5179260"
|
38
|
40
|
: undefined,
|