Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OTLP http receiver to correctly set Retry-After #12367

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

bogdandrutu
Copy link
Member

@bogdandrutu bogdandrutu commented Feb 12, 2025

No description provided.

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.54%. Comparing base (a4ae175) to head (dafd402).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12367      +/-   ##
==========================================
+ Coverage   91.51%   91.54%   +0.02%     
==========================================
  Files         467      467              
  Lines       25623    25623              
==========================================
+ Hits        23450    23456       +6     
+ Misses       1774     1768       -6     
  Partials      399      399              

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

@bogdandrutu bogdandrutu changed the title Fix http receiver Fix OTLP http receiver to correctly set Retry-After Feb 13, 2025
@bogdandrutu bogdandrutu marked this pull request as ready for review February 13, 2025 18:24
@bogdandrutu bogdandrutu requested a review from a team as a code owner February 13, 2025 18:24
@bogdandrutu bogdandrutu requested a review from mx-psi February 13, 2025 18:24

if !shouldRetry(st.Code(), retryInfo) {
// It is not a retryable error, we should not retry.
return consumererror.NewPermanent(err)
}

// Check if server returned throttling information.
throttleDuration := getThrottleDuration(retryInfo)
throttleDuration := retryInfo.GetRetryDelay().AsDuration()
if throttleDuration != 0 {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix in a followup to always include the throttle information if present and not retryable.

@bogdandrutu bogdandrutu force-pushed the fix-http-receiver branch 4 times, most recently from 88074f9 to bdc5222 Compare February 13, 2025 23:36
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
@bogdandrutu bogdandrutu added this pull request to the merge queue Feb 14, 2025
Merged via the queue into open-telemetry:main with commit 2dc95de Feb 14, 2025
56 of 57 checks passed
@bogdandrutu bogdandrutu deleted the fix-http-receiver branch February 14, 2025 03:02
@mx-psi
Copy link
Member

mx-psi commented Feb 14, 2025

@bogdandrutu Since this PR creates a new module, can you file a follow up PR to do step 5 from this list:

Open a follow up PR to update pseudo-versions in all go.mod files. See #11668.

Otherwise we cannot run make update-otel in contrib (see failure)

@mx-psi
Copy link
Member

mx-psi commented Feb 17, 2025

Filed #12404 for ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants