id_effect_console
The operator console for id_effect services: live fibers from the core fiber-registry feature,
supervision trees, metrics, health and the log level, behind an id_effect_authz guard (ADR 0010
Amendment 6).
Console::router(guard) is the only way to get the routes: JSON under /_console/api/, every
route and the console's fallback behind the guard (401 anonymous, 403 otherwise).
| Route | Answers |
|---|---|
GET fibers |
every live fiber (core fiber_dump) |
GET supervisors |
the registered supervisors' trees, from which_children |
GET metrics |
the metric registry and the runtime fiber gauges |
GET health |
the HealthRegistry report |
GET / PUT log-level |
the reloadable EnvFilter and the EffectLogger minimum, changed without a restart |
GET jobs |
per-queue counts and the newest jobs of an id_effect_jobs queue (feature jobs) |
POST jobs/{id}/retry / cancel |
JobQueue::retry_now / cancel on one job (404 unknown, 409 wrong state; JSON content type required) |
The same router serves the dashboard at GET /_console, behind the same guard: one static page
(inline CSS and vanilla JavaScript, no build step, nothing loaded from another origin) that polls
the API and shows health, the log level with a form to change it, the supervision trees, the job
queues (with retry and cancel buttons), the live fibers and the metrics.
use ;
use Console;
let console: Router = new
// .supervisor("app", supervisor_handle)
// .env_filter(otel_guard.env_filter().clone())
.router;
ConsoleConfig is where the console listens. A console bound to a loopback address serves the
local machine only and may use a lenient guard; on any other address the guard must restrict it
to operators:
use ConsoleConfig;
let local = loopback;
assert_eq!;
assert!;
let public = new;
assert!;
Tier platform: the Ledger reference app under examples/reference/ depends on it.