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.
const url = 'https://example.com/api/operator/v1/tenant/dispatch/metrics';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/operator/v1/tenant/dispatch/metricsResponses
Section titled “Responses”The operator dispatch-metrics snapshot (D1) — the cross-tenant gauges the operator console renders.
object
ADR 0046 P5.D — the pure autoscaling DECISION (desired runner count + reason) an external autoscaler actuates. SupaCloud never spawns/kills runners.
object
The number of currently-CLOSED (healthy) circuit breakers across all scopes — the operator’s “how many breakers are healthy” gauge.
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.
Backlog runs dispatched per hour over the recent window (dispatched_recent
averaged across the 24h window). A simple derived rate, not a separate read.
The hourly dispatch-throughput series over the last 24h (a contiguous 24 buckets, zero-filled). The operator console’s throughput sparkline.
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
The hour the bucket starts at (UTC, truncated to the hour).
Backlog runs dispatched in that hour.
Backlog runs dispatched in the recent window (throughput).
ADR 0046 P5.D — online runners that are draining/cordoned (excluded
from new work; the scale-in candidates).
Per-class agent-error recovery rates over the recent window.
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
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.
The per-workspace in-flight ceiling, when configured
(SUPACLOUD_INFLIGHT_CAP_PER_WORKSPACE); None = uncapped.
ADR 0046 P5.D — total open (‘assigned’/‘claimed’/‘running’) assignments the fleet currently holds (in-flight work).
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.
Age in seconds of the oldest currently-queued item (queue staleness).
None when the queue is empty.
ADR 0046 Phase 5 (P5.D) — online (heartbeating) runners in the fleet.
The queued-item priority distribution (highest-priority bucket first).
One priority bucket of the queue (the priority-distribution gauge). priority
is the raw smallint (0 = highest); None = an unprioritized item (lowest).
object
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).
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
#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.
#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.
closed | open | half_open.
Per-provider quota saturation (most-saturated first).
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
Backlog items currently queued awaiting dispatch (queue depth).
Seconds since the last scheduler tick (tick-SLA health). None before the
first tick after boot.
The 95th-percentile scheduler-tick duration over the last 24h
(scheduler_tick_durations, mig 267), or None before any tick is recorded.
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).
The scheduler-tick SLA target in seconds (a service config const, ADR 0045 §8)
the tick_sla_pct is computed against.
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}