Skip to main content
Pressure telemetry surfaces how loaded the gateway is before it starts shedding turns. One health block, one classification.

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 on HealthPressure: HealthPressure is frozen=True — mutating a field raises dataclasses.FrozenInstanceError.

Thresholds

saturated (any one):
  • admission full and work is queuing (in_flight >= max and queued > 0)
  • outbox_dead_letter > 0
  • event_loop_lag_p99_ms >= 500.0
elevated (any one):
  • admission utilisation >= 0.8 (80%)
  • queued > 0
  • inbox_pending > 0
  • outbox_pending > 0
  • event_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 gate
Agent-driven ops assistant
Pre-flight classification

Best Practices

saturated is imminent shed. A non-empty dead-letter tier means outbound work is being dropped — page immediately.
Pure and deterministic — feed it stub numbers and assert the classification. No fixtures needed.
The pressure key is absent when no back-pressure machinery is wired. Guard with .get("pressure").
health()["pressure"] is a point-in-time snapshot; the /metrics gauges give you the shape over time.

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.