|
|
@ -8,8 +8,10 @@ module.exports = setupRaven |
|
|
|
|
|
|
|
|
|
|
|
// Setup raven / sentry remote error reporting
|
|
|
|
// Setup raven / sentry remote error reporting
|
|
|
|
function setupRaven (opts) { |
|
|
|
function setupRaven (opts) { |
|
|
|
const { release } = opts |
|
|
|
const { releaseVersion } = opts |
|
|
|
let ravenTarget |
|
|
|
let ravenTarget |
|
|
|
|
|
|
|
// detect brave
|
|
|
|
|
|
|
|
const isBrave = Boolean(window.chrome.ipcRenderer) |
|
|
|
|
|
|
|
|
|
|
|
if (METAMASK_DEBUG) { |
|
|
|
if (METAMASK_DEBUG) { |
|
|
|
console.log('Setting up Sentry Remote Error Reporting: DEV') |
|
|
|
console.log('Setting up Sentry Remote Error Reporting: DEV') |
|
|
@ -20,9 +22,11 @@ function setupRaven (opts) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const client = Raven.config(ravenTarget, { |
|
|
|
const client = Raven.config(ravenTarget, { |
|
|
|
release, |
|
|
|
releaseVersion, |
|
|
|
transport: function (opts) { |
|
|
|
transport: function (opts) { |
|
|
|
|
|
|
|
opts.data.extra.isBrave = isBrave |
|
|
|
const report = opts.data |
|
|
|
const report = opts.data |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
// handle error-like non-error exceptions
|
|
|
|
// handle error-like non-error exceptions
|
|
|
|
rewriteErrorLikeExceptions(report) |
|
|
|
rewriteErrorLikeExceptions(report) |
|
|
|