Skip to content
Select themeSelect language

GET /api/operator/v1/tenant/dispatch/metrics — this workspace's dispatch metrics. Queue depth/age/priority, dispatch throughput, the workspace's OWN per-credential provider quota saturation and per-class recovery — all scoped to the workspace.

GET
/api/operator/v1/tenant/dispatch/metrics
curl --request GET \
--url https://example.com/api/operator/v1/tenant/dispatch/metrics
Media typeapplication/json

The operator dispatch-metrics snapshot (D1) — the cross-tenant gauges the operator console renders.

object
autoscale
required

ADR 0046 P5.D — the pure autoscaling DECISION (desired runner count + reason) an external autoscaler actuates. SupaCloud never spawns/kills runners.

object
desired_runners
required
integer format: int64
reason
required
string
closed_breaker_count
required

The number of currently-CLOSED (healthy) circuit breakers across all scopes — the operator’s “how many breakers are healthy” gauge.

integer format: int64
dispatch_cap_per_hour

The per-hour dispatch ceiling, when the deployment configures one (SUPACLOUD_DISPATCH_CAP_PER_HOUR); None = uncapped. The FE renders the rate against this cap.

integer | null format: int64
dispatch_rate_per_hour
required

Backlog runs dispatched per hour over the recent window (dispatched_recent averaged across the 24h window). A simple derived rate, not a separate read.

number format: double
dispatch_throughput_series
required

The hourly dispatch-throughput series over the last 24h (a contiguous 24 buckets, zero-filled). The operator console’s throughput sparkline.

Array<object>

