There is no way to set status on span, we need to add a method that would be able to:
- take exception or string as an input parameters
- set span status, description and
error.type attribute
in otel implementation:
If exception is passed:
- set status code to error
- set status description to exception message
- use exception fully qualified name to set
error.type attribute
If error string is passed:
- set status code to error
- set status description and
error.type to error string
We never report status for successful spans (and unlikely to ever need it), so we might as well limit the scope of this method to reporting errors.
Related: #36890 (comment)
There is no way to set status on span, we need to add a method that would be able to:
error.typeattributein otel implementation:
If exception is passed:
error.typeattributeIf error string is passed:
error.typeto error stringWe never report status for successful spans (and unlikely to ever need it), so we might as well limit the scope of this method to reporting errors.
Related: #36890 (comment)