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
+5 -4
View File
@@ -132,21 +132,22 @@ impl Metrics {
fn register(r: &Registry) -> Result<Self, PrometheusError> {
Ok(Self {
peers: {
let g = Gauge::new("sync_peers", "Number of peers we sync with")?;
let g = Gauge::new("substrate_sync_peers", "Number of peers we sync with")?;
register(g, r)?
},
queued_blocks: {
let g = Gauge::new("sync_queued_blocks", "Number of blocks in import queue")?;
let g =
Gauge::new("substrate_sync_queued_blocks", "Number of blocks in import queue")?;
register(g, r)?
},
fork_targets: {
let g = Gauge::new("sync_fork_targets", "Number of fork sync targets")?;
let g = Gauge::new("substrate_sync_fork_targets", "Number of fork sync targets")?;
register(g, r)?
},
justifications: {
let g = GaugeVec::new(
Opts::new(
"sync_extra_justifications",
"substrate_sync_extra_justifications",
"Number of extra justifications requests",
),
&["status"],