Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add metrics for failed deliveries #11456

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions crates/engine/tree/src/tree/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ pub(crate) struct EngineMetrics {
pub(crate) new_payload_messages: Counter,
/// Histogram of persistence operation durations (in seconds)
pub(crate) persistence_duration: Histogram,
/// Tracks the how often we failed to deliver a newPayload response.
///
/// This effectively tracks how often the message sender dropped the channel and indicates a CL
/// request timeout (e.g. it took more than 8s to send the response and the CL terminated the
/// request which resulted in a closed channel).
pub(crate) failed_new_payload_response_deliveries: Counter,
/// Tracks the how often we failed to deliver a forkchoice update response.
pub(crate) failed_forkchoice_updated_response_deliveries: Counter,
// TODO add latency metrics
}

Expand Down
8 changes: 8 additions & 0 deletions crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,10 @@ where
if let Err(err) =
tx.send(output.map(|o| o.outcome).map_err(Into::into))
{
self.metrics
.engine
.failed_forkchoice_updated_response_deliveries
.increment(1);
error!(target: "engine::tree", "Failed to send event: {err:?}");
}
}
Expand All @@ -1230,6 +1234,10 @@ where
)
})) {
error!(target: "engine::tree", "Failed to send event: {err:?}");
self.metrics
.engine
.failed_new_payload_response_deliveries
.increment(1);
}
}
BeaconEngineMessage::TransitionConfigurationExchanged => {
Expand Down
Loading