mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
Additional Metrics collected and exposed via prometheus (#5414)
This PR refactors the metrics measuring and Prometheus exposing entity in sc-service into its own submodule and extends the parameters it exposes by: - system load average (over one, five and 15min) - the TCP connection state of the process (lsof), refs #5304 - number of tokio threads - number of known forks - counter for items in each unbounded queue (with internal unbounded channels) - number of file descriptors opened by this process (*nix only at this point) - number of system threads (*nix only at this point) refs #4679 Co-authored-by: Max Inden <mail@max-inden.de> Co-authored-by: Ashley <ashley.ruglys@gmail.com>
This commit is contained in:
committed by
GitHub
parent
6847f8452e
commit
247822bb33
@@ -20,8 +20,9 @@
|
||||
mod tests;
|
||||
|
||||
use futures::{future::BoxFuture, FutureExt, TryFutureExt};
|
||||
use futures::{channel::{mpsc, oneshot}, compat::Compat};
|
||||
use futures::{channel::oneshot, compat::Compat};
|
||||
use sc_rpc_api::Receiver;
|
||||
use sp_utils::mpsc::TracingUnboundedSender;
|
||||
use sp_runtime::traits::{self, Header as HeaderT};
|
||||
|
||||
use self::error::Result;
|
||||
@@ -33,7 +34,7 @@ pub use self::gen_client::Client as SystemClient;
|
||||
/// System API implementation
|
||||
pub struct System<B: traits::Block> {
|
||||
info: SystemInfo,
|
||||
send_back: mpsc::UnboundedSender<Request<B>>,
|
||||
send_back: TracingUnboundedSender<Request<B>>,
|
||||
}
|
||||
|
||||
/// Request to be processed.
|
||||
@@ -59,7 +60,7 @@ impl<B: traits::Block> System<B> {
|
||||
/// reading from that channel and answering the requests.
|
||||
pub fn new(
|
||||
info: SystemInfo,
|
||||
send_back: mpsc::UnboundedSender<Request<B>>,
|
||||
send_back: TracingUnboundedSender<Request<B>>,
|
||||
) -> Self {
|
||||
System {
|
||||
info,
|
||||
|
||||
Reference in New Issue
Block a user