pub struct JanusMetrics {Show 22 fields
pub signals_generated_total: CounterVec,
pub signal_generation_duration: HistogramVec,
pub signal_confidence: GaugeVec,
pub module_health: GaugeVec,
pub module_uptime_seconds: GaugeVec,
pub http_requests_total: CounterVec,
pub http_request_duration: HistogramVec,
pub http_requests_in_flight: Gauge,
pub db_queries_total: CounterVec,
pub db_query_duration: HistogramVec,
pub db_pool_size: Gauge,
pub redis_operations_total: CounterVec,
pub redis_operation_duration: HistogramVec,
pub redis_connected: Gauge,
pub websocket_connections: Gauge,
pub websocket_messages_sent: CounterVec,
pub supervisor_restarts_total: Counter,
pub supervisor_active_services: Gauge,
pub supervisor_spawned_total: Counter,
pub supervisor_terminated_total: Counter,
pub supervisor_circuit_breaker_trips: Counter,
pub supervisor_uptime_seconds: HistogramVec,
}Expand description
Unified metrics for all JANUS modules
Fields§
§signals_generated_total: CounterVecTotal signals generated
signal_generation_duration: HistogramVecSignal generation latency
signal_confidence: GaugeVecCurrent signal confidence
module_health: GaugeVecModule health (1 = healthy, 0 = unhealthy)
module_uptime_seconds: GaugeVecModule uptime in seconds
http_requests_total: CounterVecHTTP requests total
http_request_duration: HistogramVecHTTP request duration
http_requests_in_flight: GaugeHTTP requests in flight
db_queries_total: CounterVecDatabase query count
db_query_duration: HistogramVecDatabase query duration
db_pool_size: GaugeDatabase connection pool size
redis_operations_total: CounterVecRedis operations total
redis_operation_duration: HistogramVecRedis operation duration
redis_connected: GaugeRedis connection status
websocket_connections: GaugeActive WebSocket connections
websocket_messages_sent: CounterVecWebSocket messages sent
supervisor_restarts_total: CounterTotal number of service restarts across all supervised services.
Maps to: janus_supervisor_restarts_total
supervisor_active_services: GaugeNumber of services currently in a non-terminal phase.
Maps to: janus_supervisor_active_services
supervisor_spawned_total: CounterTotal number of services ever spawned (including initial + restarts).
Maps to: janus_supervisor_spawned_total
supervisor_terminated_total: CounterTotal number of services that have terminated.
Maps to: janus_supervisor_terminated_total
supervisor_circuit_breaker_trips: CounterTotal number of circuit breaker trips.
Maps to: janus_supervisor_circuit_breaker_trips_total
supervisor_uptime_seconds: HistogramVecPer-service uptime histogram (seconds).
Maps to: janus_supervisor_uptime_seconds
Implementations§
Source§impl JanusMetrics
impl JanusMetrics
Sourcepub fn record_signal(
&self,
module: &str,
signal_type: &str,
symbol: &str,
confidence: f64,
)
pub fn record_signal( &self, module: &str, signal_type: &str, symbol: &str, confidence: f64, )
Record a signal generation
Sourcepub fn record_module_health(
&self,
module: &str,
healthy: bool,
uptime_seconds: f64,
)
pub fn record_module_health( &self, module: &str, healthy: bool, uptime_seconds: f64, )
Record module health
Sourcepub fn record_http_request(
&self,
method: &str,
path: &str,
status: u16,
duration_secs: f64,
)
pub fn record_http_request( &self, method: &str, path: &str, status: u16, duration_secs: f64, )
Record HTTP request
Sourcepub fn record_supervisor_spawn(&self)
pub fn record_supervisor_spawn(&self)
Record a service spawn event (counter only — the active_services
gauge is managed by SupervisorMetrics).
Sourcepub fn record_supervisor_restart(&self)
pub fn record_supervisor_restart(&self)
Record a service restart event.
Sourcepub fn record_supervisor_termination(&self)
pub fn record_supervisor_termination(&self)
Record a service termination event (counter only — the
active_services gauge is managed by SupervisorMetrics).
Sourcepub fn record_supervisor_circuit_breaker_trip(&self)
pub fn record_supervisor_circuit_breaker_trip(&self)
Record a circuit breaker trip event.
Sourcepub fn record_supervisor_service_uptime(&self, service: &str, uptime_secs: f64)
pub fn record_supervisor_service_uptime(&self, service: &str, uptime_secs: f64)
Record a service’s cumulative uptime when it terminates.