-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP client metrics: url.scheme should be opt-in, server.port should be required #94829
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsDescriptionOTel 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 StepsN/A Expected behavior
Actual behaviorscheme 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 WorkaroundsNo response ConfigurationNo response Other informationNo response
|
The current state (having a redundant scheme tag, not reporting default ports) doesn't actively hurt users from a practical POV. Given it's such a minor aspect, I wonder if maintaining maximum standard-compatibility is worth the burden of a breaking change where we may need to implement a compatibility switch, adding complexity to the code. @noahfalk what's your take on this? |
Triage: adding this to 9.0 for decision making, and potential fixing (see comment above). |
Related: #103302. Opt-in attributes likely need an API addition. Punting this to .NET 10. |
would it be possible to report |
I was confused, since I was looking at the wrong metrics. We should add |
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 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
The text was updated successfully, but these errors were encountered: