From 2bdeb76bd0723f416f16a4d893f2069cfb569225 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Wed, 17 Aug 2016 12:12:13 -0700 Subject: [PATCH] Some sentry updates --- app/app.html | 29 +++++++++++++++++++++-------- scripts/sentry-release.sh | 16 ++++++++++++++-- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/app/app.html b/app/app.html index 72c9a0537..42cdde2e9 100644 --- a/app/app.html +++ b/app/app.html @@ -19,16 +19,29 @@ levels: ['warn', 'error'], release: require('./app.json').version, environment: process.env.NODE_ENV, - ignoreErrors: [ - 'fb_xd_fragment', - /ReferenceError:.*/ - ], - excludePaths: [ - /\/external\/.*/ + ignoreUrls: [ + /.*raven\.min\.js.*/ ], includePaths: [ - /.*/ - ] + /^(?!.*raven.min.js$).*$/ // Ignore raven stuff + ], + dataCallback: function (data) { + console.log("SENTRY DATA", data); + var normalize = function (filename) { + var match = filename.match(/\/(app.asar|build)\/(.*)/); + if (match) { + return match[2]; // return everything after ../app.asar/* + } else { + return filename; + } + }; + + data.exception.values[0].stacktrace.frames.forEach(function (frame) { + frame.filename = normalize(frame.filename); + }); + + return data + } }).install(); console.log('-- Initialized Sentry --'); diff --git a/scripts/sentry-release.sh b/scripts/sentry-release.sh index a69f82ea8..80bb232fa 100644 --- a/scripts/sentry-release.sh +++ b/scripts/sentry-release.sh @@ -6,7 +6,10 @@ SENTRY_TOKEN="367a6d824c8449bfbff884f0c1bc6180" echo "-- Creating Release $APP_VERSION --" -# Create a new release +# ~~~~~~~~~~~~~~~~~~~~ # +# Create a new release # +# ~~~~~~~~~~~~~~~~~~~~ # + curl https://app.getsentry.com/api/0/projects/schierco/insomnia-electron/releases/ \ -X POST \ -u "$SENTRY_TOKEN:" \ @@ -16,7 +19,16 @@ curl https://app.getsentry.com/api/0/projects/schierco/insomnia-electron/release echo "" echo "-- Uploading Source Maps for $APP_VERSION --" -# Upload a file for the given release +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# Upload files for the given release # +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + +curl https://app.getsentry.com/api/0/projects/schierco/insomnia-electron/releases/${APP_VERSION}/files/ \ + -X POST \ + -u "$SENTRY_TOKEN:" \ + -F file=@./build/bundle.js \ + -F name="bundle.js" + curl https://app.getsentry.com/api/0/projects/schierco/insomnia-electron/releases/${APP_VERSION}/files/ \ -X POST \ -u "$SENTRY_TOKEN:" \