HTTP OTEL metrics: use error.type
instead of exception.type
attribute
#51029
Labels
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Is there an existing issue for this?
Describe the bug
OTel recently defined
error.type
attribute as a general-purpose error status. It is used onhttp.server.*
and other metrics (open-telemetry/semantic-conventions#205).ASP.NET Core now reports
exception.type
on .NET-specific metrics like (kestrel.*
,aspnetcore.*
) as well as common HTTP metrics.e.g. here
aspnetcore/src/Hosting/Hosting/src/Internal/HostingMetrics.cs
Line 77 in 36e03b5
Reporting
exception.type
on common OTel metrics makes .NET incompatible with the OTel spec.Expected Behavior
ASP.NET Core metrics in
http.*
namespace should useerror.type
attribute (populating full exception type on it, in the same was as today)..NET-specific metrics can keep using
exception.type
or switch toexception.type
.Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
8.0
The text was updated successfully, but these errors were encountered: