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
@@ -240,7 +240,7 @@ impl metrics::Metrics for Metrics {
let metrics = MetricsInner {
imported_candidates_total: prometheus::register(
prometheus::Counter::new(
"parachain_imported_candidates_total",
"polkadot_parachain_imported_candidates_total",
"Number of candidates imported by the approval voting subsystem",
)?,
registry,
@@ -248,7 +248,7 @@ impl metrics::Metrics for Metrics {
assignments_produced: prometheus::register(
prometheus::Histogram::with_opts(
prometheus::HistogramOpts::new(
"parachain_assignments_produced",
"polkadot_parachain_assignments_produced",
"Assignments and tranches produced by the approval voting subsystem",
).buckets(vec![0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 15.0, 25.0, 40.0, 70.0]),
)?,
@@ -257,7 +257,7 @@ impl metrics::Metrics for Metrics {
approvals_produced_total: prometheus::register(
prometheus::CounterVec::new(
prometheus::Opts::new(
"parachain_approvals_produced_total",
"polkadot_parachain_approvals_produced_total",
"Number of approvals produced by the approval voting subsystem",
),
&["status"]
@@ -266,14 +266,14 @@ impl metrics::Metrics for Metrics {
)?,
no_shows_total: prometheus::register(
prometheus::Counter::new(
"parachain_approvals_no_shows_total",
"polkadot_parachain_approvals_no_shows_total",
"Number of assignments which became no-shows in the approval voting subsystem",
)?,
registry,
)?,
wakeups_triggered_total: prometheus::register(
prometheus::Counter::new(
"parachain_approvals_wakeups_total",
"polkadot_parachain_approvals_wakeups_total",
"Number of times we woke up to process a candidate in the approval voting subsystem",
)?,
registry,
@@ -281,7 +281,7 @@ impl metrics::Metrics for Metrics {
candidate_approval_time_ticks: prometheus::register(
prometheus::Histogram::with_opts(
prometheus::HistogramOpts::new(
"parachain_approvals_candidate_approval_time_ticks",
"polkadot_parachain_approvals_candidate_approval_time_ticks",
"Number of ticks (500ms) to approve candidates.",
).buckets(vec![6.0, 12.0, 18.0, 24.0, 30.0, 36.0, 72.0, 100.0, 144.0]),
)?,
@@ -290,7 +290,7 @@ impl metrics::Metrics for Metrics {
block_approval_time_ticks: prometheus::register(
prometheus::Histogram::with_opts(
prometheus::HistogramOpts::new(
"parachain_approvals_blockapproval_time_ticks",
"polkadot_parachain_approvals_blockapproval_time_ticks",
"Number of ticks (500ms) to approve blocks.",
).buckets(vec![6.0, 12.0, 18.0, 24.0, 30.0, 36.0, 72.0, 100.0, 144.0]),
)?,
@@ -299,7 +299,7 @@ impl metrics::Metrics for Metrics {
time_db_transaction: prometheus::register(
prometheus::Histogram::with_opts(
prometheus::HistogramOpts::new(
"parachain_time_approval_db_transaction",
"polkadot_parachain_time_approval_db_transaction",
"Time spent writing an approval db transaction.",
)
)?,
@@ -308,7 +308,7 @@ impl metrics::Metrics for Metrics {
time_recover_and_approve: prometheus::register(
prometheus::Histogram::with_opts(
prometheus::HistogramOpts::new(
"parachain_time_recover_and_approve",
"polkadot_parachain_time_recover_and_approve",
"Time spent recovering and approving data in approval voting",
)
)?,
+8 -8
View File
@@ -93,56 +93,56 @@ impl metrics::Metrics for Metrics {
let metrics = MetricsInner {
received_availability_chunks_total: prometheus::register(
prometheus::Counter::new(
"parachain_received_availability_chunks_total",
"polkadot_parachain_received_availability_chunks_total",
"Number of availability chunks received.",
)?,
registry,
)?,
pruning: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_av_store_pruning",
"polkadot_parachain_av_store_pruning",
"Time spent within `av_store::prune_all`",
))?,
registry,
)?,
process_block_finalized: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_av_store_process_block_finalized",
"polkadot_parachain_av_store_process_block_finalized",
"Time spent within `av_store::process_block_finalized`",
))?,
registry,
)?,
block_activated: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_av_store_block_activated",
"polkadot_parachain_av_store_block_activated",
"Time spent within `av_store::process_block_activated`",
))?,
registry,
)?,
process_message: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_av_store_process_message",
"polkadot_parachain_av_store_process_message",
"Time spent within `av_store::process_message`",
))?,
registry,
)?,
store_available_data: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_av_store_store_available_data",
"polkadot_parachain_av_store_store_available_data",
"Time spent within `av_store::store_available_data`",
))?,
registry,
)?,
store_chunk: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_av_store_store_chunk",
"polkadot_parachain_av_store_store_chunk",
"Time spent within `av_store::store_chunk`",
))?,
registry,
)?,
get_chunk: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_av_store_get_chunk",
"polkadot_parachain_av_store_get_chunk",
"Time spent fetching requested chunks.`",
))?,
registry,
+5 -5
View File
@@ -1364,35 +1364,35 @@ impl metrics::Metrics for Metrics {
let metrics = MetricsInner {
signed_statements_total: prometheus::register(
prometheus::Counter::new(
"parachain_candidate_backing_signed_statements_total",
"polkadot_parachain_candidate_backing_signed_statements_total",
"Number of statements signed.",
)?,
registry,
)?,
candidates_seconded_total: prometheus::register(
prometheus::Counter::new(
"parachain_candidate_backing_candidates_seconded_total",
"polkadot_parachain_candidate_backing_candidates_seconded_total",
"Number of candidates seconded.",
)?,
registry,
)?,
process_second: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_candidate_backing_process_second",
"polkadot_parachain_candidate_backing_process_second",
"Time spent within `candidate_backing::process_second`",
))?,
registry,
)?,
process_statement: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_candidate_backing_process_statement",
"polkadot_parachain_candidate_backing_process_statement",
"Time spent within `candidate_backing::process_statement`",
))?,
registry,
)?,
get_backed_candidates: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_candidate_backing_get_backed_candidates",
"polkadot_parachain_candidate_backing_get_backed_candidates",
"Time spent within `candidate_backing::get_backed_candidates`",
))?,
registry,
@@ -210,14 +210,14 @@ impl metrics::Metrics for Metrics {
let metrics = MetricsInner {
bitfields_signed_total: prometheus::register(
prometheus::Counter::new(
"parachain_bitfields_signed_total",
"polkadot_parachain_bitfields_signed_total",
"Number of bitfields signed.",
)?,
registry,
)?,
run: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_bitfield_signing_run",
"polkadot_parachain_bitfield_signing_run",
"Time spent within `bitfield_signing::run`",
))?,
registry,
@@ -716,7 +716,7 @@ impl metrics::Metrics for Metrics {
validation_requests: prometheus::register(
prometheus::CounterVec::new(
prometheus::Opts::new(
"parachain_validation_requests_total",
"polkadot_parachain_validation_requests_total",
"Number of validation requests served.",
),
&["validity"],
@@ -725,21 +725,21 @@ impl metrics::Metrics for Metrics {
)?,
validate_from_chain_state: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_candidate_validation_validate_from_chain_state",
"polkadot_parachain_candidate_validation_validate_from_chain_state",
"Time spent within `candidate_validation::validate_from_chain_state`",
))?,
registry,
)?,
validate_from_exhaustive: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_candidate_validation_validate_from_exhaustive",
"polkadot_parachain_candidate_validation_validate_from_exhaustive",
"Time spent within `candidate_validation::validate_from_exhaustive`",
))?,
registry,
)?,
validate_candidate_exhaustive: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_candidate_validation_validate_candidate_exhaustive",
"polkadot_parachain_candidate_validation_validate_candidate_exhaustive",
"Time spent within `candidate_validation::validate_candidate_exhaustive`",
))?,
registry,
+7 -7
View File
@@ -229,7 +229,7 @@ impl metrics::Metrics for Metrics {
chain_api_requests: prometheus::register(
prometheus::CounterVec::new(
prometheus::Opts::new(
"parachain_chain_api_requests_total",
"polkadot_parachain_chain_api_requests_total",
"Number of Chain API requests served.",
),
&["success"],
@@ -238,42 +238,42 @@ impl metrics::Metrics for Metrics {
)?,
block_number: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_chain_api_block_number",
"polkadot_parachain_chain_api_block_number",
"Time spent within `chain_api::block_number`",
))?,
registry,
)?,
block_header: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_chain_api_block_headers",
"polkadot_parachain_chain_api_block_headers",
"Time spent within `chain_api::block_headers`",
))?,
registry,
)?,
block_weight: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_chain_api_block_weight",
"polkadot_parachain_chain_api_block_weight",
"Time spent within `chain_api::block_weight`",
))?,
registry,
)?,
finalized_block_hash: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_chain_api_finalized_block_hash",
"polkadot_parachain_chain_api_finalized_block_hash",
"Time spent within `chain_api::finalized_block_hash`",
))?,
registry,
)?,
finalized_block_number: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_chain_api_finalized_block_number",
"polkadot_parachain_chain_api_finalized_block_number",
"Time spent within `chain_api::finalized_block_number`",
))?,
registry,
)?,
ancestors: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_chain_api_ancestors",
"polkadot_parachain_chain_api_ancestors",
"Time spent within `chain_api::ancestors`",
))?,
registry,
@@ -82,7 +82,7 @@ impl metrics::Metrics for Metrics {
let metrics = MetricsInner {
open: prometheus::register(
prometheus::Counter::with_opts(prometheus::Opts::new(
"parachain_candidate_disputes_total",
"polkadot_parachain_candidate_disputes_total",
"Total number of raised disputes.",
))?,
registry,
@@ -90,7 +90,7 @@ impl metrics::Metrics for Metrics {
concluded: prometheus::register(
prometheus::CounterVec::new(
prometheus::Opts::new(
"parachain_candidate_dispute_concluded",
"polkadot_parachain_candidate_dispute_concluded",
"Concluded dispute votes, sorted by candidate is `valid` and `invalid`.",
),
&["validity"],
@@ -100,7 +100,7 @@ impl metrics::Metrics for Metrics {
votes: prometheus::register(
prometheus::CounterVec::new(
prometheus::Opts::new(
"parachain_candidate_dispute_votes",
"polkadot_parachain_candidate_dispute_votes",
"Accumulated dispute votes, sorted by candidate is `valid` and `invalid`.",
),
&["validity"],
@@ -110,7 +110,7 @@ impl metrics::Metrics for Metrics {
queued_participations: prometheus::register(
prometheus::CounterVec::new(
prometheus::Opts::new(
"parachain_dispute_participations",
"polkadot_parachain_dispute_participations",
"Total number of queued participations, grouped by priority and best-effort. (Not every queueing will necessarily lead to an actual participation because of duplicates.)",
),
&["priority"],
@@ -91,7 +91,7 @@ impl metrics::Metrics for Metrics {
inherent_data_requests: prometheus::register(
prometheus::CounterVec::new(
prometheus::Opts::new(
"parachain_inherent_data_requests_total",
"polkadot_parachain_inherent_data_requests_total",
"Number of InherentData requests served by provisioner.",
),
&["success"],
@@ -100,14 +100,14 @@ impl metrics::Metrics for Metrics {
)?,
request_inherent_data: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_provisioner_request_inherent_data_time",
"polkadot_parachain_provisioner_request_inherent_data_time",
"Time spent within `provisioner::request_inherent_data`",
))?,
registry,
)?,
provisionable_data: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_provisioner_provisionable_data_time",
"polkadot_parachain_provisioner_provisionable_data_time",
"Time spent within `provisioner::provisionable_data`",
))?,
registry,
@@ -115,7 +115,7 @@ impl metrics::Metrics for Metrics {
inherent_data_dispute_statements: prometheus::register(
prometheus::CounterVec::new(
prometheus::Opts::new(
"parachain_inherent_data_dispute_statements",
"polkadot_parachain_inherent_data_dispute_statements",
"Number of dispute statements passed to `create_inherent()`.",
),
&["validity"],
@@ -124,7 +124,7 @@ impl metrics::Metrics for Metrics {
)?,
inherent_data_dispute_statement_sets: prometheus::register(
prometheus::Counter::new(
"parachain_inherent_data_dispute_statement_sets",
"polkadot_parachain_inherent_data_dispute_statement_sets",
"Number of dispute statements sets passed to `create_inherent()`.",
)?,
registry,
+9 -9
View File
@@ -93,7 +93,7 @@ impl metrics::Metrics for Metrics {
worker_spawning: prometheus::register(
prometheus::CounterVec::new(
prometheus::Opts::new(
"pvf_worker_spawning",
"polkadot_pvf_worker_spawning",
"The total number of workers began to spawn",
),
&["flavor"],
@@ -103,7 +103,7 @@ impl metrics::Metrics for Metrics {
worker_spawned: prometheus::register(
prometheus::CounterVec::new(
prometheus::Opts::new(
"pvf_worker_spawned",
"polkadot_pvf_worker_spawned",
"The total number of workers spawned successfully",
),
&["flavor"],
@@ -113,7 +113,7 @@ impl metrics::Metrics for Metrics {
worker_retired: prometheus::register(
prometheus::CounterVec::new(
prometheus::Opts::new(
"pvf_worker_retired",
"polkadot_pvf_worker_retired",
"The total number of workers retired, either killed by the host or died on duty",
),
&["flavor"],
@@ -122,28 +122,28 @@ impl metrics::Metrics for Metrics {
)?,
prepare_enqueued: prometheus::register(
prometheus::Counter::new(
"pvf_prepare_enqueued",
"polkadot_pvf_prepare_enqueued",
"The total number of jobs enqueued into the preparation pipeline"
)?,
registry,
)?,
prepare_concluded: prometheus::register(
prometheus::Counter::new(
"pvf_prepare_concluded",
"polkadot_pvf_prepare_concluded",
"The total number of jobs concluded in the preparation pipeline"
)?,
registry,
)?,
execute_enqueued: prometheus::register(
prometheus::Counter::new(
"pvf_execute_enqueued",
"polkadot_pvf_execute_enqueued",
"The total number of jobs enqueued into the execution pipeline"
)?,
registry,
)?,
execute_finished: prometheus::register(
prometheus::Counter::new(
"pvf_execute_finished",
"polkadot_pvf_execute_finished",
"The total number of jobs done in the execution pipeline"
)?,
registry,
@@ -151,7 +151,7 @@ impl metrics::Metrics for Metrics {
preparation_time: prometheus::register(
prometheus::Histogram::with_opts(
prometheus::HistogramOpts::new(
"pvf_preparation_time",
"polkadot_pvf_preparation_time",
"Time spent in preparing PVF artifacts in seconds",
)
.buckets(vec![
@@ -173,7 +173,7 @@ impl metrics::Metrics for Metrics {
execution_time: prometheus::register(
prometheus::Histogram::with_opts(
prometheus::HistogramOpts::new(
"pvf_execution_time",
"polkadot_pvf_execution_time",
"Time spent in executing PVFs",
)
)?,
+2 -2
View File
@@ -423,7 +423,7 @@ impl metrics::Metrics for Metrics {
chain_api_requests: prometheus::register(
prometheus::CounterVec::new(
prometheus::Opts::new(
"parachain_runtime_api_requests_total",
"polkadot_parachain_runtime_api_requests_total",
"Number of Runtime API requests served.",
),
&["success"],
@@ -432,7 +432,7 @@ impl metrics::Metrics for Metrics {
)?,
make_runtime_api_request: prometheus::register(
prometheus::Histogram::with_opts(prometheus::HistogramOpts::new(
"parachain_runtime_api_make_runtime_api_request",
"polkadot_parachain_runtime_api_make_runtime_api_request",
"Time spent within `runtime_api::make_runtime_api_request`",
))?,
registry,