mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #4833 from MetaMask/brave-flag-sentry
sentry - add detection for Brave Browser
This commit is contained in:
commit
ae811628d9
@ -44,8 +44,8 @@ const notificationManager = new NotificationManager()
|
||||
global.METAMASK_NOTIFIER = notificationManager
|
||||
|
||||
// setup sentry error reporting
|
||||
const release = platform.getVersion()
|
||||
const raven = setupRaven({ release })
|
||||
const releaseVersion = platform.getVersion()
|
||||
const raven = setupRaven({ releaseVersion })
|
||||
|
||||
// browser check if it is Edge - https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
|
||||
// Internet Explorer 6-11
|
||||
|
@ -8,8 +8,10 @@ module.exports = setupRaven
|
||||
|
||||
// Setup raven / sentry remote error reporting
|
||||
function setupRaven (opts) {
|
||||
const { release } = opts
|
||||
const { releaseVersion } = opts
|
||||
let ravenTarget
|
||||
// detect brave
|
||||
const isBrave = Boolean(window.chrome.ipcRenderer)
|
||||
|
||||
if (METAMASK_DEBUG) {
|
||||
console.log('Setting up Sentry Remote Error Reporting: DEV')
|
||||
@ -20,9 +22,11 @@ function setupRaven (opts) {
|
||||
}
|
||||
|
||||
const client = Raven.config(ravenTarget, {
|
||||
release,
|
||||
releaseVersion,
|
||||
transport: function (opts) {
|
||||
opts.data.extra.isBrave = isBrave
|
||||
const report = opts.data
|
||||
|
||||
try {
|
||||
// handle error-like non-error exceptions
|
||||
rewriteErrorLikeExceptions(report)
|
||||
|
Loading…
Reference in New Issue
Block a user