forked from tidepool-org/uploader
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply changes from tidepool-org@8e97b0b
- Loading branch information
Lennart Goedhart
committed
Mar 26, 2018
1 parent
3d2718b
commit e4c31cf
Showing
2 changed files
with
67 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
/* global __VERSION_SHA__ */ | ||
|
||
import Rollbar from 'rollbar/dist/rollbar.umd'; | ||
|
||
let rollbar = new Rollbar({ | ||
accessToken: '1843589282464f4facd43f794c8201a8', | ||
captureUncaught: true, | ||
enabled: process.env.NODE_ENV === 'production', | ||
payload: { | ||
environment: 'electron_renderer', | ||
client: { | ||
javascript: { | ||
code_version: __VERSION_SHA__, | ||
guess_uncaught_frames: true | ||
let rollbar; | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
|
||
rollbar = new Rollbar({ | ||
accessToken: '1843589282464f4facd43f794c8201a8', | ||
captureUncaught: true, | ||
enabled: process.env.NODE_ENV === 'production', | ||
payload: { | ||
environment: 'electron_renderer', | ||
client: { | ||
javascript: { | ||
code_version: __VERSION_SHA__, | ||
guess_uncaught_frames: true | ||
} | ||
} | ||
} | ||
}, | ||
// to deal with URI's as local filesystem paths, we use the "many domain" transform: | ||
// https://rollbar.com/docs/source-maps/#using-source-maps-on-many-domains | ||
transform: function(payload) { | ||
var trace = payload.body.trace; | ||
if (trace && trace.frames) { | ||
for (var i = 0; i < trace.frames.length; i++) { | ||
var filename = trace.frames[i].filename; | ||
if (filename) { | ||
trace.frames[i].filename = 'http://dynamichost/dist/bundle.js'; | ||
}, | ||
// to deal with URI's as local filesystem paths, we use the "many domain" transform: | ||
// https://rollbar.com/docs/source-maps/#using-source-maps-on-many-domains | ||
transform: function(payload) { | ||
var trace = payload.body.trace; | ||
if (trace && trace.frames) { | ||
for (var i = 0; i < trace.frames.length; i++) { | ||
var filename = trace.frames[i].filename; | ||
if (filename) { | ||
trace.frames[i].filename = 'http://dynamichost/dist/bundle.js'; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
); | ||
); | ||
}; | ||
|
||
export default rollbar; |