Skip to content

Commit

Permalink
Quieten gossip republish logs (#5235)
Browse files Browse the repository at this point in the history
* Quieten gossip republish logs
  • Loading branch information
michaelsproul authored Feb 15, 2024
1 parent 256d904 commit 7c23625
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions beacon_node/lighthouse_network/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1226,22 +1226,39 @@ impl<AppReqId: ReqId, TSpec: EthSpec> Network<AppReqId, TSpec> {
.publish(Topic::from(topic.clone()), data)
{
Ok(_) => {
warn!(self.log, "Gossip message published on retry"; "topic" => topic_str);
if let Some(v) = metrics::get_int_counter(
debug!(
self.log,
"Gossip message published on retry";
"topic" => topic_str
);
metrics::inc_counter_vec(
&metrics::GOSSIP_LATE_PUBLISH_PER_TOPIC_KIND,
&[topic_str],
) {
v.inc()
};
);
}
Err(PublishError::Duplicate) => {
debug!(
self.log,
"Gossip message publish ignored on retry";
"reason" => "duplicate",
"topic" => topic_str
);
metrics::inc_counter_vec(
&metrics::GOSSIP_FAILED_LATE_PUBLISH_PER_TOPIC_KIND,
&[topic_str],
);
}
Err(e) => {
warn!(self.log, "Gossip message publish failed on retry"; "topic" => topic_str, "error" => %e);
if let Some(v) = metrics::get_int_counter(
warn!(
self.log,
"Gossip message publish failed on retry";
"topic" => topic_str,
"error" => %e
);
metrics::inc_counter_vec(
&metrics::GOSSIP_FAILED_LATE_PUBLISH_PER_TOPIC_KIND,
&[topic_str],
) {
v.inc()
};
);
}
}
}
Expand Down

0 comments on commit 7c23625

Please sign in to comment.