Skip to content

Commit

Permalink
fix: near_ prefix to flat storage metrics (#10763)
Browse files Browse the repository at this point in the history
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 <the.aleksandr.logunov@gmail.com>
  • Loading branch information
2 people authored and marcelo-gonzalez committed Mar 12, 2024
1 parent fa18c12 commit ed7a80f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions core/store/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,87 +391,87 @@ pub mod flat_state_metrics {

pub static FLAT_STORAGE_CREATION_STATUS: Lazy<IntGaugeVec> = 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"],
)
.unwrap()
});
pub static FLAT_STORAGE_CREATION_REMAINING_STATE_PARTS: Lazy<IntGaugeVec> = 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"],
)
.unwrap()
});
pub static FLAT_STORAGE_CREATION_FETCHED_STATE_PARTS: Lazy<IntCounterVec> = 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"],
)
.unwrap()
});
pub static FLAT_STORAGE_CREATION_FETCHED_STATE_ITEMS: Lazy<IntCounterVec> = 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"],
)
.unwrap()
});
pub static FLAT_STORAGE_CREATION_THREADS_USED: Lazy<IntGaugeVec> = 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"],
)
.unwrap()
});
pub static FLAT_STORAGE_HEAD_HEIGHT: Lazy<IntGaugeVec> = Lazy::new(|| {
try_create_int_gauge_vec(
"flat_storage_head_height",
"near_flat_storage_head_height",
"Height of flat storage head",
&["shard_uid"],
)
.unwrap()
});
pub static FLAT_STORAGE_CACHED_DELTAS: Lazy<IntGaugeVec> = 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"],
)
.unwrap()
});
pub static FLAT_STORAGE_CACHED_CHANGES_NUM_ITEMS: Lazy<IntGaugeVec> = 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"],
)
.unwrap()
});
pub static FLAT_STORAGE_CACHED_CHANGES_SIZE: Lazy<IntGaugeVec> = 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"],
)
.unwrap()
});
pub static FLAT_STORAGE_DISTANCE_TO_HEAD: Lazy<IntGaugeVec> = 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"],
)
.unwrap()
});
pub static FLAT_STORAGE_HOPS_TO_HEAD: Lazy<IntGaugeVec> = 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"],
)
Expand Down

0 comments on commit ed7a80f

Please sign in to comment.