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 public API method for customising captured exceptions #853

Open
axw opened this issue Sep 19, 2019 · 0 comments
Open

Add public API method for customising captured exceptions #853

axw opened this issue Sep 19, 2019 · 0 comments
Labels
api Public API enhancement Enhancement of an existing feature

Comments

@axw
Copy link
Member

axw commented Sep 19, 2019

Is your feature request related to a problem? Please describe.

Some exceptions may include additional information that is not part of the exception's message or type. Users currently have no means of capturing this information.

Describe the solution you'd like

The exception schema supports recording an error code (string or number), as well as arbitrary key/value attributes. We should provide an API for users to set these for captured exceptions.

Ideally users could register a callback that will be invoked for exceptions of a given type or type-hierarchy. The callback would have the opportunity to set an error code and/or attributes. For reference, the Go agent provides two top-level functions:

Describe alternatives you've considered

The agent could also (or alternatively) provide an API for capturing an exception without immediately sending it; it would return an object that could be customised, and a have a method for sending it when done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Public API enhancement Enhancement of an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants