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

Add option to skip more frames using report #58

Merged
merged 1 commit into from
Dec 11, 2018

Conversation

bz2
Copy link
Contributor

@bz2 bz2 commented Dec 7, 2018

New options parameter on report() for per-call config.

Add skipLocalFrames option to trim the head of a locally generated
stacktrace to remove more than one level.

Enforce valid jsdoc using eslint and add params for test helpers.

Add documentation for passing options to report().

@bz2 bz2 mentioned this pull request Dec 7, 2018
9 tasks
New options parameter on report() for per-call config.

Add skipLocalFrames option to trim the head of a locally generated
stacktrace to remove more than one level.

Enforce valid jsdoc using eslint and add params for test helpers.

Add documentation for passing options to report().
@steren
Copy link
Collaborator

steren commented Dec 9, 2018

Thanks.
What is the use case for skipping frames? Can you add this to the README?

I suppose it is to remove frames of local error reporter frameworks, in which case, would it be better to be able to exclude frames based on some function or filename pattern, instead of an hard coded number?

@bz2
Copy link
Contributor Author

bz2 commented Dec 10, 2018

Yes, this is a similar use case to filtering based on frame location. See the README change for an example.

There is an options argument for StackTrace.fromError() that can be used to override its internal filter, with two niggles:

  • The current module-level filtering relies on a naming scheme being used for all functions.
  • The default filter is not exported, so would need to be copied to add to the logic.

Basically, this change is a low-friction way of making logged stacks a bit nicer, rather than a complete solution.

@steren steren merged commit db5fec3 into GoogleCloudPlatform:master Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants