Closed lmolkova closed 8 months ago
@JamesNK
Lets switch to error.type
everywhere.
I noticed that exception.type
is still used by logging and tracing in the conventions. Is it intentional that there is a difference between metrics and other telemetry?
I noticed that
exception.type
is still used by logging and tracing in the conventions. Is it intentional that there is a difference between metrics and other telemetry?
from offline conversation - those are semconv for exceptions on logs/events and not for traces/metrics.
The error.type
attribute is intended for traces/metrics and all sorts of errors (exceptions or not)
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 (https://github.com/open-telemetry/semantic-conventions/pull/205).ASP.NET Core now reports
exception.type
on .NET-specific metrics like (kestrel.*
,aspnetcore.*
) as well as common HTTP metrics.e.g. here
https://github.com/dotnet/aspnetcore/blob/36e03b5be98b34804fcf23a2e9c05a5211e1108b/src/Hosting/Hosting/src/Internal/HostingMetrics.cs#L77
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 usingexception.type
or switch toexception.type
.Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
8.0