One hour bucket of the 24h dispatch-throughput series (#626 Operations). The series is always a contiguous 24 buckets (the zero-fill fills the empty hours), so the FE renders a fixed-width sparkline.

object
bucket_start
required

The hour the bucket starts at (UTC, truncated to the hour).

string format: date-time
dispatched
required

Backlog runs dispatched in that hour.

integer format: int64
dispatched_recent
required

Backlog runs dispatched in the recent window (throughput).

integer format: int64
draining_runners
required

ADR 0046 P5.D — online runners that are draining/cordoned (excluded from new work; the scale-in candidates).

integer format: int64
error_recovery
required

Per-class agent-error recovery rates over the recent window.

Array<object>

One agent-error class’s recovery profile (the error-recovery-rate gauge). class is the snake_case tag (transient_server|usage_limit|context_degraded|auth_config|fatal); total is the events of the class in the recent window and recovery_rate is the fraction the recovery layer marks auto-retryable (retryable / total, 0 when total is 0).

object
class
required
string
recovery_rate
required
number format: double
retryable
required
integer format: int64
total
required
integer format: int64
fleet_queue_depth
required

ADR 0046 P5.D — the FLEET pull-queue depth: unclaimed assigned rows across both fleet queues (distinct from queued_items, the ADE backlog_items gauge). The signal an external autoscaler scales on.

integer format: int64
in_flight_cap

The per-workspace in-flight ceiling, when configured (SUPACLOUD_INFLIGHT_CAP_PER_WORKSPACE); None = uncapped.

integer | null format: int64
in_flight_total
required

ADR 0046 P5.D — total open (‘assigned’/‘claimed’/‘running’) assignments the fleet currently holds (in-flight work).

integer format: int64
in_flight_workspace
required

In-flight (claimed/running) fleet assignments for the SCOPED workspace — the per-tenant gauge (the cross-tenant snapshot leaves it 0, the fleet-wide figure is in_flight_total). Wired from a workspace-scoped read in the tenant snapshot.

integer format: int64
oldest_queued_age_seconds

Age in seconds of the oldest currently-queued item (queue staleness). None when the queue is empty.

integer | null format: int64
online_runners
required

ADR 0046 Phase 5 (P5.D) — online (heartbeating) runners in the fleet.

integer format: int64
priority_distribution
required

The queued-item priority distribution (highest-priority bucket first).

Array<object>

One priority bucket of the queue (the priority-distribution gauge). priority is the raw smallint (0 = highest); None = an unprioritized item (lowest).

object
count
required
integer format: int64
priority
integer | null format: int32
provider_breakers
required

The currently-TRIPPED instance-global PROVIDER breakers (cross-tenant) — the operator’s “which providers are failing fast right now” list. Provider breakers carry no workspace scope, so this is populated ONLY on the operator snapshot; the tenant-scoped snapshot leaves it empty (no cross-tenant provider leak).

Array<object>

A breaker’s current state (migration 217 circuit_breaker_state), enriched for the operator/tenant status view (#626 Operations) with the rolling-window failure count and the time until the next half-open probe.

object
error_class
required
string
failures_recent
required

#626 Operations — failures recorded for this breaker tuple within the recent rolling window (circuit_breaker_failures, mig 266; “n errors / 5 min”). A real time-bounded count, not the process-local consecutive-failure tally.

integer format: int64
id
required
string format: uuid
probe_in_seconds

#626 Operations — seconds until an open breaker admits its next half-open probe (opened_at + OPEN_COOLDOWN_SECS - now), or None when the breaker is not open, has no opened_at, or the cooldown has already elapsed (a probe is admissible now). Pure derivation — no schema change.

integer | null format: int64
scope_id
required
string
scope_kind
required
string
state
required

closed | open | half_open.

string
trip_count
required
integer format: int32
provider_saturation
required

Per-provider quota saturation (most-saturated first).

Array<object>

One provider’s quota-saturation gauge (ADR 0045 Stage 2a provider_quota_state). saturation is used / limit in [0, 1] summed across the provider’s credentials, or None when every metered window has an unknown limit (the FE renders “unknown”). near_exhaustion_windows counts windows already past the dispatcher’s 85% throttle floor.

object
limit_units
number | null format: double
near_exhaustion_windows
required
integer format: int64
provider
required
string
saturation
number | null format: double
used_units
required
number format: double
window_count
required
integer format: int64
queued_items
required

Backlog items currently queued awaiting dispatch (queue depth).

integer format: int64
seconds_since_tick

Seconds since the last scheduler tick (tick-SLA health). None before the first tick after boot.

integer | null format: int64
tick_p95_seconds

The 95th-percentile scheduler-tick duration over the last 24h (scheduler_tick_durations, mig 267), or None before any tick is recorded.

number | null format: double
tick_sla_pct
required

The fraction of recent scheduler ticks (last 24h) that finished within the SLA target (tick_sla_target_seconds), in [0, 1]. 1.0 when no ticks recorded yet (no breach to report).

number format: double
tick_sla_target_seconds
required

The scheduler-tick SLA target in seconds (a service config const, ADR 0045 §8) the tick_sla_pct is computed against.

integer format: int64
Examplegenerated
{
"autoscale": {
"desired_runners": 1,
"reason": "example"
},
"closed_breaker_count": 1,
"dispatch_cap_per_hour": 1,
"dispatch_rate_per_hour": 1,
"dispatch_throughput_series": [
{
"bucket_start": "2026-04-15T12:00:00Z",
"dispatched": 1
}
],
"dispatched_recent": 1,
"draining_runners": 1,
"error_recovery": [
{
"class": "example",
"recovery_rate": 1,
"retryable": 1,
"total": 1
}
],
"fleet_queue_depth": 1,
"in_flight_cap": 1,
"in_flight_total": 1,
"in_flight_workspace": 1,
"oldest_queued_age_seconds": 1,
"online_runners": 1,
"priority_distribution": [
{
"count": 1,
"priority": 1
}
],
"provider_breakers": [
{
"error_class": "example",
"failures_recent": 1,
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"probe_in_seconds": 1,
"scope_id": "example",
"scope_kind": "example",
"state": "example",
"trip_count": 1
}
],
"provider_saturation": [
{
"limit_units": 1,
"near_exhaustion_windows": 1,
"provider": "example",
"saturation": 1,
"used_units": 1,
"window_count": 1
}
],
"queued_items": 1,
"seconds_since_tick": 1,
"tick_p95_seconds": 1,
"tick_sla_pct": 1,
"tick_sla_target_seconds": 1
}