diff options
author | kumavis <kumavis@users.noreply.github.com> | 2018-01-23 08:04:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-23 08:04:10 +0800 |
commit | b1c34639f8d66523815c6e4c8ad921eb09c99322 (patch) | |
tree | e77dbc4fa76cb70b7de7468a81ead23f1975d586 | |
parent | 0373a3840bd52d3fffe04accf40c185d798f2ad2 (diff) | |
parent | 7e32ba283314e21189850637ff28a4c6d12a213f (diff) | |
download | tangerine-wallet-browser-b1c34639f8d66523815c6e4c8ad921eb09c99322.tar tangerine-wallet-browser-b1c34639f8d66523815c6e4c8ad921eb09c99322.tar.gz tangerine-wallet-browser-b1c34639f8d66523815c6e4c8ad921eb09c99322.tar.bz2 tangerine-wallet-browser-b1c34639f8d66523815c6e4c8ad921eb09c99322.tar.lz tangerine-wallet-browser-b1c34639f8d66523815c6e4c8ad921eb09c99322.tar.xz tangerine-wallet-browser-b1c34639f8d66523815c6e4c8ad921eb09c99322.tar.zst tangerine-wallet-browser-b1c34639f8d66523815c6e4c8ad921eb09c99322.zip |
Merge pull request #3066 from MetaMask/sentry-failed-tx
sentry - report failed txs
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | app/scripts/background.js | 12 | ||||
-rw-r--r-- | app/scripts/setupRaven.js | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c4efbe00e..065b7ba03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Current Master - Add ability to bypass gas estimation loading indicator. +- Forward failed transactions to Sentry error reporting service ## 3.13.5 2018-1-16 diff --git a/app/scripts/background.js b/app/scripts/background.js index 8c1252d3e..0471cee3b 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -27,7 +27,7 @@ global.METAMASK_NOTIFIER = notificationManager // setup sentry error reporting const release = platform.getVersion() -setupRaven({ release }) +const raven = setupRaven({ release }) let popupIsOpen = false @@ -77,6 +77,16 @@ function setupController (initState) { }) global.metamaskController = controller + // report failed transactions to Sentry + controller.txController.on(`tx:status-update`, (txId, status) => { + if (status !== 'failed') return + const txMeta = controller.txController.txStateManager.getTx(txId) + raven.captureMessage('Transaction Failed', { + // "extra" key is required by Sentry + extra: txMeta, + }) + }) + // setup state persistence pump( asStream(controller.store), diff --git a/app/scripts/setupRaven.js b/app/scripts/setupRaven.js index 4888c85fe..7beffeff9 100644 --- a/app/scripts/setupRaven.js +++ b/app/scripts/setupRaven.js @@ -21,4 +21,6 @@ function setupRaven(opts) { Raven.config(ravenTarget, { release, }).install() + + return Raven } |