Description
url.scheme is added by default on http.client.request.duration metric from System.Net.Http. However, it is not part of the required/recommended attributes from the spec.
v1.21
https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-metrics.md#metric-httpclientduration
Main
https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpclientrequestduration
Reproduction Steps
Test on .NET8.0 RC1 using OTel SDK
Configure SDK
Sdk.CreateMeterProviderBuilder()
.AddMeter("System.Net.Http")
.Build()
Expected behavior
url.scheme is not included by default.
Actual behavior
url.scheme tag is added by default on http.client.request.duration metric
Sample output from sdk
Export http.client.request.duration, The duration of outbound HTTP requests., Unit: s, Meter: System.Net.Http
(2023-09-14T18:44:41.6943865Z, 2023-09-14T18:44:48.7866188Z] http.request.method: GET http.response.status_code: 302 network.protocol.version: 1.1 server.address: www.bing.com url.scheme: http Histogram
|
tags.Add("url.scheme", requestUri.Scheme); |
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
Description
url.schemeis added by default onhttp.client.request.durationmetric fromSystem.Net.Http. However, it is not part of the required/recommended attributes from the spec.v1.21
https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/docs/http/http-metrics.md#metric-httpclientduration
Main
https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpclientrequestduration
Reproduction Steps
Test on .NET8.0 RC1 using OTel SDK
Configure SDK
Expected behavior
url.schemeis not included by default.Actual behavior
url.schemetag is added by default onhttp.client.request.durationmetricSample output from sdk
runtime/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs
Line 192 in f7a7b2b
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response