Skip to content

[Metrics] error.type doesn't report Exception.FullName #93302

@antonfirsov

Description

@antonfirsov

http.client.request.duration's error.type contains Exception.Name for cases which do not map to HttpRequestError values, which is inconsistent with aspnet's implementation that reports Exception.FullName -- see dotnet/aspnetcore#51084.

The wording of the .NET Metrics spec, is somewhat ambivalent:

When error.type attribute is reported, it contains one of HTTP Request errors, a full exception type, or a string representation of received status code.

As #93254 (comment) pointed out, this could also mean to "use HttpRequestException instead of just 'Http' or 'HttpException'". Moreover, reporting the full name doesn't bring any value, the set of exceptions we can see here is limited, collisions are not expected.

I assume this is not the case with aspnet, where exceptions may come from an arbitrarily large set. My recommendation would be to leave and document the current behaviors as-is.

@JamesNK @noahfalk we should make a decision ASAP.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions