Skip to content

[feature request] Allow sending telemetry in HTTP2 #6453

@NatMarchand

Description

@NatMarchand

Package

OpenTelemetry.Exporter.OpenTelemetryProtocol

Is your feature request related to a problem?

It is currently impossible to force OtlpExporter to use HTTP2
Using OpenTelemetry 1.12 with OtlpExporter, we are using a delegating handler in the HttpClientFactory to enforce the version of the HttpRequestMessage to HTTP2:

POST http://opentelemetry-collector-sts-collector.monitoring.svc.cluster.local/v1/metrics
      System.NotSupportedException: The synchronous method is not supported by 'System.Net.Http.SocketsHttpHandler' for HTTP/2 or higher. Either use an asynchronous method or downgrade the request version to HTTP/1.1 or lower.
         at System.Net.Http.SocketsHttpHandler.Send(HttpRequestMessage request, CancellationToken cancellationToken)

What is the expected behavior?

We are expecting to be able to enable HTTP2 on all the requests (and thus use the Async counterpart of Send)

Which alternative solutions or features have you considered?

We are currently removing the DelegatingHandler for this HttpClient

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions