Loëck Vézien
7 years ago
No known key found for this signature in database
GPG Key ID: CBCDCE384E853AC4
3 changed files with
11 additions and
7 deletions
-
src/internals/index.js
-
src/main/index.js
-
src/renderer/index.js
|
|
@ -5,7 +5,7 @@ import capitalize from 'lodash/capitalize' |
|
|
|
|
|
|
|
import cpuUsage from 'helpers/cpuUsage' |
|
|
|
|
|
|
|
const { FORK_TYPE } = process.env |
|
|
|
const { FORK_TYPE, SENTRY_URL } = process.env |
|
|
|
|
|
|
|
process.title = `${require('../../package.json').productName} ${capitalize(FORK_TYPE)}` // eslint-disable-line global-require
|
|
|
|
|
|
|
@ -13,10 +13,10 @@ function sendEvent(type: string, data: any, options: Object = { kill: true }) { |
|
|
|
process.send({ type, data, options }) |
|
|
|
} |
|
|
|
|
|
|
|
if (__PROD__ && __SENTRY_URL__) { |
|
|
|
if (__PROD__ && SENTRY_URL) { |
|
|
|
const Raven = require('raven') // eslint-disable-line global-require
|
|
|
|
const ravenConfig = { captureUnhandledRejections: true } |
|
|
|
Raven.config(__SENTRY_URL__, ravenConfig).install() |
|
|
|
Raven.config(SENTRY_URL, ravenConfig).install() |
|
|
|
} |
|
|
|
|
|
|
|
// $FlowFixMe
|
|
|
|
|
|
@ -9,8 +9,10 @@ require('./app') |
|
|
|
|
|
|
|
setImmediate(() => require('./bridge')) // eslint-disable-line global-require
|
|
|
|
|
|
|
|
if (__PROD__ && __SENTRY_URL__) { |
|
|
|
const { SENTRY_URL } = process.env |
|
|
|
|
|
|
|
if (__PROD__ && SENTRY_URL) { |
|
|
|
const Raven = require('raven') // eslint-disable-line global-require
|
|
|
|
const ravenConfig = { captureUnhandledRejections: true } |
|
|
|
Raven.config(__SENTRY_URL__, ravenConfig).install() |
|
|
|
Raven.config(SENTRY_URL, ravenConfig).install() |
|
|
|
} |
|
|
|
|
|
@ -23,8 +23,10 @@ import App from 'components/App' |
|
|
|
|
|
|
|
import 'styles/global' |
|
|
|
|
|
|
|
if (__PROD__ && __SENTRY_URL__) { |
|
|
|
Raven.config(__SENTRY_URL__, { allowSecretKey: true }).install() |
|
|
|
const { SENTRY_URL } = process.env |
|
|
|
|
|
|
|
if (__PROD__ && SENTRY_URL) { |
|
|
|
Raven.config(SENTRY_URL, { allowSecretKey: true }).install() |
|
|
|
window.addEventListener('unhandledrejection', event => Raven.captureException(event.reason)) |
|
|
|
} |
|
|
|
|
|
|
|