Companion PR for removing Prometheus metrics prefix (#3623)

* Companion PR for removing Prometheus metrics prefix

* Was missing some metrics

* Fix missing renames

* Fix test

* Fixes

* Update test

* Update Substrate

* Second time

* remove prefix from intergration test for zombienet

* update zombienet image

* Update Substrate

Co-authored-by: Bastian Köcher <info@kchr.de>
Co-authored-by: Javier Viola <pepoviola@gmail.com>
This commit is contained in:
Pierre Krieger
2021-12-10 15:24:54 +01:00
committed by GitHub
parent e910a3f80f
commit 77d70ac0d3
26 changed files with 283 additions and 294 deletions
-11
View File
@@ -272,15 +272,6 @@ impl IdentifyVariant for Box<dyn ChainSpec> {
}
}
// If we're using prometheus, use a registry with a prefix of `polkadot`.
fn set_prometheus_registry(config: &mut Configuration) -> Result<(), Error> {
if let Some(PrometheusConfig { registry, .. }) = config.prometheus_config.as_mut() {
*registry = Registry::new_custom(Some("polkadot".into()), None)?;
}
Ok(())
}
/// Initialize the `Jeager` collector. The destination must listen
/// on the given address and port for `UDP` packets.
#[cfg(any(test, feature = "full-node"))]
@@ -344,8 +335,6 @@ where
RuntimeApiCollection<StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>,
ExecutorDispatch: NativeExecutionDispatch + 'static,
{
set_prometheus_registry(config)?;
let telemetry = config
.telemetry_endpoints
.clone()
@@ -73,7 +73,7 @@ impl metrics::Metrics for Metrics {
approval_checking_finality_lag: prometheus::register(
prometheus::Gauge::with_opts(
prometheus::Opts::new(
"parachain_approval_checking_finality_lag",
"polkadot_parachain_approval_checking_finality_lag",
"How far behind the head of the chain the Approval Checking protocol wants to vote",
)
)?,
@@ -82,7 +82,7 @@ impl metrics::Metrics for Metrics {
disputes_finality_lag: prometheus::register(
prometheus::Gauge::with_opts(
prometheus::Opts::new(
"parachain_disputes_finality_lag",
"polkadot_parachain_disputes_finality_lag",
"How far behind the head of the chain the Disputes protocol wants to vote",
)
)?,