Skip to content

Provide API for filename rewriting #600

@mitsuhiko

Description

@mitsuhiko

The problem of rewriting filenames comes up very frequently. This is currently not documented really (other than that dataCallback) exists. Maybe we can add a method for this?

To conver this:

Raven.config('DSN_HERE', {
  dataCallback: function(data) {
    if (data.exception) {
      data.exception.values[0].stacktrace.frames.forEach(function(frame) {
        frame.filename = frame.filename.split('?')[0];
      });
    }
  }
});

into this:

Raven.config('DSN_HERE', {
  filenameProcessor: function(filename) {
    return filename.split('?')[0];
  }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions