1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

filter breadcrumbs for improved clarity while debugging sentry errors (#15639)

This commit is contained in:
Alex Donesky 2022-08-18 13:38:59 -05:00 committed by GitHub
parent fc232da4c4
commit 94180e850e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,6 +114,22 @@ export default function setupSentry({ release, getState }) {
}
return rewriteReport(report);
},
beforeBreadcrumb(breadcrumb) {
if (getState) {
const appState = getState();
if (
Object.values(appState).length &&
(!appState?.store?.metamask?.participateInMetaMetrics ||
!appState?.store?.metamask?.completedOnboarding ||
breadcrumb?.category === 'ui.input')
) {
return null;
}
} else {
return null;
}
return breadcrumb;
},
});
function rewriteReport(report) {