diff options
author | Thomas Huang <tmashuang@users.noreply.github.com> | 2018-03-03 10:26:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-03 10:26:52 +0800 |
commit | d3a0a27c0caafb066e66e444d6fbe71243bd35f6 (patch) | |
tree | 771c6ac9263710611b73c8480daf0b654a398499 /app/scripts/lib/setupRaven.js | |
parent | ee254b4f6feeb040607472a0f4d69c7e4173c25e (diff) | |
parent | 0d97ff221017b78ccfa02defdb7a52ad701981a5 (diff) | |
download | dexon-wallet-d3a0a27c0caafb066e66e444d6fbe71243bd35f6.tar.gz dexon-wallet-d3a0a27c0caafb066e66e444d6fbe71243bd35f6.tar.zst dexon-wallet-d3a0a27c0caafb066e66e444d6fbe71243bd35f6.zip |
Merge branch 'master' into ImportAccountMessageV2
Diffstat (limited to 'app/scripts/lib/setupRaven.js')
-rw-r--r-- | app/scripts/lib/setupRaven.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app/scripts/lib/setupRaven.js b/app/scripts/lib/setupRaven.js new file mode 100644 index 00000000..42e48cb9 --- /dev/null +++ b/app/scripts/lib/setupRaven.js @@ -0,0 +1,26 @@ +const Raven = require('../vendor/raven.min.js') +const METAMASK_DEBUG = 'GULP_METAMASK_DEBUG' +const PROD = 'https://3567c198f8a8412082d32655da2961d0@sentry.io/273505' +const DEV = 'https://f59f3dd640d2429d9d0e2445a87ea8e1@sentry.io/273496' + +module.exports = setupRaven + +// Setup raven / sentry remote error reporting +function setupRaven(opts) { + const { release } = opts + let ravenTarget + + if (METAMASK_DEBUG) { + console.log('Setting up Sentry Remote Error Reporting: DEV') + ravenTarget = DEV + } else { + console.log('Setting up Sentry Remote Error Reporting: PROD') + ravenTarget = PROD + } + + Raven.config(ravenTarget, { + release, + }).install() + + return Raven +} |