Skip to content

refactor(providers-evm-rpc): use structured tracing fields for block fetch progress logs#2007

Open
shiyasmohd wants to merge 1 commit intomainfrom
shiyasmohd/format-progress
Open

refactor(providers-evm-rpc): use structured tracing fields for block fetch progress logs#2007
shiyasmohd wants to merge 1 commit intomainfrom
shiyasmohd/format-progress

Conversation

@shiyasmohd
Copy link
Contributor

@shiyasmohd shiyasmohd commented Mar 23, 2026

  • format progress percentage to 2 decimal places in batch stream

@shiyasmohd shiyasmohd self-assigned this Mar 23, 2026
Copy link
Contributor

@LNSD LNSD left a comment

Choose a reason for hiding this comment

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

Please, check my comments 🙂

Comment on lines 429 to 436
tracing::info!(
"Progress {}/{} ({}%) blocks (with {} txns) in {}ms",
"Progress {}/{} ({:.2}%) blocks (with {} txns) in {}ms",
blocks_completed,
total_blocks_to_stream,
(blocks_completed as f32 / total_blocks_to_stream as f32) * 100.0,
txns_completed,
start.elapsed().as_millis()
);
Copy link
Contributor

Choose a reason for hiding this comment

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

We should emit this data as trace/log fields, not as formatted strings. That would allow us to build dashboards and filter based on fields.

@shiyasmohd shiyasmohd force-pushed the shiyasmohd/format-progress branch from 0426042 to c7d68a4 Compare March 23, 2026 14:10
@shiyasmohd shiyasmohd changed the title fix(providers-evm-rpc): format progress percentage to 2 decimal places refactor(providers-evm-rpc): use structured tracing fields for block fetch progress logs Mar 23, 2026
@shiyasmohd shiyasmohd force-pushed the shiyasmohd/format-progress branch from c7d68a4 to 2546b26 Compare March 23, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants