open-telemetry/opentelemetry-dotnet

[OTLP] Determine specific conditions to consider when retrying export without a response from server.

Closed

#5,425 opened on Mar 7, 2024

 (4 comments) (0 reactions) (0 assignees)C# (889 forks)auto 404
enhancementhelp wantedkeep-openpkg:OpenTelemetry.Exporter.OpenTelemetryProtocol

Repository metrics

Stars
 (3,725 stars)
PR merge metrics
 (Avg merge 3d 17h) (112 merged PRs in 30d)

Description

Feature Request

In case when the response is not received from the server, HttpClient fails by throwing a HttpRequestException. In .NET 8.0, it is possible to further drill the error using HttpRequestError. Prior to this, such contract is not defined.

https://github.com/open-telemetry/opentelemetry-dotnet/pull/5394#discussion_r1508007233 brought up a point that we should probably not retry all exceptions which ends with no response. Opening this issue to further investigate and see if there is a better way to handle exceptions that ends with no response which can be use across all .NET versions.

Contributor guide