diff --git a/app/app.html b/app/app.html
index 72c9a05375..42cdde2e9d 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 a69f82ea8e..80bb232fae 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:" \