Skip to content

Instantly share code, notes, and snippets.

@dcramer
Created August 20, 2015 05:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dcramer/25b09c916a1f82a6838d to your computer and use it in GitHub Desktop.
Save dcramer/25b09c916a1f82a6838d to your computer and use it in GitHub Desktop.
Raven.config(dsn, {
dataCallback: function(data) {
var stack = data.stacktrace;
if (!stack) return data;
var normalize = function(filename) {
return filename.split("/www/", 2)[-1];
};
var frame;
for (var i = 0; i < stack.frames.length; i++) {
frame.filename = normalize(stack.frames[i].filename);
}
return data;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment