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 -11
View File
@@ -115,21 +115,21 @@ impl MetricsTrait for Metrics {
let metrics = MetricsInner {
activated_heads_total: prometheus::register(
prometheus::Counter::new(
"parachain_activated_heads_total",
"polkadot_parachain_activated_heads_total",
"Number of activated heads.",
)?,
registry,
)?,
deactivated_heads_total: prometheus::register(
prometheus::Counter::new(
"parachain_deactivated_heads_total",
"polkadot_parachain_deactivated_heads_total",
"Number of deactivated heads.",
)?,
registry,
)?,
messages_relayed_total: prometheus::register(
prometheus::Counter::new(
"parachain_messages_relayed_total",
"polkadot_parachain_messages_relayed_total",
"Number of messages relayed by Overseer.",
)?,
registry,
@@ -137,7 +137,7 @@ impl MetricsTrait for Metrics {
to_subsystem_bounded_sent: prometheus::register(
prometheus::GaugeVec::<prometheus::U64>::new(
prometheus::Opts::new(
"parachain_subsystem_bounded_sent",
"polkadot_parachain_subsystem_bounded_sent",
"Number of elements sent to subsystems' bounded queues",
),
&["subsystem_name"],
@@ -147,7 +147,7 @@ impl MetricsTrait for Metrics {
to_subsystem_bounded_received: prometheus::register(
prometheus::GaugeVec::<prometheus::U64>::new(
prometheus::Opts::new(
"parachain_subsystem_bounded_received",
"polkadot_parachain_subsystem_bounded_received",
"Number of elements received by subsystems' bounded queues",
),
&["subsystem_name"],
@@ -157,7 +157,7 @@ impl MetricsTrait for Metrics {
to_subsystem_unbounded_sent: prometheus::register(
prometheus::GaugeVec::<prometheus::U64>::new(
prometheus::Opts::new(
"parachain_subsystem_unbounded_sent",
"polkadot_parachain_subsystem_unbounded_sent",
"Number of elements sent to subsystems' unbounded queues",
),
&["subsystem_name"],
@@ -167,7 +167,7 @@ impl MetricsTrait for Metrics {
to_subsystem_unbounded_received: prometheus::register(
prometheus::GaugeVec::<prometheus::U64>::new(
prometheus::Opts::new(
"parachain_subsystem_unbounded_received",
"polkadot_parachain_subsystem_unbounded_received",
"Number of elements received by subsystems' unbounded queues",
),
&["subsystem_name"],
@@ -177,7 +177,7 @@ impl MetricsTrait for Metrics {
signals_sent: prometheus::register(
prometheus::GaugeVec::<prometheus::U64>::new(
prometheus::Opts::new(
"parachain_overseer_signals_sent",
"polkadot_parachain_overseer_signals_sent",
"Number of signals sent by overseer to subsystems",
),
&["subsystem_name"],
@@ -187,7 +187,7 @@ impl MetricsTrait for Metrics {
signals_received: prometheus::register(
prometheus::GaugeVec::<prometheus::U64>::new(
prometheus::Opts::new(
"parachain_overseer_signals_received",
"polkadot_parachain_overseer_signals_received",
"Number of signals received by subsystems from overseer",
),
&["subsystem_name"],
@@ -197,14 +197,14 @@ impl MetricsTrait for Metrics {
memory_stats_allocated: prometheus::register(
prometheus::Gauge::<prometheus::U64>::new(
"memory_allocated",
"polkadot_memory_allocated",
"Total bytes allocated by the node",
)?,
registry,
)?,
memory_stats_resident: prometheus::register(
prometheus::Gauge::<prometheus::U64>::new(
"memory_resident",
"polkadot_memory_resident",
"Bytes allocated by the node, and held in RAM",
)?,
registry,
+3 -3
View File
@@ -280,9 +280,9 @@ fn extract_metrics(registry: &prometheus::Registry) -> HashMap<&'static str, u64
.get_value() as u64
};
let activated = extract("parachain_activated_heads_total");
let deactivated = extract("parachain_deactivated_heads_total");
let relayed = extract("parachain_messages_relayed_total");
let activated = extract("polkadot_parachain_activated_heads_total");
let deactivated = extract("polkadot_parachain_deactivated_heads_total");
let relayed = extract("polkadot_parachain_messages_relayed_total");
let mut result = HashMap::new();
result.insert("activated", activated);
result.insert("deactivated", deactivated);