Skip to content

Instantly share code, notes, and snippets.

@mrinterweb
Created February 25, 2016 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrinterweb/b81ba5305b2d7eafcdfd to your computer and use it in GitHub Desktop.
Save mrinterweb/b81ba5305b2d7eafcdfd to your computer and use it in GitHub Desktop.
Rollbar.configure({
transform: function(payload) {
let trace = payload.data.body.trace;
if (trace && trace.frames) {
for (let frame of trace.frames) {
let filename = frame.filename;
if (filename) {
let matches = filename.match(/^(.*\/)((dfw|vendor)(-[a-z0-9]{16,})?\.js)$/i);
if (matches && matches[2]) {
frame.filename = `https://PLATFORM/${matches[2]}`;
}
}
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment