[ASP.NET Core metrics] Discrepancies between spec and implementation
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
**http.server.request.duration**
1) Actual description does not match expected description
**src**:
https://github.com/dotnet/aspnetcore/blob/6e1cebdcb07c3577023f68825b20c60a3692d540/src/Hosting/Hosting/src/Internal/HostingMetrics.cs#L32
**spec**;
https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpserverrequestduration:~:text=Duration%20of%20HTTP%20server%20requests
2) Do we need `network.protocol.name`? Spec says recommended only if not `http` by default. `HttpClient` does not report this attribute as well. https://github.com/dotnet/runtime/blob/main/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs
**src**
https://github.com/dotnet/aspnetcore/blob/6e1cebdcb07c3577023f68825b20c60a3692d540/src/Hosting/Hosting/src/Internal/HostingMetrics.cs#L57
**spec**
https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpserverrequestduration
**http.server.active_requests**
1) Actual description does not match expected description as per spec.
**src**:
https://github.com/dotnet/aspnetcore/blob/c379b08edd68e6864b327e486d6e97352841db3a/src/Hosting/Hosting/src/Internal/HostingMetrics.cs#L27
**spec**:
https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpserverrequestduration:~:text=Number%20of%20active%20HTTP%20server%20requests.
### Expected Behavior
Metric description matches the spec.
### Steps To Reproduce
_No response_
### Exceptions (if any)
_No response_
### .NET Version
.NET8
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.