mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
fix(trie): propagate parent span to proof workers (#22279)
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
committed by
GitHub
parent
719bbc2543
commit
6ff4f947c8
@@ -166,11 +166,12 @@ impl ProofWorkerHandle {
|
||||
let storage_task_ctx = task_ctx.clone();
|
||||
let storage_avail = storage_available_workers.clone();
|
||||
let storage_roots = cached_storage_roots.clone();
|
||||
let storage_parent_span = tracing::Span::current();
|
||||
runtime.spawn_blocking(move || {
|
||||
let worker_id = AtomicUsize::new(0);
|
||||
storage_rt.proof_storage_worker_pool().broadcast(storage_worker_count, |_| {
|
||||
let worker_id = worker_id.fetch_add(1, Ordering::Relaxed);
|
||||
let span = debug_span!(target: "trie::proof_task", "storage worker", ?worker_id);
|
||||
let span = debug_span!(target: "trie::proof_task", parent: storage_parent_span.clone(), "storage worker", ?worker_id);
|
||||
let _guard = span.enter();
|
||||
|
||||
#[cfg(feature = "metrics")]
|
||||
@@ -203,11 +204,12 @@ impl ProofWorkerHandle {
|
||||
let account_rt = runtime.clone();
|
||||
let account_tx = storage_work_tx.clone();
|
||||
let account_avail = account_available_workers.clone();
|
||||
let account_parent_span = tracing::Span::current();
|
||||
runtime.spawn_blocking(move || {
|
||||
let worker_id = AtomicUsize::new(0);
|
||||
account_rt.proof_account_worker_pool().broadcast(account_worker_count, |_| {
|
||||
let worker_id = worker_id.fetch_add(1, Ordering::Relaxed);
|
||||
let span = debug_span!(target: "trie::proof_task", "account worker", ?worker_id);
|
||||
let span = debug_span!(target: "trie::proof_task", parent: account_parent_span.clone(), "account worker", ?worker_id);
|
||||
let _guard = span.enter();
|
||||
|
||||
#[cfg(feature = "metrics")]
|
||||
|
||||
Reference in New Issue
Block a user