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

Merge pull request #3066 from MetaMask/sentry-failed-tx

sentry - report failed txs
This commit is contained in:
kumavis 2018-01-22 16:04:10 -08:00 committed by GitHub
commit b1c34639f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -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),

View File

@ -21,4 +21,6 @@ function setupRaven(opts) {
Raven.config(ravenTarget, {
release,
}).install()
return Raven
}