Expand description
Status and metrics reporting (atomized; siblings live in StatusReporter/).
§IPC Status Reporter
Mountain-side observability for the Wind ↔ Mountain bridge. Collects per-channel message counters, latency, queue depth, and host resource samples; aggregates them into health-score and service-discovery snapshots; emits to Sky via Tauri events on a configurable interval.
Layout:
- DTO siblings (
Struct/Enumper file): the wire shapes Sky deserialises. Reporter::Struct- the aggregator + 30-method impl (one cohesive unit; constructor, periodic loops, health check, service discovery, recovery).mountain_*Tauri commands - one wire-bound entry per file, all delegating to theReporter::Structin Tauri state.InitializeStatusReporter::initialize_status_reporter- bootstrap helper called fromBinary/Register/StatusReporterRegister.rs.
Modules§
- Comprehensive
Status Report - Combined status report - basic IPC slice + performance
metrics + health monitor - emitted to Sky periodically and
returned by
mountain_get_comprehensive_status. - Connection
Status - Connectivity slice of
IPCStatusReport::Struct- is the IPC server reachable, when did it last heartbeat, and how long has the current connection been alive. - Health
Issue - Single health-check finding: what went wrong, how serious,
when detected, and (optionally) when resolved. Carried in
HealthMonitor::Struct::issues_detected. - Health
Issue Type - Discriminator for
HealthIssue::Struct- the kind of anomaly the reporter detected during a health check. - Health
Monitor - Aggregated health snapshot - 0-100 score plus the list of
HealthIssue::Structentries that drove the deductions, and a counter for automatic-recovery attempts. - IPCStatus
Report - Single-tick IPC status report sent to Sky: connection state, queue depth, listener inventory, recent message stats, error count, uptime.
- Initialize
Status Reporter - Bootstrap helper - construct the
StatusReporter::Reporterand stash a clone in the app’s Tauri state so themountain_*Tauri commands cantry_state::<Reporter>(). - Message
Stats - Per-channel message counters used to compute throughput
and average processing time inside
IPCStatusReport::Struct. - Performance
Metrics - Sliding-window IPC performance snapshot - throughput, latency, compression ratio, pool utilization, plus host resource samples.
- Reporter
StatusReporteraggregator - holds the IPC server handle, status history ring (last 100), error counter, performance / health / service-registry shared state, and emits periodic snapshots to Sky.- Service
Info - Single-service descriptor produced by service discovery. Carries identity, status, lifecycle timings, dependency list, performance counters, and the gRPC endpoint.
- Service
Metrics - Per-service performance counters embedded inside
ServiceInfo::Struct. Currently filled with mock values pending real metric plumbing. - Service
Registry - Service-discovery registry - the map of known services and the schedule on which discovery refreshes it.
- Service
Status - Lifecycle state of a discovered Mountain service.
- Severity
Level - Severity rating attached to a
HealthIssue::Struct. Drives whether the alert is informational (Low) or pages on-call (Critical). - mountain_
attempt_ recovery mountain_attempt_recoveryTauri command - dispose + reinitialise the IPC server and zero the error counter.- mountain_
discover_ services mountain_discover_servicesTauri command - run a one-shot discovery pass and return the populatedServiceInfo::Structlist.- mountain_
get_ comprehensive_ status mountain_get_comprehensive_statusTauri command - assembles aComprehensiveStatusReport::Struct(basic status + performance metrics + health) in one call.- mountain_
get_ health_ status mountain_get_health_statusTauri command - returns the currentHealthMonitor::Struct(score + active issues).- mountain_
get_ ipc_ status mountain_get_ipc_statusTauri command - one-shot status report (basic IPC slice only).- mountain_
get_ ipc_ status_ history mountain_get_ipc_status_historyTauri command - returns the last-100 ring buffer ofIPCStatusReport::Struct.- mountain_
get_ performance_ metrics mountain_get_performance_metricsTauri command - returns the latest cachedPerformanceMetrics::Structsnapshot.- mountain_
get_ service_ info mountain_get_service_infoTauri command - look up one service by name in the registry.- mountain_
get_ service_ registry mountain_get_service_registryTauri command - returns the fullServiceRegistry::Structsnapshot.- mountain_
perform_ health_ check mountain_perform_health_checkTauri command - runs a synchronous health-check pass and returns the resultingHealthMonitor::Struct.- mountain_
start_ ipc_ status_ reporting mountain_start_ipc_status_reportingTauri command - kick off the periodic Sky-emit loop withinterval_secondsbetween snapshots.- mountain_
start_ service_ discovery mountain_start_service_discoveryTauri command - kicks off the periodic service-discovery background task driven byServiceRegistry::Struct::discovery_interval.