From 6e034acf23fb8c7687418785e3aac2020e65d11d Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Fri, 12 May 2017 11:47:49 +0200 Subject: [PATCH] Include full command line arguments in Sentry errors, to help us debug them --- CHANGELOG.md | 1 + build/app.js | 6 ++++++ lib/app.coffee | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bfa21c1..cac9d77e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/build/app.js b/build/app.js index 017dcff5..d964d9ce 100644 --- a/build/app.js +++ b/build/app.js @@ -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'); diff --git a/lib/app.coffee b/lib/app.coffee index e1a07c38..f36f17dc 100644 --- a/lib/app.coffee +++ b/lib/app.coffee @@ -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