-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-System.Net.Httpin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
Description
Description
OTel HTTP semconv made the last-minute change open-telemetry/semantic-conventions#459 before stability and now HTTP client metrics are not fully aligned with the spec (sorry).
Even though it's a pretty minor difference it'd be nice to align with the OTel spec at some point.
Reproduction Steps
N/A
Expected behavior
url.scheme
is now opt-in, so should be set when explicitly enabled (or not set at all)server.port
should be set even when it has a default value
Actual behavior
scheme is always set, port is set when not default.
runtime/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs
Lines 192 to 198 in 33d7f98
tags.Add("url.scheme", requestUri.Scheme); | |
tags.Add("server.address", requestUri.Host); | |
// Add port tag when not the default value for the current scheme | |
if (!requestUri.IsDefaultPort) | |
{ | |
tags.Add("server.port", requestUri.Port); | |
} |
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
Metadata
Metadata
Assignees
Labels
area-System.Net.Httpin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged