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
+12 -6
View File
@@ -40,28 +40,34 @@ impl Metrics {
pub(crate) fn register(registry: &Registry) -> Result<Self, PrometheusError> {
Ok(Self {
beefy_validator_set_id: register(
Gauge::new("beefy_validator_set_id", "Current BEEFY active validator set id.")?,
Gauge::new(
"substrate_beefy_validator_set_id",
"Current BEEFY active validator set id.",
)?,
registry,
)?,
beefy_votes_sent: register(
Counter::new("beefy_votes_sent", "Number of votes sent by this node")?,
Counter::new("substrate_beefy_votes_sent", "Number of votes sent by this node")?,
registry,
)?,
beefy_round_concluded: register(
Gauge::new("beefy_round_concluded", "Voting round, that has been concluded")?,
Gauge::new(
"substrate_beefy_round_concluded",
"Voting round, that has been concluded",
)?,
registry,
)?,
beefy_best_block: register(
Gauge::new("beefy_best_block", "Best block finalized by BEEFY")?,
Gauge::new("substrate_beefy_best_block", "Best block finalized by BEEFY")?,
registry,
)?,
beefy_should_vote_on: register(
Gauge::new("beefy_should_vote_on", "Next block, BEEFY should vote on")?,
Gauge::new("substrate_beefy_should_vote_on", "Next block, BEEFY should vote on")?,
registry,
)?,
beefy_skipped_sessions: register(
Counter::new(
"beefy_skipped_sessions",
"substrate_beefy_skipped_sessions",
"Number of sessions without a signed commitment",
)?,
registry,