v0.32.6_fix2

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-14 11:51:37 +02:00
1 parent e1ac899ec0
commit fc8711d4d8
39 files changed
+695 -232

No files matched your search

+17
View File
@@ -1,3 +1,19 @@
// The OS collector already samples in the background. Expose just the
// chart inputs in compact SSE/fallback snapshots; the full, slower System
// information document remains behind /api/system-info.
fn live_chart_system_payload(state: &App) -> Value {
let view = state.diagnostics.view();
json!({
"sampled_at_ms": view.sampled_at_ms,
"cpu_percent": view.cpu_percent,
"process_cpu_percent": view.process_cpu_percent,
"process_rss_bytes": view.process_rss_bytes,
"network_rx_bytes_per_second": view.network_rx_bytes_per_second,
"network_tx_bytes_per_second": view.network_tx_bytes_per_second,
"network_interfaces": view.network_interfaces
})
}
fn live_status_payload(state: &App) -> Value {
let snapshot = state.config.load_full();
let stream_metrics = state.active_streams.iter().filter_map(|stream| {
@@ -13,6 +29,7 @@ fn live_status_payload(state: &App) -> Value {
"restart_required": snapshot.listeners != state.active_listeners
},
"metrics": state.metrics.view(),
"live_system": live_chart_system_payload(state),
"cache": state.cache.view(),
"transform_metrics": state.transform_metrics.total(),
"logs_dropped": state.logs.dropped.load(Ordering::Relaxed),