From ed7a80f6349d7d8802c22f455b5741a890457af9 Mon Sep 17 00:00:00 2001 From: Aleksandr Logunov Date: Tue, 12 Mar 2024 19:02:12 +0400 Subject: [PATCH] fix: near_ prefix to flat storage metrics (#10763) As these metrics were recently changed and continuity of data is broken, we can add "near_" prefix to prometheus metrics which was missing all the time. @wacban I wonder how painful is it to add this to 1.38 for convenience? Co-authored-by: Longarithm --- core/store/src/metrics.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/core/store/src/metrics.rs b/core/store/src/metrics.rs index 7441e9460ac..1a51bed1ba7 100644 --- a/core/store/src/metrics.rs +++ b/core/store/src/metrics.rs @@ -391,7 +391,7 @@ pub mod flat_state_metrics { pub static FLAT_STORAGE_CREATION_STATUS: Lazy = Lazy::new(|| { try_create_int_gauge_vec( - "flat_storage_creation_status", + "near_flat_storage_creation_status", "Integer representing status of flat storage creation", &["shard_uid"], ) @@ -399,7 +399,7 @@ pub mod flat_state_metrics { }); pub static FLAT_STORAGE_CREATION_REMAINING_STATE_PARTS: Lazy = Lazy::new(|| { try_create_int_gauge_vec( - "flat_storage_creation_remaining_state_parts", + "near_flat_storage_creation_remaining_state_parts", "Number of remaining state parts to fetch to fill flat storage in bytes", &["shard_uid"], ) @@ -407,7 +407,7 @@ pub mod flat_state_metrics { }); pub static FLAT_STORAGE_CREATION_FETCHED_STATE_PARTS: Lazy = Lazy::new(|| { try_create_int_counter_vec( - "flat_storage_creation_fetched_state_parts", + "near_flat_storage_creation_fetched_state_parts", "Number of fetched state parts to fill flat storage in bytes", &["shard_uid"], ) @@ -415,7 +415,7 @@ pub mod flat_state_metrics { }); pub static FLAT_STORAGE_CREATION_FETCHED_STATE_ITEMS: Lazy = Lazy::new(|| { try_create_int_counter_vec( - "flat_storage_creation_fetched_state_items", + "near_flat_storage_creation_fetched_state_items", "Number of fetched items to fill flat storage", &["shard_uid"], ) @@ -423,7 +423,7 @@ pub mod flat_state_metrics { }); pub static FLAT_STORAGE_CREATION_THREADS_USED: Lazy = Lazy::new(|| { try_create_int_gauge_vec( - "flat_storage_creation_threads_used", + "near_flat_storage_creation_threads_used", "Number of currently used threads to fetch state", &["shard_uid"], ) @@ -431,7 +431,7 @@ pub mod flat_state_metrics { }); pub static FLAT_STORAGE_HEAD_HEIGHT: Lazy = Lazy::new(|| { try_create_int_gauge_vec( - "flat_storage_head_height", + "near_flat_storage_head_height", "Height of flat storage head", &["shard_uid"], ) @@ -439,7 +439,7 @@ pub mod flat_state_metrics { }); pub static FLAT_STORAGE_CACHED_DELTAS: Lazy = Lazy::new(|| { try_create_int_gauge_vec( - "flat_storage_cached_deltas", + "near_flat_storage_cached_deltas", "Number of cached deltas in flat storage", &["shard_uid"], ) @@ -447,7 +447,7 @@ pub mod flat_state_metrics { }); pub static FLAT_STORAGE_CACHED_CHANGES_NUM_ITEMS: Lazy = Lazy::new(|| { try_create_int_gauge_vec( - "flat_storage_cached_changes_num_items", + "near_flat_storage_cached_changes_num_items", "Number of items in all cached changes in flat storage", &["shard_uid"], ) @@ -455,7 +455,7 @@ pub mod flat_state_metrics { }); pub static FLAT_STORAGE_CACHED_CHANGES_SIZE: Lazy = Lazy::new(|| { try_create_int_gauge_vec( - "flat_storage_cached_changes_size", + "near_flat_storage_cached_changes_size", "Total size of cached changes in flat storage", &["shard_uid"], ) @@ -463,7 +463,7 @@ pub mod flat_state_metrics { }); pub static FLAT_STORAGE_DISTANCE_TO_HEAD: Lazy = Lazy::new(|| { try_create_int_gauge_vec( - "flat_storage_distance_to_head", + "near_flat_storage_distance_to_head", "Height distance between processed block and flat storage head", &["shard_uid"], ) @@ -471,7 +471,7 @@ pub mod flat_state_metrics { }); pub static FLAT_STORAGE_HOPS_TO_HEAD: Lazy = Lazy::new(|| { try_create_int_gauge_vec( - "flat_storage_hops_to_head", + "near_flat_storage_hops_to_head", "Number of blocks visited to flat storage head", &["shard_uid"], )