A deliberately small operational panel. e2b-compat
exposes /metrics in Prometheus text format;
tools/metrics-scraper.sh polls it and appends one JSON
line per sample to data/metrics/YYYY-MM-DD.jsonl. This
page reads whatever’s sitting in that directory at build time and
plots it. No DB, no dashboard server — just JSONL and a build step.
Alive state
data/metrics/. Run
mise run metrics:watch while the gateway is busy, then rebuild.
Sandbox lifecycle
data/metrics/. Run
mise run metrics:watch while the gateway is busy, then rebuild.
Execution path
data/metrics/. Run
mise run metrics:watch while the gateway is busy, then rebuild.
Per-sandbox CPU
One line per live sandbox, each labeled with the first 12 hex chars
of its id. Source is coppice_sandbox_cpu_percent from rctl(8);
100 = one full core. See per-sandbox metrics
for the scraper/label shape.
data/metrics/. Run
mise run metrics:watch while the gateway is busy, then rebuild.
How to feed this page
# On your laptop, with honor reachable and the gateway running:
mise run metrics:scrape # one-shot append to data/metrics/TODAY.jsonl
mise run metrics:watch # 30 s loop; Ctrl-C to stop
# Run some load so the page has something to show:
mise run demo:notebook # or run example/07-pool-fanout.sh
# Rebuild the site to see the new samples:
pnpm build
Git-ignored by default. If you want samples to land on the deployed
site, drop the data/metrics/ line from .gitignore and
commit them — every sample is ~300 bytes.
What’s tracked
| metric | type | source |
|---|---|---|
coppice_uptime_seconds | gauge | process clock |
coppice_sandboxes_alive | gauge | in-memory registry size |
coppice_kernels_alive | gauge | ipykernel PID table size |
coppice_sandboxes_created_total | counter | POST /sandboxes on success |
coppice_sandboxes_killed_total | counter | DELETE /sandboxes/:id on success |
coppice_sandboxes_paused_total | counter | POST /sandboxes/:id/pause |
coppice_sandboxes_resumed_total | counter | POST /sandboxes/:id/resume |
coppice_execute_requests_total | counter | POST /execute, counted at the end |
coppice_execute_errors_total | counter | /execute that emitted an ExecEnv::Error frame |
coppice_kernel_spawns_total | counter | ipykernel_launcher spawn succeeded |
coppice_kernel_exits_total | counter | SIGTERM or crash reaped |
coppice_sandbox_create_ns_sum | counter | ns spent in create, pair with _created_total |
coppice_execute_ns_sum | counter | ns spent in /execute, pair with _requests_total |
No histograms yet — if the running-mean from ns_sum / requests_total
stops being precise enough we’ll swap in the metrics crate, but the
present shape is enough to show whether the system is doing work.