Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter stack trace with my domain only #72

Closed
azachar opened this issue Nov 28, 2016 · 1 comment
Closed

filter stack trace with my domain only #72

azachar opened this issue Nov 28, 2016 · 1 comment
Labels
Milestone

Comments

@azachar
Copy link

azachar commented Nov 28, 2016

Hi there,
is there any configuration to make a custom stacktrace filtering?

The cool feature would be to display only stacktrace from my domain, e.g. anything that will match this:

myProject\e2e\*

Thanks,
Andrej

@bcaudan
Copy link
Owner

bcaudan commented Jan 8, 2017

With 3.1.0 version, you could now use stacktrace.filter option:

{
  spec: {
    displayStacktrace: true
  },
  stacktrace: {
    filter: (stacktrace) => {
      const lines = stacktrace.split("\n");
      const filtered = [];
      for (let i = 1; i < lines.length; i++) {
        if (/myProject\e2e/.test(lines[i])) {
          filtered.push(lines[i]);
        }
      }
      return filtered.join("\n");
    }
  }
}

@bcaudan bcaudan closed this as completed Jan 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants