-
Notifications
You must be signed in to change notification settings - Fork 183
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 #941
Comments
fwiw, OpenTelemetry Java SDK implementation of |
It might be good to clarify a construction of the unified stack trace in other languages, since not all of them do this. However, I also think that combining stack traces is not enough. The "cause" exceptions often have valuable metadata, such as HTTP status codes and other attributes. Ideally there'd be a way to preserve it all. |
Please provide a comprehensive breakdown of what this would mean for all the languages OTel is implemented in. It is not obvious how this would apply to all languages, especially non-object-oriented languages or those that do not use exceptions as control flow. |
In JavaScript, the errors can be chained and accessed using The data model for this could be presented as:
However, it's not clear how to codify this in OTEL data model:
|
Just ran into this problem as well and ended up here. Has there been any further discussion? I don't really have anything to contribute other than expressing support for tackling this...would chaining span events somehow be an option? Thanks! Update: You CAN call I guess it'd be possible to use that to unwind the |
What are you trying to achieve?
Many languages support a concept of a chained exception. For instance, JavaScript has
Error.cause
. Java also hasThrowable.getCause()
. When present, is just as important (and often more so), than the wrapping exception. CurrentlyrecordException()
loses this information.It'd be valuable to clarify whether the relevant languages should support the
cause
and how.The text was updated successfully, but these errors were encountered: