feat(feed): trace individual consensus votes for observability#3134
Closed
feat(feed): trace individual consensus votes for observability#3134
Conversation
The feed actor now emits handle_activity spans for individual Notarize/Finalize/Nullify votes (not just certificates). This enables valscope's vote flow panel to show per-validator vote timing with from_participant attribution. Co-Authored-By: YK <46377366+yongkangc@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019cef62-f67c-71ab-a6d5-f86d1f6b43e1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Emit
handle_activityspans for individual Notarize/Finalize/Nullify votes so valscope can show per-validator vote flow timing.Motivation
Valscope #127 added vote flow visibility, but joshie pointed out that
from_participantis alwaysNonebecause the feed actor only traced certificate activities (Notarization/Finalization), not individual votes. Certificates are aggregated quorum proofs without individual sender attribution.Individual votes carry an
attestation.signer: Participant(N)which identifies the voting validator — exactly what we need for vote flow observability.Changes
crates/commonware-node/src/feed/actor.rs: emit aninfo_span!("handle_activity", activity = ?activity)for individual vote activities before dropping them (the feed actor still only processes certificates for block resolution)How it works
The simplex engine's batcher reports every peer vote (
Activity::Notarize,Activity::Finalize,Activity::Nullify) to the feed actor. Previously these were silently dropped. Now they emit a tracing span with the samehandle_activityname andactivityattribute, making them discoverable by valscope's TraceQL query.The debug output includes
Participant(N)which valscope's existing regex (Participant\\(\\d+\\)) already parses.Testing
cargo check -p tempo-commonware-nodepassesCo-Authored-By: YK 46377366+yongkangc@users.noreply.github.com
Prompted by: yk