Quick Start
1
Ask an agent
2
Read the health block
3
Classify your own numbers
How It Works
The enforcement layer already measures every field. This block reads them back and folds them through a pure classifier.
The block is omitted entirely when no back-pressure machinery is wired — always-on gateways see the block appear naturally.
The resulting health surface under load:
Choosing what to alert on
Configuration Options
Nothing to configure — pressure telemetry is on wherever the back-pressure machinery is on. The fields onHealthPressure:
HealthPressure is frozen=True — mutating a field raises dataclasses.FrozenInstanceError.
Thresholds
saturated (any one):
- admission full and work is queuing (
in_flight >= maxandqueued > 0) outbox_dead_letter > 0event_loop_lag_p99_ms >= 500.0
elevated (any one):
- admission utilisation
>= 0.8(80%) queued > 0inbox_pending > 0outbox_pending > 0event_loop_lag_p99_ms >= 100.0
nominal — none of the above.
Unbounded admission (max_concurrent_runs == 0) never divides by zero. Negative or non-numeric inputs are coerced to zero.
Metrics
Six gauges appear on/metrics whenever the block is populated:
Common Patterns
Autoscaler / load-balancer readiness gateBest Practices
Page on saturated, not elevated
Page on saturated, not elevated
saturated is imminent shed. A non-empty dead-letter tier means outbound work is being dropped — page immediately.Unit-test with evaluate_pressure
Unit-test with evaluate_pressure
Pure and deterministic — feed it stub numbers and assert the classification. No fixtures needed.
Guard the pressure key
Guard the pressure key
The
pressure key is absent when no back-pressure machinery is wired. Guard with .get("pressure").Snapshot vs shape over time
Snapshot vs shape over time
health()["pressure"] is a point-in-time snapshot; the /metrics gauges give you the shape over time.Related
Loop Watchdog
Where
event_loop_lag_p99_ms comes from.Hot Reload
The
ReloadStatus health block this feature mirrors exactly.Gateway Overview
Where the top-level
health() fields live.Reliability Preset
The drain + admission preset this telemetry observes.

