From 37da64aa7ee38b7a3ae5c5b6c4b02dbe848af1b9 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Fri, 12 Jun 2020 16:13:14 -0300 Subject: [PATCH] Omit state snapshot from Sentry errors (#8794) The state snapshot we were attaching to Sentry errors was too large. As a temporary solution, it has been removed completely. We can re-add it later after reducing its size. --- app/scripts/lib/setupSentry.js | 8 +------- app/scripts/ui.js | 13 +------------ 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/app/scripts/lib/setupSentry.js b/app/scripts/lib/setupSentry.js index dcc31207c..c41a4a5dc 100644 --- a/app/scripts/lib/setupSentry.js +++ b/app/scripts/lib/setupSentry.js @@ -8,8 +8,7 @@ const METAMASK_ENVIRONMENT = process.env.METAMASK_ENVIRONMENT const SENTRY_DSN_PROD = 'https://3567c198f8a8412082d32655da2961d0@sentry.io/273505' const SENTRY_DSN_DEV = 'https://f59f3dd640d2429d9d0e2445a87ea8e1@sentry.io/273496' -export default function setupSentry (opts) { - const { release, getState } = opts +export default function setupSentry ({ release }) { let sentryTarget // detect brave const isBrave = Boolean(window.chrome.ipcRenderer) @@ -44,11 +43,6 @@ export default function setupSentry (opts) { simplifyErrorMessages(report) // modify report urls rewriteReportUrls(report) - // append app state - if (getState) { - const appState = getState() - report.extra.appState = appState - } } catch (err) { console.warn(err) } diff --git a/app/scripts/ui.js b/app/scripts/ui.js index 9d45082d8..5e8cc8e66 100644 --- a/app/scripts/ui.js +++ b/app/scripts/ui.js @@ -36,18 +36,7 @@ async function start () { // setup sentry error reporting const release = global.platform.getVersion() - setupSentry({ release, getState }) - // provide app state to append to error logs - function getState () { - // get app state - const state = window.getCleanAppState - ? window.getCleanAppState() - : {} - // remove unnecessary data - delete state.localeMessages - // return state to be added to request - return state - } + setupSentry({ release }) // identify window type (popup, notification) const windowType = getEnvironmentType()