Remove ability to submit metrics with no fields (#35133)
This commit is contained in:
parent
d268139a0e
commit
2a9ed3ee92
|
@ -158,18 +158,10 @@ macro_rules! create_datapoint {
|
|||
point
|
||||
}
|
||||
};
|
||||
(@point $name:expr $(,)?) => {
|
||||
$crate::datapoint::DataPoint::new(&$name)
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! datapoint {
|
||||
($level:expr, $name:expr $(,)?) => {
|
||||
if log::log_enabled!($level) {
|
||||
$crate::submit($crate::create_datapoint!(@point $name), $level);
|
||||
}
|
||||
};
|
||||
($level:expr, $name:expr, $($fields:tt)+) => {
|
||||
if log::log_enabled!($level) {
|
||||
$crate::submit($crate::create_datapoint!(@point $name, $($fields)+), $level);
|
||||
|
@ -178,9 +170,6 @@ macro_rules! datapoint {
|
|||
}
|
||||
#[macro_export]
|
||||
macro_rules! datapoint_error {
|
||||
($name:expr $(,)?) => {
|
||||
$crate::datapoint!(log::Level::Error, $name);
|
||||
};
|
||||
($name:expr, $($fields:tt)+) => {
|
||||
$crate::datapoint!(log::Level::Error, $name, $($fields)+);
|
||||
};
|
||||
|
@ -188,9 +177,6 @@ macro_rules! datapoint_error {
|
|||
|
||||
#[macro_export]
|
||||
macro_rules! datapoint_warn {
|
||||
($name:expr $(,)?) => {
|
||||
$crate::datapoint!(log::Level::Warn, $name);
|
||||
};
|
||||
($name:expr, $($fields:tt)+) => {
|
||||
$crate::datapoint!(log::Level::Warn, $name, $($fields)+);
|
||||
};
|
||||
|
@ -198,9 +184,6 @@ macro_rules! datapoint_warn {
|
|||
|
||||
#[macro_export]
|
||||
macro_rules! datapoint_info {
|
||||
($name:expr) => {
|
||||
$crate::datapoint!(log::Level::Info, $name);
|
||||
};
|
||||
($name:expr, $($fields:tt)+) => {
|
||||
$crate::datapoint!(log::Level::Info, $name, $($fields)+);
|
||||
};
|
||||
|
@ -208,9 +191,6 @@ macro_rules! datapoint_info {
|
|||
|
||||
#[macro_export]
|
||||
macro_rules! datapoint_debug {
|
||||
($name:expr) => {
|
||||
$crate::datapoint!(log::Level::Debug, $name);
|
||||
};
|
||||
($name:expr, $($fields:tt)+) => {
|
||||
$crate::datapoint!(log::Level::Debug, $name, $($fields)+);
|
||||
};
|
||||
|
@ -218,9 +198,6 @@ macro_rules! datapoint_debug {
|
|||
|
||||
#[macro_export]
|
||||
macro_rules! datapoint_trace {
|
||||
($name:expr) => {
|
||||
$crate::datapoint!(log::Level::Trace, $name);
|
||||
};
|
||||
($name:expr, $($fields:tt)+) => {
|
||||
$crate::datapoint!(log::Level::Trace, $name, $($fields)+);
|
||||
};
|
||||
|
|
|
@ -7,7 +7,6 @@ use {
|
|||
tpu_connection::TpuConnection,
|
||||
},
|
||||
solana_measure::measure::Measure,
|
||||
solana_metrics::datapoint_warn,
|
||||
solana_runtime::{bank::Bank, bank_forks::BankForks},
|
||||
solana_sdk::{
|
||||
clock::Slot, hash::Hash, nonce_account, pubkey::Pubkey, saturating_add_assign,
|
||||
|
@ -481,7 +480,6 @@ impl SendTransactionService {
|
|||
let entry = retry_transactions.entry(signature);
|
||||
if let Entry::Vacant(_) = entry {
|
||||
if retry_len >= config.retry_pool_max_size {
|
||||
datapoint_warn!("send_transaction_service-queue-overflow");
|
||||
break;
|
||||
} else {
|
||||
transaction_info.last_sent_time = Some(last_sent_time);
|
||||
|
|
Loading…
Reference in New Issue