Skip to content

Accept legacy HTTP-date formats in OTLP Retry-After - #9074

Open
yangjj-iso wants to merge 1 commit into
open-telemetry:mainfrom
yangjj-iso:fix/otlp-retry-after-http-date
Open

yangjj-iso wants to merge 1 commit into
open-telemetry:mainfrom
yangjj-iso:fix/otlp-retry-after-http-date

Conversation

@yangjj-iso

@yangjj-iso yangjj-iso commented Nov 27, 2026 •

Copy link
Copy Markdown

Summary

The shared OTLP/HTTP Retry-After parser recognizes delay-seconds and the preferred HTTP date format. Valid RFC 850 and asctime dates currently fall through to exponential backoff. HTTP recipients are required to accept these legacy date formats. RFC 9110 §5.6.7

Accept both formats in the shared parser so OkHttp and JDK senders can honor the delay supplied by the server. Resolve RFC 850 two-digit years using the 50-year rule and interpret asctime timestamps as UTC.

Follow-up to #8633.

Testing

  • :exporters:common:test passed all 104 tests.
  • :exporters:common:spotlessCheck passed.
  • Six new date cases failed against the original parser. All 20 RetryUtilTest cases pass with the change on JDK 17 and 25.
  • All 18 JdkHttpSenderTest cases and the three OkHttp Retry-After cases passed. Two connection-timeout cases in the broader OkHttp run failed locally. Those cases supply their own delay extractor.

Codex assisted with the implementation, regression tests, and local verification.

@yangjj-iso
yangjj-iso requested a review from a team as a code owner November 27, 2026 08:47
@linux-foundation-easycla

linux-foundation-easycla Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: yangjj-iso / name: redyyang (b390057)

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-11-27 09:01 UTC

Wait for the required status checks to report; this pull request moves to reviewers once the results pass.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Should this be with reviewers? Comment /dashboard route:reviewers to route it to them.
  • Anything wrong — including the routing? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.56%. Comparing base (a92b644) to head (b390057).

Files with missing lines Patch % Lines
.../io/opentelemetry/exporter/internal/RetryUtil.java 86.66% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9074      +/-   ##
============================================
- Coverage     90.56%   90.56%   -0.01%     
- Complexity    11220    11225       +5     
============================================
  Files          1032     1032              
  Lines         30599    30626      +27     
  Branches       4010     4015       +5     
============================================
+ Hits          27711    27735      +24     
- Misses         1913     1914       +1     
- Partials        975      977       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant