Engine reference — generated from the canonical engineering source. Do not edit this page by hand.
Observability: Metrics, Alerts & Ops Queries
The canonical alert source is observability/grafana/alerting/sol-alerts.yml;
dashboards live in observability/grafana/dashboards/. The metric-family
whitelist (ci/metrics_whitelist.generated.txt) is generated from the real
emit sites and enforced bidirectionally against alerts and dashboards.
Cost & spend
| Family | Type | Consumer |
|---|---|---|
sol_inference_spend_usd_total{model} | counter | SolCostBurnRate (USD/min), spend panel |
sol_inference_tokens_input_total{model} | counter | spend panel |
sol_inference_tokens_output_total{model} | counter | spend panel |
sol_inference_spend_today_usd / sol_inference_spend_today_tokens | gauge | spend panel |
sol_inference_daily_budget_usd / sol_inference_daily_token_budget | gauge | spend panel |
sol_inference_budget_exceeded_total{axis} | counter | SolInferenceBudgetExceeded, spend panel (axis = tokens/usd/unpriced) |
sol_inference_model_unpriced_total{model} | counter | SolInferenceModelUnpriced, spend panel |
Alerts:
- SolCostBurnRate —
sum(rate(sol_inference_spend_usd_total[5m])) * 60 > 0.72for 15m. Settled USD (real model rates), not a token proxy; retune the threshold to the deployment’s fleet spend ceiling. - SolInferenceBudgetExceeded — any
increaseof the refusal counter in 10m. The refused principal is in the response body, not the metric (labels stay bounded). - SolInferenceModelUnpriced — unpriced settlements in 30m. Add rate metadata
or set
inference_unknown_price_policy=deny.
Ops queries:
# USD/min, fleet + top models
sum(rate(sol_inference_spend_usd_total[5m])) * 60
topk(5, sum by (model) (rate(sol_inference_spend_usd_total[5m])) * 60)
# how close is today to the configured caps?
sol_inference_spend_today_usd / sol_inference_daily_budget_usd
sol_inference_spend_today_tokens / sol_inference_daily_token_budget
# refusals + unpriced models
sum by (axis) (increase(sol_inference_budget_exceeded_total[1h]))
sum by (model) (increase(sol_inference_model_unpriced_total[1h]))
Per-principal detail is the read surface, not a metric label:
GET /api/v1/usage (self; admin ?user_uuid=). See
cost.md.
Provider pool
| Family | Type | Meaning |
|---|---|---|
sol_provider_pool_keys{provider,state} | gauge | Keys by active / cooldown / unavailable |
sol_provider_pool_headroom{provider} | gauge | Drawable keys (capacity − cooldown − unavailable) |
sol_provider_pool_cooldown_seconds{provider} | gauge | Max remaining cooldown |
sol_provider_pool_usage_total{provider} | counter | Cumulative draws |
sol_provider_pool_errors_total{provider} | counter | Cumulative error reports |
Alert: SolProviderPoolHeadroomZero — sol_provider_pool_headroom == 0
for 10m (a provider with configured keys has no drawable key).
Ops query (Erlang shell) — the same projection the exporter renders:
sol_provider_pool:stats().
%% #{generated_at_ms := …, providers := [#{provider := …,
%% keys_total := N, keys_active := A, keys_cooldown := C,
%% keys_unavailable := U, cooldown_count := C, max_cooldown_seconds := S,
%% capacity := N, headroom := A, usage_total := …,
%% error_total := …, draw_epoch := …, error_epoch := …}],
%% totals := #{…}}
draw_epoch / error_epoch are the max monotonic stamps per provider —
they make the stale-success fair-clear auditable: a success only
clears errors that predate its own draw epoch. Per-key detail remains
sol_provider_pool:list_keys(Provider) and
sol_provider_pool:circuit_report(Provider).
FIM completion plane
POST /v1/completions resolves a fim lane and calls its internal
/infill. These families keep the editor class observable without exposing
the lane endpoint:
| Family | Type | Meaning |
|---|---|---|
sol_lane_completion_latency_seconds{lane} | histogram | Completion round-trip (cumulative buckets, one sample per served request) |
sol_lane_completion_inflight | gauge | Completion requests currently on a lane |
sol_lane_completion_queue | gauge | Completion requests awaiting lane admission |
sol_lane_completion_cold_starts_total{lane} | counter | Cold-lane starts triggered by a completion request (lane_warming responses) |
sol_lane_completion_refused_total{reason} | counter | Typed refusals (fim_unsupported, lane_busy, queue_full, lane_warming, upstream_error, …) |
Alert: SolLaneCompletionDegraded — completion p95 above 1.5 s, or any
non-lane_warming refusal in 10m. The lane’s own /infill stays internal;
an upstream infill failure surfaces as lane_rejected/lane_unavailable
and counts under reason="upstream_error".
Ops queries:
histogram_quantile(0.95, sum by (le) (rate(sol_lane_completion_latency_seconds_bucket[5m])))
sum by (reason) (increase(sol_lane_completion_refused_total[15m]))
sol_lane_completion_inflight
sol_lane_completion_queue
ZMQ singleton mailbox depths
The three singleton mailbox depths the scale-concentration S-rate trigger
reads. The gateway depth is stamped by the live gateway; the dispatcher and
task-store depths are scrape-time process_info/2 reads (0 when the
process is not running).
| Family | Type | Source |
|---|---|---|
sol_zmq_gateway_mailbox_depth | gauge | gateway check_liveness + per-frame stamp |
sol_zmq_dispatcher_mailbox_depth | gauge | sol_zmq_recv_dispatcher live mailbox |
sol_zmq_task_store_mailbox_depth | gauge | sol_task_store live mailbox |
Ops query — the S-rate qualifying condition (≥ 2 of 3 above 5k for 15m):
count(
(max_over_time(sol_zmq_dispatcher_mailbox_depth[15m]) > 5000)
or (max_over_time(sol_zmq_gateway_mailbox_depth[15m]) > 5000)
or (max_over_time(sol_zmq_task_store_mailbox_depth[15m]) > 5000)
) >= 2
Decision context: plan/zmq-sharding-design.md (, NO-ADOPT production
sharding — trigger-gated), plan/task-store-writer-sharding.md (,
NO-ADOPT — same triggers), plan/event-group-commit-evaluation.md (,
NO-ADOPT). The pre-approved O(1) ready-ring is landed in
sol_zmq_worker_manager:find_ready_worker/3.