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

recordException should support chained exceptions #4227

Closed
dvoytenko opened this issue Oct 26, 2023 · 2 comments
Closed

recordException should support chained exceptions #4227

dvoytenko opened this issue Oct 26, 2023 · 2 comments

Comments

@dvoytenko
Copy link
Contributor

dvoytenko commented Oct 26, 2023

This might be a feature request for the spec. After all error-chaining is common for many languages. I also registered open-telemetry/semantic-conventions#941 for the spec.

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

The Error.cause, when present, is just as important (and often more important) then the wrapping exception. Currently recordException() loses this information completely.

Describe the solution you'd like

Two possible solutions:

  1. Introduce exception.cause attribute.
  2. Use existing attributes, but combine their values. E.g. message = error.message + '; cause:' + error.chain.message, and the same for stack.

(1) is more preferred, however, it'd be hard to make the exception.cause recursive, since the Attributes type doesn't allow sub-objects.

Describe alternatives you've considered

Do the (2) above manually in call sites.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale label Jan 29, 2024
Copy link

This issue was closed because it has been stale for 14 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants