Skip to content

Commit 7098315

Browse files
committed
Disabling sentry JS if not production
1 parent d1e89b4 commit 7098315

5 files changed

Lines changed: 1391 additions & 1363 deletions

File tree

webapp/Main.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,19 @@ import '@metacell/geppetto-meta-ui/flex-layout/style/dark.scss';
1313
global.GEPPETTO_CONFIGURATION = require('./GeppettoConfiguration.json');
1414
const { initGeppetto } = require('@metacell/geppetto-meta-client/GEPPETTO');
1515

16-
Sentry.init({
17-
dsn: 'https://d8bf7e40eec34cb9891f6dd8207b5e83@sentry.metacell.us/6',
18-
integrations: [
19-
new CaptureConsole({
20-
levels: ['error'],
21-
}),
22-
],
23-
tracesSampleRate: 1.0,
24-
});
16+
if (process.env == 'production')
17+
{
18+
Sentry.init({
19+
dsn: 'https://d8bf7e40eec34cb9891f6dd8207b5e83@sentry.metacell.us/6',
20+
integrations: [
21+
new CaptureConsole({
22+
levels: ['error'],
23+
}),
24+
],
25+
tracesSampleRate: 1.0,
26+
});
27+
}
28+
2529

2630
initGeppetto();
2731
require('./css/netpyne.less');

webapp/Utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ const Utils = {
2525
},
2626

2727
captureSentryException (e) {
28-
Sentry.captureException(e);
28+
if (process.env.NODE_ENV == 'production')
29+
Sentry.captureException(e);
2930
console.error(e);
3031
},
3132

webapp/package.bak

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"start": "node --max_old_space_size=2048 node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress --config webpack.config.dev.js"
1414
},
1515
"dependencies": {
16-
"@babel/plugin-proposal-class-properties": "^7.8.3",
1716
"@fortawesome/fontawesome-svg-core": "^1.2.35",
1817
"@fortawesome/free-solid-svg-icons": "^5.13.0",
1918
"@fortawesome/react-fontawesome": "^0.1.9",

webapp/yalc.lock

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
"packages": {
44
"@metacell/geppetto-meta-client": {
55
"signature": "918daf407de0a1bb4f9c2b1504fd9f59",
6-
"file": true
6+
"file": true,
7+
"replaced": "1.0.0-final"
78
},
89
"@metacell/geppetto-meta-core": {
910
"signature": "736f99f823bf49bad526041d1eb37cd3",
10-
"file": true
11+
"file": true,
12+
"replaced": "1.0.0-final"
1113
},
1214
"@metacell/geppetto-meta-ui": {
1315
"signature": "aa63de17504247a0c97a54a5ef227199",
14-
"file": true
16+
"file": true,
17+
"replaced": "1.0.0-final"
1518
}
1619
}
1720
}

0 commit comments

Comments
 (0)