Remove Prometheus metrics prefix (#9543)

* Remove Prometheus metrics prefix

* Fix line widths

* Missed some metrics

* Fix CLI

* Run rustfmt on modified files

* Missing prefixes

* Hopefully fix compilation

* Rustfmt protocol.rs

* Should compile now I guess

* Rustfmt

Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
Pierre Krieger
2021-12-09 11:21:27 +01:00
committed by GitHub
parent 667dec91bf
commit 443bdc20d6
21 changed files with 125 additions and 102 deletions
+3 -3
View File
@@ -29,17 +29,17 @@ use prometheus::{core::GenericCounterVec, Opts};
lazy_static! {
pub static ref TOKIO_THREADS_TOTAL: GenericCounter<AtomicU64> =
GenericCounter::new("tokio_threads_total", "Total number of threads created")
GenericCounter::new("substrate_tokio_threads_total", "Total number of threads created")
.expect("Creating of statics doesn't fail. qed");
pub static ref TOKIO_THREADS_ALIVE: GenericGauge<AtomicU64> =
GenericGauge::new("tokio_threads_alive", "Number of threads alive right now")
GenericGauge::new("substrate_tokio_threads_alive", "Number of threads alive right now")
.expect("Creating of statics doesn't fail. qed");
}
#[cfg(feature = "metered")]
lazy_static! {
pub static ref UNBOUNDED_CHANNELS_COUNTER : GenericCounterVec<AtomicU64> = GenericCounterVec::new(
Opts::new("unbounded_channel_len", "Items in each mpsc::unbounded instance"),
Opts::new("substrate_unbounded_channel_len", "Items in each mpsc::unbounded instance"),
&["entity", "action"] // 'name of channel, send|received|dropped
).expect("Creating of statics doesn't fail. qed");