Skip to content

Prevent stalled sink requests - #165

Merged
Areson merged 1 commit into
mainfrom
Areson/datadog-sink-hang-repro
Jul 14, 2026
Merged

Prevent stalled sink requests#165
Areson merged 1 commit into
mainfrom
Areson/datadog-sink-hang-repro

Conversation

@Areson

@Areson Areson commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Why

A blocked sink request can stall metric delivery indefinitely because the retry deadline was not propagated and sink HTTP clients had no whole-request timeout.

What

  • Apply the existing retry send budget to in-flight sink calls
  • Bound sink HTTP dial, TLS, response-header, idle, and whole-request durations
  • Preserve default and configured proxy behavior with per-client transports
  • Add regressions for blocked sends, HTTP cancellation, proxying, and transport isolation

Risk Assessment

Medium — this changes shared Datadog and SignalFx HTTP client behavior. Requests that exceed the new 10-second ceiling will fail and retry instead of blocking indefinitely.

References

  • Retry reproduction: failed at the 2.00s test deadline before the fix and passed at approximately 0.20s after it
  • go test ./sink/... ./server/...
  • go test ./monitor/... with the repository test MySQL service
  • codex review --base main: no findings

Generated with Codex

Apply the existing retry send budget to in-flight calls and configure bounded HTTP transports so stalled sink requests return.

Co-authored-by: Ian Oberst <ioberst@squareup.com>
Signed-off-by: Ian Oberst <ioberst@squareup.com>
Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true
@Areson
Areson marked this pull request as ready for review July 14, 2026 17:23
@Areson
Areson requested review from JashLal and felixp-square July 14, 2026 17:35
@Areson
Areson merged commit 32e8228 into main Jul 14, 2026
4 checks passed
@Areson
Areson deleted the Areson/datadog-sink-hang-repro branch July 14, 2026 17:40
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.

3 participants