Skip to content

url.scheme tag is emitted as part of http.client.request.duration metric that does not match the OTel spec #92077

@vishweshbankwar

Description

@vishweshbankwar

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

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions