Functions§
- init
- Initialize the Prometheus metrics exporter.
- metrics_
handle - Get the Prometheus handle for rendering metrics.
- record_
cache_ tokens - Record prompt-cache token usage (write = cache miss tokens, read = cache hit tokens).
- record_
eval_ regression - Increment the count of eval regressions detected against a baseline.
- record_
eval_ score - Set the mean score for an eval suite + scorer (0.0–1.0).
- record_
guardrail_ flagged - Increment the count of chat inputs flagged by an input guardrail, by category
(
injection|pii). - record_
llm_ call_ latency - Record the wall-clock duration of a single LLM driver call.
- record_
llm_ cost - Record an estimated per-request LLM cost in USD. Recorded as a histogram so
the
_sumseries gives cumulative spend while preserving per-run distribution. - record_
llm_ tokens - Record LLM token usage.
- record_
provider_ health - Record a provider’s current health (CH-03):
1.0when available,0.0when in a failover cooldown window. - record_
request - Record an HTTP request completion.
- record_
sandbox_ created - Record sandbox creation.
- record_
sandbox_ error - Record sandbox error.
- record_
sandbox_ execution - Record sandbox execution duration.
- record_
skill_ activation - Record a skill-activation decision: which skill was selected for an intent, by which classifier backend, and whether it was accepted (vs. an override / fallback). Enables per-skill / per-backend precision-recall accounting — the prerequisite for measuring and improving activation accuracy (fable §8, plan CH-08).
- record_
skill_ activation_ outcome - Record that an activated skill’s execution succeeded or failed — pairs with
record_skill_activationto distinguish “chosen” from “chosen and worked”. - record_
skill_ invocation - Exact host activation, distinct from matcher acceptance.
- record_
skill_ request_ usage - Attribution only. Never updates the ordinary token or cost totals.
- record_
skill_ shadow_ recall - One explicit activation is the ground-truth sample for Recall@10. The histogram’s sum / count is recall; this does not filter any catalog.
- record_
sycophancy_ flagged - Increment the count of responses flagged as sycophantic.
- record_
sycophancy_ score - Record the sycophancy score (0.0 clean – 1.0 fully sycophantic) of a response.
- record_
tool_ call - Record a tool call result.
- request_
timer - Create a request timer. Call
.finish()on the returned value when done. - sandbox_
active_ dec - A sandbox execution finished — decrement the in-flight gauge.
- sandbox_
active_ inc - A sandbox execution started — increment the in-flight gauge.
- set_
a2ui_ replay_ runs - Set the number of runs with retained A2UI replay state.
- set_
active_ sandboxes - Set active sandbox count gauge.
- set_
active_ sessions - Set the active session count gauge.
- set_
mcp_ server_ status - Record MCP server status.
- set_
runs_ retained - Set the number of run records retained for replay and diagnostics.