You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Retry support on, which is the CMake default: OTELCPP_WITH_OTLP_RETRY_PREVIEW=ON defines ENABLE_OTLP_RETRY_PREVIEW.
Reproduced on Windows with MSVC 14.44 (Visual Studio 2022) and libcurl 8.21.0-DEV, by compiling the curl client sources with ENABLE_OTLP_RETRY_PREVIEW defined. The code involved is not platform specific.
Steps to reproduce
Run an HTTP server with two endpoints:
POST /slow answers 429 Too Many Requests with Retry-After: 8.
POST /busy answers 503 the first time and 200 after that.
Create one opentelemetry::ext::http::client::curl::HttpClient. Give every request RetryPolicy{5, SecondsDecimal{0.2f}, SecondsDecimal{1.0f}, 1.5f}, so max_backoff (1 s) is below the server's Retry-After (8 s). The OTLP/HTTP exporters default to a 5 s max_backoff.
Send a request to /slow and wait for its handler. The handler gets the 429 immediately and the server sees one request, so the session was closed rather than retried, as intended.
Then do one of the following:
call WaitBackgroundThreadExit() right away, or
send a request to /busy and time how long its retry takes.
What is the expected behavior?
The session closed because of its Retry-After should not go into the retry queue. WaitBackgroundThreadExit() and ~HttpClient() should return promptly. The /busy retry should follow its own backoff, which takes about 0.26 s here when nothing is ahead of it in the queue.
What is the actual behavior?
WaitBackgroundThreadExit() returned after 8000 ms and used 7.8 s of CPU while waiting.
The /busy retry happened after 8.2 s instead of about 0.26 s.
Additional context
Add any other context about the problem here.
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Describe your environment
OTELCPP_WITH_OTLP_RETRY_PREVIEW=ONdefinesENABLE_OTLP_RETRY_PREVIEW.ENABLE_OTLP_RETRY_PREVIEWdefined. The code involved is not platform specific.Steps to reproduce
POST /slowanswers429 Too Many RequestswithRetry-After: 8.POST /busyanswers503the first time and200after that.opentelemetry::ext::http::client::curl::HttpClient. Give every requestRetryPolicy{5, SecondsDecimal{0.2f}, SecondsDecimal{1.0f}, 1.5f}, somax_backoff(1 s) is below the server'sRetry-After(8 s). The OTLP/HTTP exporters default to a 5 smax_backoff./slowand wait for its handler. The handler gets the 429 immediately and the server sees one request, so the session was closed rather than retried, as intended.WaitBackgroundThreadExit()right away, or/busyand time how long its retry takes.What is the expected behavior?
The session closed because of its
Retry-Aftershould not go into the retry queue.WaitBackgroundThreadExit()and~HttpClient()should return promptly. The/busyretry should follow its own backoff, which takes about 0.26 s here when nothing is ahead of it in the queue.What is the actual behavior?
WaitBackgroundThreadExit()returned after 8000 ms and used 7.8 s of CPU while waiting./busyretry happened after 8.2 s instead of about 0.26 s.Additional context
Add any other context about the problem here.
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.