Skip to content

Commit

Permalink
[Mempool] reduce mempool log noise (#9767)
Browse files Browse the repository at this point in the history
### Description

Reduce the noise added by #9309. Make expected "errors" trace, and sample regardless.
  • Loading branch information
bchocho authored Aug 25, 2023
1 parent b60a1ee commit 091469b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mempool/src/shared_mempool/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ impl<NetworkClient: NetworkClientInterface<MempoolSyncMsg>> MempoolNetworkInterf

// Log all the metrics
let latency = start_time.elapsed();
debug!(
trace!(
LogSchema::event_log(LogEntry::BroadcastTransaction, LogEvent::Success)
.peer(&peer)
.batch_id(&batch_id)
Expand Down
11 changes: 10 additions & 1 deletion mempool/src/shared_mempool/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,17 @@ pub(crate) async fn execute_broadcast<NetworkClient, TransactionValidator>(
)
.peer(&peer)
.error(&error)),
BroadcastError::NoTransactions(_) | BroadcastError::PeerNotPrioritized(_, _) => {
sample!(
SampleRate::Duration(Duration::from_secs(60)),
trace!("{:?}", err)
);
},
_ => {
debug!("{:?}", err)
sample!(
SampleRate::Duration(Duration::from_secs(60)),
debug!("{:?}", err)
);
},
}
}
Expand Down

0 comments on commit 091469b

Please sign in to comment.