Skip to main content

Module metrics

Module metrics 

Source
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.
MetricsRegistry
Registry of all kernel metrics. Lock-free on the hot path.

Enums§

MetricSnapshot
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.