Expand description
Lightweight Prometheus-compatible metrics registry.
Provides thread-safe counters, gauges, and histograms without heavy external
dependencies. All metric types use atomics and DashMap for lock-free
concurrent access. The registry can export its state in Prometheus text
exposition format via MetricsRegistry::export_prometheus.
Structs§
- Histogram
- A histogram that tracks the distribution of observed values across pre-defined buckets.
- Metrics
Registry - A lightweight, thread-safe metrics registry that can export its state in Prometheus text format.
Constants§
- ACTIVE_
BOUTS - Open bout sessions.
- ACTIVE_
FIGHTERS - Currently active fighters.
- ACTIVE_
GORILLAS - Currently active gorillas.
- ERRORS_
TOTAL - Errors by type.
- FIGHTER_
SPAWNS_ TOTAL - Fighters spawned.
- GORILLA_
RUNS_ TOTAL - Gorilla runs.
- LLM_
CALLS_ TOTAL - Total LLM calls, labeled by provider + model.
- LLM_
LATENCY_ SECONDS - LLM call latency.
- MEMORY_
ENTRIES - Total memory entries.
- MESSAGES_
TOTAL - Messages processed.
- QUEUE_
DEPTH - Task queue depth.
- REQUESTS_
TOTAL - Total API requests, labeled by method + path + status.
- REQUEST_
DURATION_ SECONDS - API request latency.
- TOKENS_
INPUT_ TOTAL - Total input tokens consumed.
- TOKENS_
OUTPUT_ TOTAL - Total output tokens consumed.
- TOOL_
EXECUTIONS_ TOTAL - Total tool executions, labeled by tool_name + result.
- TOOL_
EXECUTION_ SECONDS - Tool execution time.
Functions§
- register_
default_ metrics - Register all well-known Punch metrics with help text.