Expand description
API Health Tracking
Lock-free latency tracker fed by send_with_retry. Computes running average,
jitter (standard deviation), min/max, and health status from actual request data
with zero extra HTTP calls.
Structs§
- ApiHealth
- Global lock-free API health tracker.
- Health
Snapshot - Snapshot of API health metrics at a point in time.
Enums§
- Health
Status - Health status classification based on latency metrics.
Functions§
- format_
duration_ ms - Format a Duration as a human-readable millisecond or second string.
- record_
failure - Record a terminal failure (request that exhausted all retries).
- record_
latency - Record latency from a completed HTTP request.
Called from
send_with_retryon every successful completion. - snapshot
- Take a snapshot of current API health metrics.
- status_
line - Format a one-liner status string.