Should RecordException(this Activity activity, Exception? ex, in TagList tags)
set the attributes error.type
and otel.status_code
?
#5346
Labels
enhancement
New feature or request
Feature Request
When an exception is thrown but not properly caught,
HttpInListener
records it and sets the attributeserror.type
andotel.status_code
:opentelemetry-dotnet/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs
Lines 312 to 319 in 303ab7a
When the exception is caught and manually recorded using
activity.RecordException(ex)
, the attributeserror.type
andotel.status_code
are not set:opentelemetry-dotnet/src/OpenTelemetry.Api/Trace/ActivityExtensions.cs
Lines 81 to 104 in 303ab7a
Should they also be set in this case?
The text was updated successfully, but these errors were encountered: