Cleanup metrics (#4230)

This commit is contained in:
Jack May
2019-05-10 08:33:58 -07:00
committed by GitHub
parent 9881820444
commit f567877d1d
33 changed files with 547 additions and 560 deletions

View File

@@ -16,7 +16,7 @@ use hashbrown::HashMap;
#[cfg(not(feature = "kvstore"))]
use rocksdb;
use solana_metrics::counter::Counter;
use solana_metrics::{datapoint, inc_new_counter_info};
use solana_sdk::genesis_block::GenesisBlock;
use solana_sdk::hash::Hash;
@@ -1006,16 +1006,16 @@ fn should_insert_blob(
// for the slot
let last_index = slot.last_index;
if blob_index >= last_index {
solana_metrics::submit(
solana_metrics::influxdb::Point::new("blocktree_error")
.add_field(
"error",
solana_metrics::influxdb::Value::String(format!(
"Received last blob with index {} >= slot.last_index {}",
blob_index, last_index
)),
)
.to_owned(),
datapoint!(
"blocktree_error",
(
"error",
format!(
"Received last blob with index {} >= slot.last_index {}",
blob_index, last_index
),
String
)
);
return false;
}
@@ -1023,16 +1023,16 @@ fn should_insert_blob(
// Check that we do not receive a blob with "last_index" true, but index
// less than our current received
if blob.is_last_in_slot() && blob_index < slot.received {
solana_metrics::submit(
solana_metrics::influxdb::Point::new("blocktree_error")
.add_field(
"error",
solana_metrics::influxdb::Value::String(format!(
"Received last blob with index {} < slot.received {}",
blob_index, slot.received
)),
)
.to_owned(),
datapoint!(
"blocktree_error",
(
"error",
format!(
"Received last blob with index {} < slot.received {}",
blob_index, slot.received
),
String
)
);
return false;
}