Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions agentx/tracing/ingest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,15 @@ def _send(self, payload: Dict[str, Any]) -> None:
continue

if resp.status_code in _RETRYABLE_STATUS and attempt < _MAX_RETRIES - 1:
# 429 = the engine's bounded ingest queue shedding load (its ADR-0005): honor
# Retry-After exactly instead of the generic backoff schedule, so the SDK backs
# off in step with the server's own flush cadence.
retry_after = resp.headers.get("Retry-After")
if resp.status_code == 429 and retry_after:
try:
time.sleep(min(30.0, float(retry_after)))
except ValueError:
pass
last_exc = Exception(f"HTTP {resp.status_code}")
continue
if not resp.ok:
Expand Down
Loading