Skip to content

chore: CON-1695 Report more error metrics during IDKG payload building#9885

Merged
eichhorl merged 3 commits intomasterfrom
eichhorl/idkg-error-metrics
Apr 16, 2026
Merged

chore: CON-1695 Report more error metrics during IDKG payload building#9885
eichhorl merged 3 commits intomasterfrom
eichhorl/idkg-error-metrics

Conversation

@eichhorl
Copy link
Copy Markdown
Contributor

@eichhorl eichhorl commented Apr 15, 2026

Previously, there were some error cases in the IDKG payload builder where we only created a log message. With this PR we additionally increment the idkg_payload_errors metric, which is connected to a slack alert.

Additionally we remove some debug! level logs (as they won't show up anyway), and upgrade some other debug! level logs to be warn!.

@github-actions github-actions bot added the chore label Apr 15, 2026
@eichhorl eichhorl requested a review from Copilot April 15, 2026 08:50
@eichhorl eichhorl marked this pull request as ready for review April 15, 2026 08:54
@eichhorl eichhorl requested a review from a team as a code owner April 15, 2026 08:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR increases observability for IDKG payload building by incrementing the idkg_payload_errors metric in additional error paths and adjusting log levels to improve signal.

Changes:

  • Add an IDkgPayloadMetricsOptionExt helper to increment payload error counters when metrics are optionally available.
  • Wire optional payload metrics through payload builder helpers and reshare/pre-signature flows, incrementing idkg_payload_errors in more failure cases.
  • Remove/upgrade several debug! logs to warn! (often with rate limiting).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
rs/consensus/idkg/src/utils.rs Use the new optional-metrics helper to always increment the payload error metric when chain cache building fails.
rs/consensus/idkg/src/signer.rs Promote transient signature-share validation logs from debug! to rate-limited warn!.
rs/consensus/idkg/src/pre_signer.rs Promote transient dealing validation / signing logs from debug! to rate-limited warn!.
rs/consensus/idkg/src/complaints.rs Promote transient complaint/opening validation logs from debug! to rate-limited warn!.
rs/consensus/idkg/src/payload_verifier.rs Update tests/call sites for new optional metrics parameter plumbed through payload building helpers.
rs/consensus/idkg/src/payload_builder/resharing.rs Add optional metrics + new error increments for reshare request initiation/completion paths.
rs/consensus/idkg/src/payload_builder/pre_signatures.rs Add optional metrics + new error increments for missing key transcript and receiver-set mismatch paths; remove debug logs.
rs/consensus/idkg/src/payload_builder.rs Thread optional payload metrics through helper functions and into resharing/pre-signature update calls.
rs/consensus/idkg/src/metrics.rs Introduce IDkgPayloadMetricsOptionExt to safely increment payload error metrics from Option<&IDkgPayloadMetrics>.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rs/consensus/idkg/src/payload_builder/resharing.rs
Comment thread rs/consensus/idkg/src/payload_builder/resharing.rs
@eichhorl eichhorl added this pull request to the merge queue Apr 16, 2026
Merged via the queue into master with commit 2d1bd5c Apr 16, 2026
37 checks passed
@eichhorl eichhorl deleted the eichhorl/idkg-error-metrics branch April 16, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants