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.
|
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
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.schemeis now opt-in, so should be set when explicitly enabled (or not set at all)server.portshould be set even when it has a default valueActual 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
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response