Available on crate feature
serve only.Expand description
faucet_serve_* request metrics. The path label is the matched route
template (/v1/runs/{id}), never the raw path — cardinality safety.
Functions§
- inc_
run_ logs_ purged - Count persisted run-log lines purged by the retention loop (#529).
- matched_
path_ label - The matched route template for a request, or
<unmatched>for a 404. - record_
idempotency_ hit - Count an idempotency-key replay hit.
- record_
run_ finished - Count a run reaching a terminal state, labelled by status + a finer reason.
- record_
runs_ claimed - Count runs claimed by this instance’s claim loop.
- record_
runs_ reclaimed - Count failover reclaims, split by outcome.
- record_
shards_ claimed - Count source shards claimed for execution by this instance (Mode B, #230).
- record_
shards_ reclaimed - Count shard reclaims (rebalance), split by outcome (Mode B, #230).
- set_
cluster_ enabled 1when clustered execution is enabled for this instance, else0.- set_
cluster_ instances - Live cluster member count (refreshed each lease-loop tick).
- set_
history_ degraded - Set the run-history degraded gauge (
1once the persistent backend has fallen back to in-memory; drives alerting alongside/readyz). - set_
run_ gauges - Refresh the queue-depth + in-flight gauges from the registry. Called on every queue transition (submit, queued→running, finish).
- track_
metrics - Middleware: count every request + record its duration, labelled by method, matched-path template, and response status.