Skip to content

Conversation

@jimmygchen
Copy link
Member

Issue Addressed

I was looking into some long PendingComponents span and noticed the block event wasn't added to the span, so it wasn't possible to see when the block was added from the trace view, this PR fixes this.

image

Additionally I've noticed a lot of noises and confusion in sync logs due to the initialpeer_id being included as part of the syncing chain span, causing all logs under the span to have that peer_id, which may not be accurate for some sync logs, I've removed peer_id from the SyncingChain span, and also cleaned up a bunch of spans to use % (display) for slots and epochs to make logs easier to read.

@jimmygchen jimmygchen added ready-for-review The code is ready for review low-hanging-fruit Easy to resolve, get it before someone else does! UX-and-logs labels Sep 12, 2025
target_head_slot = %target_head_slot,
target_head_root = %target_head_root,
chain_type = %chain_type,
)
Copy link
Member Author

Choose a reason for hiding this comment

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

skip all and explicitly add fields to use Display for some fields and exclude peer_id

Copy link
Member

Choose a reason for hiding this comment

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

So from my understanding this skip_all will skip all fields except explicitly states in the fields(), so it will skip the tracing for peers: HashSet<PeerId> as described in the PR

Copy link
Member Author

Choose a reason for hiding this comment

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

yep that's right! and there's always a single peer when creating a lookup, and its often very misleading because new peers can get added to the lookup later, we'd then log incorrect peers when sending out requests.

/// Whether this batch contains all blocks or all blocks and blobs.
batch_type: ByRangeRequestType,
/// Pin the generic
#[derivative(Debug = "ignore")]
Copy link
Member Author

Choose a reason for hiding this comment

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

the debug impl of PhantomData is very noisy and not really helpful in this case

status = pending_components.status_str(num_expected_columns_opt),
"Component added to data availability checker"
);
});
Copy link
Member Author

Choose a reason for hiding this comment

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

log this under the span to make sure the debug event is included in the trace/span

@mergify
Copy link

mergify bot commented Sep 12, 2025

Some required checks have failed. Could you please take a look @jimmygchen? 🙏

@mergify mergify bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Sep 12, 2025
@jimmygchen jimmygchen requested a review from chong-he September 12, 2025 01:28
@jimmygchen jimmygchen added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Sep 12, 2025
Copy link
Member

@chong-he chong-he left a comment

Choose a reason for hiding this comment

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

Nice. I like the replacement of skip(xx) with skip_all and only specify the fields we want to include, making it easier to maintain and more future proof.

target_head_slot = %target_head_slot,
target_head_root = %target_head_root,
chain_type = %chain_type,
)
Copy link
Member

Choose a reason for hiding this comment

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

So from my understanding this skip_all will skip all fields except explicitly states in the fields(), so it will skip the tracing for peers: HashSet<PeerId> as described in the PR

@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Sep 12, 2025
mergify bot added a commit that referenced this pull request Sep 12, 2025
@mergify mergify bot merged commit fb77ce9 into sigp:unstable Sep 12, 2025
37 checks passed
@jimmygchen jimmygchen deleted the add-missing-pending-component-event branch September 12, 2025 05:18
PoulavBhowmick03 pushed a commit to PoulavBhowmick03/lighthouse that referenced this pull request Sep 12, 2025
…igp#8033)

I was looking into some long `PendingComponents` span and noticed the block event wasn't added to the span, so it wasn't possible to see when the block was added from the trace view, this PR fixes this.

<img width="637" height="430" alt="image" src="https://github.com/user-attachments/assets/65040b1c-11e7-43ac-951b-bdfb34b665fb" />

Additionally I've noticed a lot of noises and confusion in sync logs due to the initial`peer_id` being included as part of the syncing chain span, causing all logs under the span to have that `peer_id`, which may not be accurate for some sync logs, I've removed `peer_id` from the `SyncingChain` span, and also cleaned up a bunch of spans to use `%` (display) for slots and epochs to make logs easier to read.


  


Co-Authored-By: Jimmy Chen <[email protected]>
kevaundray pushed a commit to kevaundray/lighthouse that referenced this pull request Sep 13, 2025
…igp#8033)

I was looking into some long `PendingComponents` span and noticed the block event wasn't added to the span, so it wasn't possible to see when the block was added from the trace view, this PR fixes this.

<img width="637" height="430" alt="image" src="https://github.com/user-attachments/assets/65040b1c-11e7-43ac-951b-bdfb34b665fb" />

Additionally I've noticed a lot of noises and confusion in sync logs due to the initial`peer_id` being included as part of the syncing chain span, causing all logs under the span to have that `peer_id`, which may not be accurate for some sync logs, I've removed `peer_id` from the `SyncingChain` span, and also cleaned up a bunch of spans to use `%` (display) for slots and epochs to make logs easier to read.


  


Co-Authored-By: Jimmy Chen <[email protected]>
jtraglia pushed a commit to jtraglia/lighthouse that referenced this pull request Sep 16, 2025
…igp#8033)

I was looking into some long `PendingComponents` span and noticed the block event wasn't added to the span, so it wasn't possible to see when the block was added from the trace view, this PR fixes this.

<img width="637" height="430" alt="image" src="https://github.com/user-attachments/assets/65040b1c-11e7-43ac-951b-bdfb34b665fb" />

Additionally I've noticed a lot of noises and confusion in sync logs due to the initial`peer_id` being included as part of the syncing chain span, causing all logs under the span to have that `peer_id`, which may not be accurate for some sync logs, I've removed `peer_id` from the `SyncingChain` span, and also cleaned up a bunch of spans to use `%` (display) for slots and epochs to make logs easier to read.


  


Co-Authored-By: Jimmy Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

low-hanging-fruit Easy to resolve, get it before someone else does! ready-for-merge This PR is ready to merge. UX-and-logs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants