Skip to content

fix(fetcher): Retry transient Datadog query failures - #83

Merged
BojanOro merged 1 commit into
mainfrom
fix/retry-datadog-query
Nov 5, 2026
Merged

BojanOro merged 1 commit into
mainfrom
fix/retry-datadog-query

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

The hourly cronjob fails its first pod attempt across regions when the Datadog query API returns a transient error. Most recently, the US run at 2026-11-05 04:00 UTC failed with HTTP Error 503: Service Unavailable from urlopen. Kubernetes retries the pod and the retry succeeds. However, each failed attempt still trips the [Kubernetes] Usage Accountant Job failed monitor.

query_datadog now retries 429s, 5xx responses, and network or timeout errors, up to 5 attempts in total. The delay between attempts uses exponential backoff with jitter: 2s, 4s, 8s, 16s, plus up to 100% jitter. Other 4xx errors still fail right away. Each request also has a 30s timeout, so a hung connection can't block the job. That matters because the CronJob uses concurrencyPolicy: Forbid.

Refs PRODENG-3141

via bojan.

--

View Session [Sentry]

Co-Authored-By: Bojan Oro <bojan.oro@sentry.io>
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner November 5, 2026 15:11
@linear-code

linear-code Bot commented Nov 5, 2026

Copy link
Copy Markdown

PRODENG-3141

@BojanOro
BojanOro merged commit 23cb1b2 into main Nov 5, 2026
17 checks passed
@BojanOro
BojanOro deleted the fix/retry-datadog-query branch November 5, 2026 15:19
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