-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(engine): improve payload validator tracing spans #18960
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
Conversation
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.
Does setting the level to trace mean that these fields won't get included in e.g. WARN logs? If so maybe it would be useful to also have these applied to all logs? Having more context in each individual log makes them easier to use imo
4e2c21c
to
2edfca4
Compare
2edfca4
to
a2ca4a3
Compare
4aad039
to
32575f8
Compare
5f07b20
to
a284629
Compare
a284629
to
d2f02a5
Compare
Removes unused revm::context::Block import from payload_validator.rs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Added descriptive span names to instrument attributes for better tracing visibility in the payload processor and prewarm components. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Resolved conflicts in payload_validator.rs by accepting the simpler implementation from main that always includes trie updates instead of conditionally discarding them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Added level = "debug" to all instrument macros - Changed info_span! to debug_span! across payload processor and validator - Updated tracing imports to use debug_span instead of info_span This ensures proper span level filtering for improved observability in the payload processing pipeline. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Added level = "debug" to all #[instrument(...)] macros in engine tree - Changed all info_span! calls to debug_span! - Updated imports to use debug_span instead of info_span Files modified: - crates/engine/tree/src/tree/cached_state.rs - crates/engine/tree/src/tree/mod.rs - crates/engine/tree/src/tree/metrics.rs - crates/engine/tree/src/tree/payload_processor/multiproof.rs - crates/engine/tree/src/tree/payload_processor/sparse_trie.rs - crates/engine/tree/src/tree/payload_processor/mod.rs (already done) - crates/engine/tree/src/tree/payload_processor/prewarm.rs (already done) - crates/engine/tree/src/tree/payload_validator.rs (already done)
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.
overall looks good to me 👍🏻
one comment:
- i think span would help within
build_account_multiproof
let block_num_hash = input.num_hash(); | ||
|
||
trace!(target: "engine::tree", block=?block_num_hash, parent=?parent_hash, "Fetching block state provider"); | ||
trace!(target: "engine::tree::payload_validator", "Fetching block state provider"); |
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.
do we not want the block num hash here?
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.
That info will be added by the instrument
call at the top of the fn
Towards #18892
This PR has two main changes:
instrument
macro calls now have adebug
level specified. This is done to prevent losing context forDEBUG
level events — previously if theinstrument
macro created a span with levelTRACE
, thenDEBUG
events won't have this span as a parent, unless the env filter is specified to include theseTRACE
spans. Just creating a span doesn't emit an event itself, so it doesn't make the stdout noisier.engine::tree*
target is created, giving us a better overview of payload validation pipeline