mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
Add network state to system.interval telemetry (#1959)
* add network state to system.interval telemetry * use serde_json * use unwrap_or_default
This commit is contained in:
committed by
Bastian Köcher
parent
0ea90111b4
commit
90cd8a8479
@@ -82,9 +82,12 @@ pub fn start<C>(service: &Service<C>, exit: ::exit_future::Exit, handle: TaskExe
|
||||
(proc.cpu_usage(), proc.memory())
|
||||
} else { (0.0, 0) };
|
||||
|
||||
let network_state = serde_json::to_string(&network.network_state()).unwrap_or_default();
|
||||
|
||||
telemetry!(
|
||||
SUBSTRATE_INFO;
|
||||
"system.interval";
|
||||
"network_state" => network_state,
|
||||
"status" => format!("{}{}", status, target),
|
||||
"peers" => num_peers,
|
||||
"height" => best_number,
|
||||
|
||||
Reference in New Issue
Block a user