Expand description
Kernel metrics collection with lock-free counters, gauges, and histograms.
MetricsRegistry provides a lock-free metrics subsystem. Counters and
gauges use atomic operations on the hot path. Histograms use fixed bucket
boundaries with atomic counters – O(buckets) per record.
Structs§
- Histogram
- A fixed-bucket histogram for recording distributions.
- Metrics
Registry - Registry of all kernel metrics. Lock-free on the hot path.
Enums§
- Metric
Snapshot - A snapshot of a single metric.
Constants§
- DEFAULT_
BUCKETS - Default histogram bucket boundaries (in milliseconds for latency metrics).
- METRIC_
ACTIVE_ AGENTS - Gauge: currently active agents.
- METRIC_
ACTIVE_ SERVICES - Gauge: currently active services.
- METRIC_
AGENT_ CRASHES - Counter: total agent crashes.
- METRIC_
AGENT_ SPAWNS - Counter: total agent spawns.
- METRIC_
CHAIN_ LENGTH - Gauge: exochain length.
- METRIC_
GOVERNANCE_ EVAL_ MS - Histogram: governance evaluation time in milliseconds.
- METRIC_
IPC_ LATENCY_ MS - Histogram: IPC latency in milliseconds.
- METRIC_
MESSAGES_ DELIVERED - Counter: total messages successfully delivered.
- METRIC_
MESSAGES_ DROPPED - Counter: total messages dropped (dead-lettered).
- METRIC_
MESSAGES_ SENT - Counter: total messages sent via A2ARouter.
- METRIC_
TOOL_ EXECUTIONS - Counter: total tool executions.
- METRIC_
TOOL_ EXECUTION_ MS - Histogram: tool execution time in milliseconds.