Guardrails and OpenAPPA Metrics
Track Guardrails hooks and OpenAPPA engine operations through Archestra's standard Prometheus /metrics endpoint.
Collection Setup
Scrape every Archestra web and worker pod using the standard metrics endpoints and authentication. Hook and engine metrics are included in the same response. No additional exporter, receiver, or data source is required.
If your collector filters metric names, retain openappa_hook_*, appa_*, and agent_, including histogram _bucket, _sum, and _count series. Preserve the metric labels and pod identity labels.
Exercise a Guardrails-enabled request, then query sum by (hook, decision) (openappa_hook_dispatches_total) and sum by (outcome) (appa_policy_decisions_total) in Prometheus. Select that Prometheus source as Metrics on the Guardrails & OpenAPPA dashboard. Metrics appear when their corresponding operations run; an absent event-driven series is not a successful zero.
Embedded Hook Metrics
Archestra exposes two metric families on its standard Prometheus scrape endpoint (:9050/metrics on web pods and :9000/metrics on worker pods; see Scraping).
| Metric | Type | Labels | Measures |
|---|---|---|---|
openappa_ | Counter | hook, decision | Completed embedded OpenAPPA hook dispatches, including failures; one observation after policy-move retries. |
openappa_ | Histogram | hook, decision | Embedded OpenAPPA hook dispatch wall time in seconds (0.001 to 300s buckets), including policy resolution inside dispatch, native initialization, storage, consults, and retries. |
Dispatch Semantics
Each observation records one logical hook dispatch across the embedded host boundary after any policy-move retries settle. One user request or agent turn can trigger multiple hook dispatches (such as session_, tool_, prompt, tool_, and turn_), and a single tool_ dispatch can evaluate policy rules, consult helpers or annotators, and retry when an organization's policy revision moves. These metrics do not count individual engine rule checks or unique user requests.
Metric collection cannot alter enforcement. If metric recording is disabled or fails, Archestra preserves the original hook decision or error unchanged.
Labels
Both families use closed label sets to keep cardinality bounded and never emit organization, session, user, agent, or call IDs, tool names, arguments, policy text, or error messages.
| Label | Values |
|---|---|
hook | session_, prompt, tool_, tool_, turn_, cancel_, child_, child_, child_, yell, or other for an unrecognized hook |
decision | ack, allow_, pass_, deny_, block, replace_, deliver_, child_, context, refuse, mcp_, other for an unrecognized decision, or error when the dispatch rejects |
Related boundary counters on other pages track downstream effects: llm_ counts tool calls blocked at the LLM Proxy, and agent_ counts runtime boundary refusals.
Shared policy preloading for a tool-call batch and principal lookup happen before this boundary and are excluded.
Query dispatch rates, failures, and tail latency with PromQL:
# Embedded hook dispatch rate by hook and decision
sum by (hook, decision) (
rate(openappa_hook_dispatches_total[5m])
)
# Failed dispatches or structured runtime refusals
sum by (hook, decision) (
rate(openappa_hook_dispatches_total{decision=~"error|refuse"}[5m])
)
# 95th-percentile hook dispatch wall time by hook
histogram_quantile(
0.95,
sum by (le, hook) (rate(openappa_hook_dispatch_duration_seconds_bucket[5m]))
)
Engine Metrics
These metrics describe policy checks, external calls, remedies, and runtime failures inside Archestra. They use the same endpoint as hook metrics. Durations are in seconds. Counters and histograms are cumulative for each process; scrapes do not reset them.
| Metric | Type | Labels | Measures |
|---|---|---|---|
appa_ | Counter | outcome (allowed, denied) | Completed tool-proposal policy decisions |
appa_ | Histogram | outcome (allowed, denied, error) | Policy-check duration, including failed evaluations |
appa_ | Counter | role, outcome (answered, no_) | External helper, annotator, or authority calls |
appa_ | Histogram | role, outcome (answered, no_) | External-call duration |
appa_ | Counter | outcome (executed, declined, no_, refused) | Remedy attempts |
appa_ | Histogram | outcome (executed, declined, no_, refused) | Remedy duration |
appa_ | Counter | component, error_ | Runtime failures classified by bounded component and error type |
A host hook acknowledgment is distinct from a tool-proposal policy decision. One hook dispatch can include multiple engine operations. Compare these counters by their documented operation rather than treating them as interchangeable request counts.
Only operational labels are exported. Organization, user, session, tool, policy, and request content are excluded. If engine collection fails, Archestra continues serving its other process metrics.