Repository navigation
fix: retry OTLP gRPC responses with trailer status - #8854
Conversation
Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
Pull request dashboard statusMerged · refreshed 2026-10-08 22:29 UTC Status above doesn't look right?
|
Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8854 +/- ##
============================================
- Coverage 91.44% 90.64% -0.80%
- Complexity 10667 10876 +209
============================================
Files 1007 1015 +8
Lines 28686 29712 +1026
Branches 3676 3874 +198
============================================
+ Hits 26231 26932 +701
- Misses 1657 1863 +206
- Partials 798 917 +119 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
a90f00d to
a7ee760
Compare
Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
|
Fixed the patch-caused response-size regression in
Validation: |
|
I inspected the current required-status-check and failed matrix logs. The failures are broad across macOS, Ubuntu, and Windows and across JDK 8, 11, 17, 21, 25, and 27. The logs show unrelated SDK metrics stress-test timeouts (for example SynchronousInstrumentStressTest partialWriteStressTest) and the required-status-check itself is an intentional |
Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
|
The retry regression was caused by OkHttp treating bodyless gRPC responses with an explicit trailer status as non-retryable. Updated the sender to preserve the decoded trailer status and mark only explicit server statuses retryable, while local size-limit/encoding failures remain non-retryable. Added focused coverage for an empty body with |
Signed-off-by: Efe Gökdemir <gokdemirefe1903@gmail.com>
Signed-off-by: Efe Gökdemir <gokdemirefe1903@gmail.com>
|
Thank you for your contribution @efegokdemir! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. |
Problem
OkHttpGrpcSender.isRetryableonly inspected thegrpc-statusresponse header. When a retryable status such asUNAVAILABLEwas delivered in HTTP/2 trailers, the exporter reported the status but did not retry.Change
Read
grpc-statusfrom trailers when it is absent from headers, matching the existing status-resolution path. An IOException while reading trailers remains non-retryable. Added a regression test and an Unreleased changelog entry.Fixes #8843
Validation
upstream/main: failed as expected (falseinstead oftrue).JAVA_HOME=/opt/homebrew/opt/openjdk@21 ./gradlew :exporters:sender:okhttp:test --tests io.opentelemetry.exporter.sender.okhttp.internal.OkHttpGrpcSenderTest: passed (49 tests).JAVA_HOME=/opt/homebrew/opt/openjdk@21 ./gradlew :exporters:sender:okhttp:spotlessCheck: passed.git diff --check: passed.:exporters:sender:okhttp:check: one unrelated existing timing-sensitive failure inshutdown_CompletableResultCodeShouldWaitForThreads; the changed regression and remaining tests passed.Provenance
Codex assisted with repository analysis, implementation, regression testing, and validation. The submitter reviewed the complete diff and is responsible for the contribution.