-
Notifications
You must be signed in to change notification settings - Fork 957
Add missing event in PendingComponent span and clean up sync logs
#8033
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
Add missing event in PendingComponent span and clean up sync logs
#8033
Conversation
| target_head_slot = %target_head_slot, | ||
| target_head_root = %target_head_root, | ||
| chain_type = %chain_type, | ||
| ) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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")] |
There was a problem hiding this comment.
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" | ||
| ); | ||
| }); |
There was a problem hiding this comment.
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
|
Some required checks have failed. Could you please take a look @jimmygchen? 🙏 |
chong-he
left a comment
There was a problem hiding this 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, | ||
| ) |
There was a problem hiding this comment.
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
…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]>
…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]>
…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]>
Issue Addressed
I was looking into some long
PendingComponentsspan 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.Additionally I've noticed a lot of noises and confusion in sync logs due to the initial
peer_idbeing included as part of the syncing chain span, causing all logs under the span to have thatpeer_id, which may not be accurate for some sync logs, I've removedpeer_idfrom theSyncingChainspan, and also cleaned up a bunch of spans to use%(display) for slots and epochs to make logs easier to read.