Include full command line arguments in Sentry errors, to help us debug them

This commit is contained in:
Tim Perry 2017-05-12 11:47:49 +02:00
parent 3a44782c38
commit 6e034acf23
No known key found for this signature in database
GPG Key ID: 0DDE38AFD3AF94F0
3 changed files with 8 additions and 1 deletions

View File

@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Added
- Include extra usage metadata in error logging to help debugging
- Add uploading of build logs when present with resin deploy
- Highlight cache usage in a local build
- Show a progress bar for upload progress

View File

@ -29,6 +29,12 @@ Raven.config(require('./config').sentryDsn, {
return process.exit(1);
});
Raven.setContext({
extra: {
args: process.argv
}
});
globalTunnel = require('global-tunnel-ng');
settings = require('resin-settings-client');

View File

@ -22,7 +22,7 @@ Raven.config require('./config').sentryDsn,
.install (logged, error) ->
console.error(error)
process.exit(1)
Raven.setContext(extra: args: process.argv)
# Doing this before requiring any other modules,
# including the 'resin-sdk', to prevent any module from reading the http proxy config