The desk you can watch
The worker exposes a Prometheus /metrics endpoint on its ops port — throughput, uptime, booked revenue, and the live calibration score. Point Grafana at it and the desk becomes a time series. Below: the metric catalog, the live scorecard gauges, and settled revenue per service from the on-chain order feed.
Scrape it
Metrics ride the same port as the status page (ORACLE_HEALTH_PORT). No new config.
# prometheus.yml
scrape_configs:
- job_name: hunch-oracle
static_configs:
- targets: ["oracle-worker:8080"] # ORACLE_HEALTH_PORT
# or just:
curl -s http://localhost:8080/metricsLive scorecard gauges
The oracle_forecast_* family, computed from the same track-record ledger the scorecard reads. Resolved forecasts only.
No forecasts recorded yet — the scorecard family appears once the worker runs with ORACLE_LEDGER_PATH set. Try pnpm --filter @hunch/oracle smoke:metrics.
Settled revenue per service
Real USDC that cleared on Base, grouped from the CROO completed-order feed. This is settled revenue — distinct from the worker's oracle_revenue_usd gauge, which is booked at list price from the delivery log.
| Service | Delivered | Settled USDC |
|---|---|---|
| echo | 1 | $0.01 |
| Total | 1 | $0.01 |
Metric catalog
Every family the /metrics endpoint emits. The scorecard family appears only when the ledger is enabled.
| Metric | Type | Labels | Description |
|---|---|---|---|
| oracle_up | gauge | — | 1 if the loop is connected to CAP, else 0. |
| oracle_uptime_seconds | gauge | — | Seconds since the loop started. |
| oracle_negotiations_total | counter | outcome | Negotiations handled (accepted|rejected). |
| oracle_orders_total | counter | outcome | Paid orders handled (delivered|rejected|skipped_sla). |
| oracle_orders_delivered_by_service_total | counter | service, listing | Deliveries per service handler + listing. |
| oracle_errors_total | counter | — | Unhandled loop errors. |
| oracle_revenue_usd | gauge | service, listing | Booked revenue at list price, per service. |
| oracle_revenue_usd_total | gauge | — | Total booked revenue at list price. |
| oracle_last_event_timestamp_seconds | gauge | — | Unix time of the last CAP event. |
| oracle_last_sweep_timestamp_seconds | gauge | — | Unix time of the last safety-net sweep. |
| oracle_forecasts_total scorecard | gauge | — | Forecasts on the track-record ledger. |
| oracle_forecasts_resolved scorecard | gauge | — | Recorded forecasts that have resolved + scored. |
| oracle_forecasts_pending scorecard | gauge | — | Recorded forecasts awaiting resolution. |
| oracle_forecast_brier scorecard | gauge | — | Mean Brier over resolved forecasts. |
| oracle_forecast_log_loss scorecard | gauge | — | Mean log loss over resolved forecasts. |
| oracle_forecast_hit_rate scorecard | gauge | — | Share of resolved forecasts where the called outcome occurred. |