Skip to content

[receiver/github] add retry with exponential backoff for transient GitHub API errors#47637

Merged
atoulme merged 15 commits intoopen-telemetry:mainfrom
adrielp:43388
Apr 21, 2026
Merged

[receiver/github] add retry with exponential backoff for transient GitHub API errors#47637
atoulme merged 15 commits intoopen-telemetry:mainfrom
adrielp:43388

Conversation

@adrielp
Copy link
Copy Markdown
Member

@adrielp adrielp commented Apr 14, 2026

Link to tracking issue

Fixes #43388

… transient GitHub API errors

Add a retryRoundTripper that wraps the HTTP transport to automatically
retry GitHub API requests on transient errors (429, 502, 503, 504) and
secondary rate limits (403 + Retry-After).

Retry behaviour is configurable via retry_on_failure with defaults tuned
for GitHub: 1s initial interval, 30s max interval, 10 max retries. Uses
configretry.BackOffConfig to align with other receivers in the project.

Fixes open-telemetry#43388
@adrielp adrielp requested review from a team, TylerHelmuth and crobert-1 as code owners April 14, 2026 15:15
@adrielp adrielp marked this pull request as draft April 15, 2026 13:46
@adrielp adrielp marked this pull request as ready for review April 16, 2026 13:48
Copy link
Copy Markdown
Member

@crobert-1 crobert-1 left a comment

Choose a reason for hiding this comment

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

Nit: There are a few places that list which error codes are retryable, it'd be nice if the ordering was consistent, and probably in numerical order (unless there's a good reason not to)

@adrielp
Copy link
Copy Markdown
Member Author

adrielp commented Apr 21, 2026

Nit: There are a few places that list which error codes are retryable, it'd be nice if the ordering was consistent, and probably in numerical order (unless there's a good reason not to)

no reason not to, will make the adjustment.

@adrielp
Copy link
Copy Markdown
Member Author

adrielp commented Apr 21, 2026

adjusted ordering @crobert-1 - let me know if all looks good

@crobert-1 crobert-1 added the ready to merge Code review completed; ready to merge by maintainers label Apr 21, 2026
@atoulme atoulme merged commit ae55798 into open-telemetry:main Apr 21, 2026
207 checks passed
@adrielp adrielp deleted the 43388 branch April 21, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Code review completed; ready to merge by maintainers receiver/github

Projects

None yet

Development

Successfully merging this pull request may close these issues.

githubreceiver fails with 502 / 504 errors when scraping PRs and commits

4 participants