Skip to content

Commit 2e3fe9d

Browse files
committed
Implement tracing spans for data columm RPC requests and responses (#7831)
Squashed commit of the following: commit 5ed1c6d Author: Jimmy Chen <[email protected]> Date: Tue Aug 19 18:33:24 2025 +1000 Code clean up and remove unnecessary span fields. commit 5aa0b82 Merge: 5467596 34dd1b2 Author: Jimmy Chen <[email protected]> Date: Tue Aug 19 17:26:27 2025 +1000 Merge remote-tracking branch 'origin/unstable' into tracing-spans-rpc commit 34dd1b2 Author: Jimmy Chen <[email protected]> Date: Tue Aug 19 13:48:08 2025 +1000 Revise data column rpc limits and queue sizes (#7887) Revise data column rpc limits and queue sizes. Also removed some outdated TODOs for Fulu / das. commit 5467596 Author: Jimmy Chen <[email protected]> Date: Fri Aug 15 17:16:06 2025 +1000 Remove unused deps commit 573cbf3 Author: Jimmy Chen <[email protected]> Date: Fri Aug 15 17:13:57 2025 +1000 Remove span fields that are not useful commit 61d8913 Author: Jimmy Chen <[email protected]> Date: Fri Aug 15 16:53:55 2025 +1000 Consistent span level commit 4b90aef Author: Jimmy Chen <[email protected]> Date: Fri Aug 15 16:52:38 2025 +1000 Fix docs commit 5f18692 Author: Jimmy Chen <[email protected]> Date: Fri Aug 15 16:48:03 2025 +1000 Add more context to traces commit ee50628 Author: Jimmy Chen <[email protected]> Date: Thu Aug 14 17:20:22 2025 +1000 Replace syncing chain child spans with events commit fa3051a Merge: 9ae161a 921fa75 Author: Jimmy Chen <[email protected]> Date: Thu Aug 14 16:57:41 2025 +1000 Merge branch 'tracing-spans-rpc' of github.com:jimmygchen/lighthouse into tracing-spans-rpc commit 9ae161a Author: Jimmy Chen <[email protected]> Date: Thu Aug 14 16:02:49 2025 +1000 Instrument `SyncingChain` commit 921fa75 Author: Jimmy Chen <[email protected]> Date: Thu Aug 14 16:02:49 2025 +1000 Instrumnet `SyncingChain` commit ac75779 Author: Jimmy Chen <[email protected]> Date: Wed Aug 13 18:06:52 2025 +1000 Remove root span filtering layer, couldn't get it to work. commit 3e020b9 Author: Jimmy Chen <[email protected]> Date: Wed Aug 13 18:03:09 2025 +1000 Add some notes about panic commit 9132c9e Author: Jimmy Chen <[email protected]> Date: Wed Aug 13 17:28:58 2025 +1000 Add missing instrument on backfill commit 433010d Author: Jimmy Chen <[email protected]> Date: Wed Aug 13 17:24:46 2025 +1000 Revert Makefile changes and re-arrange imports commit 7762c16 Author: Jimmy Chen <[email protected]> Date: Wed Aug 13 16:28:50 2025 +1000 Skip exporting spans that are not part of / descendants of the allowed root spans list. commit 5acfd53 Merge: 474d100 522bd9e Author: Jimmy Chen <[email protected]> Date: Wed Aug 13 14:13:20 2025 +1000 Merge remote-tracking branch 'origin/unstable' into tracing-spans-rpc # Conflicts: # beacon_node/beacon_chain/src/data_availability_checker/overflow_lru_cache.rs # beacon_node/network/src/sync/block_sidecar_coupling.rs # beacon_node/network/src/sync/network_context.rs # beacon_node/network/src/sync/network_context/custody.rs commit 474d100 Merge: 1d6ee71 40c2fd5 Author: Jimmy Chen <[email protected]> Date: Fri Aug 8 16:00:54 2025 +1000 Merge remote-tracking branch 'origin/unstable' into tracing-spans-rpc # Conflicts: # beacon_node/beacon_chain/src/block_verification.rs # beacon_node/beacon_chain/src/data_availability_checker/overflow_lru_cache.rs # beacon_node/beacon_chain/src/fetch_blobs/mod.rs # beacon_node/lighthouse_network/src/service/mod.rs # beacon_node/network/src/network_beacon_processor/gossip_methods.rs # beacon_node/network/src/network_beacon_processor/rpc_methods.rs # beacon_node/network/src/network_beacon_processor/sync_methods.rs # beacon_node/network/src/sync/network_context.rs # lighthouse/src/main.rs commit 1d6ee71 Author: Jimmy Chen <[email protected]> Date: Thu Aug 7 15:21:13 2025 +1000 Record client kind properly commit e2605e3 Author: Jimmy Chen <[email protected]> Date: Thu Aug 7 15:10:39 2025 +1000 Record client kind properly commit 226b635 Author: Jimmy Chen <[email protected]> Date: Thu Aug 7 14:49:02 2025 +1000 Display client kind instead commit addf716 Author: Jimmy Chen <[email protected]> Date: Thu Aug 7 14:28:01 2025 +1000 Refactor rabithole to clean things up and only allow for pre-defined root spans to be sent. commit 57a8d56 Author: Jimmy Chen <[email protected]> Date: Thu Aug 7 00:24:09 2025 +1000 More missing enters.. commit 40b84f3 Author: Jimmy Chen <[email protected]> Date: Thu Aug 7 00:18:23 2025 +1000 Fix spans not entering correctly. commit e922250 Author: Jimmy Chen <[email protected]> Date: Thu Aug 7 00:05:45 2025 +1000 Rename `outgoing_custody_request` and instrument all rpc methods with peer_id and client. commit 68c8345 Author: Jimmy Chen <[email protected]> Date: Wed Aug 6 23:57:36 2025 +1000 Track individual range requests. commit 4c7ef8b Author: Jimmy Chen <[email protected]> Date: Wed Aug 6 22:55:14 2025 +1000 Close a span properly and remove unnecessary span. commit cf3a216 Author: Jimmy Chen <[email protected]> Date: Wed Aug 6 22:34:43 2025 +1000 Improve RPC spans. commit e491c85 Author: Jimmy Chen <[email protected]> Date: Wed Aug 6 22:00:47 2025 +1000 Add missing field declarations. commit 4dddfc1 Author: Jimmy Chen <[email protected]> Date: Wed Aug 6 21:07:18 2025 +1000 Fix lint commit a5ce826 Author: Jimmy Chen <[email protected]> Date: Wed Aug 6 18:32:53 2025 +1000 Instrument rpc methods and by root responses. (TODO: by range responses) commit ec37ad9 Merge: 1cd9683 c06ac81 Author: Jimmy Chen <[email protected]> Date: Wed Aug 6 16:12:50 2025 +1000 Merge branch 'unstable' into tracing-spans-test commit 1cd9683 Author: Jimmy Chen <[email protected]> Date: Wed Aug 6 16:12:37 2025 +1000 Remove unnecessary `allow` macro usage commit 4af2855 Author: Jimmy Chen <[email protected]> Date: Sat Aug 2 01:29:23 2025 +1000 Instrument `PendingComponents` set parent to `None` to avoid incorrectly impacting component processing traces commit b358a1a Author: Jimmy Chen <[email protected]> Date: Sat Aug 2 01:17:13 2025 +1000 Instrument `PendingComponents`. commit 61a772f Author: Jimmy Chen <[email protected]> Date: Fri Aug 1 17:41:53 2025 +1000 Fill more instrument gaps in `process_chain_segment` commit d1751f1 Author: Jimmy Chen <[email protected]> Date: Fri Aug 1 17:33:59 2025 +1000 Fill more instrument gaps in `process_chain_segment` commit 4a3689d Author: Jimmy Chen <[email protected]> Date: Fri Aug 1 17:04:48 2025 +1000 Remove unnecessary enter() commit 91a2400 Author: Jimmy Chen <[email protected]> Date: Thu Jul 31 23:03:38 2025 +1000 Add RPC method instruments. commit d340231 Author: Jimmy Chen <[email protected]> Date: Thu Jul 31 21:35:26 2025 +1000 Set parent to None on network beacon processors to prevent inheriting libp2p spans. commit c0991f5 Author: Jimmy Chen <[email protected]> Date: Thu Jul 31 16:54:21 2025 +1000 Add process chain segment commit e1f584e Author: Jimmy Chen <[email protected]> Date: Thu Jul 31 16:14:46 2025 +1000 Fix span levels and add tracing to gossip/rpc block and blob paths. commit 333773f Author: Jimmy Chen <[email protected]> Date: Thu Jul 31 14:44:42 2025 +1000 More fixes commit fb3bf31 Author: Jimmy Chen <[email protected]> Date: Thu Jul 31 14:38:41 2025 +1000 More fixes commit 3ac075f Author: Jimmy Chen <[email protected]> Date: Thu Jul 31 13:10:41 2025 +1000 Make `process_block` a root span. commit 033861b Merge: 29d65bc 533ecc0 Author: Jimmy Chen <[email protected]> Date: Thu Jul 31 13:10:09 2025 +1000 Merge branch 'tracing-spans-test' of github.com:jimmygchen/lighthouse into tracing-spans-test commit 29d65bc Author: Jimmy Chen <[email protected]> Date: Thu Jul 31 13:07:18 2025 +1000 Add instrument back in. commit 533ecc0 Author: Jimmy Chen <[email protected]> Date: Thu Jul 31 12:44:02 2025 +1000 Revert potential bad change from 62940aa (resulted in missing root spans) commit e4e9746 Author: Jimmy Chen <[email protected]> Date: Thu Jul 31 11:20:24 2025 +1000 Clean ups. commit a8055ae Author: Jimmy Chen <[email protected]> Date: Thu Jul 31 10:30:08 2025 +1000 disable resource to test root span not yet received issue commit 868320a Author: Jimmy Chen <[email protected]> Date: Thu Jul 31 10:12:07 2025 +1000 A few more commit e7fcb4c Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 23:22:31 2025 +1000 Attempt to fix orphan spans commit 2f6c32b Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 20:47:33 2025 +1000 More instruments commit e3f6273 Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 20:41:24 2025 +1000 Add service name commit 62940aa Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 20:21:27 2025 +1000 More instruments. commit db4d342 Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 18:01:55 2025 +1000 More instruments. commit 26e30c3 Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 17:40:32 2025 +1000 More instruments. commit 3f55de0 Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 17:19:01 2025 +1000 Add more detailed instruments to `import_block` commit 4268ae5 Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 16:57:19 2025 +1000 Add more detailed instruments to `import_block` commit 386b425 Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 16:48:46 2025 +1000 Add more detailed instruments to `import_block` commit 172d859 Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 16:27:29 2025 +1000 Instrument `process_block` and `import_block`. commit 0a8d22f Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 15:51:34 2025 +1000 more instrument. commit c0804dc Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 15:26:00 2025 +1000 Add gossip block instrumentation. commit 03c647a Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 14:43:29 2025 +1000 load_parent test. commit 04c23d9 Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 14:25:40 2025 +1000 Remove all spans. commit 4147599 Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 14:19:07 2025 +1000 Squashed commit of the following: commit 52bc831 Author: Michael Sproul <[email protected]> Date: Mon Jul 21 13:56:44 2025 +1000 Remove tracing instrumentation # Conflicts: # beacon_node/network/src/sync/manager.rs # beacon_node/network/src/sync/peer_sampling.rs commit 6dba431 Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 13:08:32 2025 +1000 Add `workspace_filter` to telemetry layer to exclude libp2p traces. commit c1a50bb Author: Jimmy Chen <[email protected]> Date: Wed Jul 30 13:05:06 2025 +1000 Add opentelemetry OTLP exporter for spans. # Conflicts: # beacon_node/beacon_chain/src/validator_custody.rs # beacon_node/network/src/sync/network_context/custody.rs
1 parent 27463c5 commit 2e3fe9d

File tree

18 files changed

+491
-66
lines changed

18 files changed

+491
-66
lines changed

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ async fn process_block(&self, block: Block) -> Result<(), Error> {
293293
## Build and Development Notes
294294
- Full builds and tests take 5+ minutes - use large timeouts (300s+) for any `cargo build`, `cargo test`, or `make` commands
295295
- Use `cargo check` for faster iteration during development and always run after code changes
296+
- Use `cargo fmt --all && make lint-fix` to format code and fix linting issues once a task is complete
296297
- Prefer targeted package tests (`cargo test -p <package>`) and individual tests over full test suite when debugging specific issues
297298
- Always understand the broader codebase patterns before making changes
298299
- Minimum Supported Rust Version (MSRV) is documented in `lighthouse/Cargo.toml` - ensure Rust version meets or exceeds this requirement

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ members = [
1111
"beacon_node/http_api",
1212
"beacon_node/http_metrics",
1313
"beacon_node/lighthouse_network",
14+
"beacon_node/lighthouse_tracing",
1415
"beacon_node/network",
1516
"beacon_node/operation_pool",
1617
"beacon_node/store",
@@ -173,6 +174,7 @@ itertools = "0.10"
173174
kzg = { path = "crypto/kzg" }
174175
libsecp256k1 = "0.7"
175176
lighthouse_network = { path = "beacon_node/lighthouse_network" }
177+
lighthouse_tracing = { path = "beacon_node/lighthouse_tracing" }
176178
lighthouse_validator_store = { path = "validator_client/lighthouse_validator_store" }
177179
lighthouse_version = { path = "common/lighthouse_version" }
178180
lockfile = { path = "common/lockfile" }

beacon_node/beacon_chain/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ hex = { workspace = true }
3333
int_to_bytes = { workspace = true }
3434
itertools = { workspace = true }
3535
kzg = { workspace = true }
36+
lighthouse_tracing = { workspace = true }
3637
lighthouse_version = { workspace = true }
3738
logging = { workspace = true }
3839
lru = { workspace = true }

beacon_node/beacon_chain/src/block_verification.rs

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ impl<T: BeaconChainTypes> GossipVerifiedBlock<T> {
826826
/// on the p2p network.
827827
///
828828
/// Returns an error if the block is invalid, or if the block was unable to be verified.
829-
#[instrument(name = "verify_gossip_block", skip_all)]
829+
#[instrument(name = "verify_gossip_block", skip_all, fields(block_root = tracing::field::Empty))]
830830
pub fn new(
831831
block: Arc<SignedBeaconBlock<T::EthSpec>>,
832832
chain: &BeaconChain<T>,
@@ -1227,27 +1227,20 @@ impl<T: BeaconChainTypes> SignatureVerifiedBlock<T> {
12271227
signature_verifier
12281228
.include_all_signatures_except_proposal(block.as_ref(), &mut consensus_context)?;
12291229

1230-
let sig_verify_span = info_span!("signature_verify", result = "started").entered();
1231-
let result = signature_verifier.verify();
1230+
let result = info_span!("signature_verify").in_scope(|| signature_verifier.verify());
12321231
match result {
1233-
Ok(_) => {
1234-
sig_verify_span.record("result", "ok");
1235-
Ok(Self {
1236-
block: MaybeAvailableBlock::AvailabilityPending {
1237-
block_root: from.block_root,
1238-
block,
1239-
},
1232+
Ok(_) => Ok(Self {
1233+
block: MaybeAvailableBlock::AvailabilityPending {
12401234
block_root: from.block_root,
1241-
parent: Some(parent),
1242-
consensus_context,
1243-
})
1244-
}
1245-
Err(_) => {
1246-
sig_verify_span.record("result", "fail");
1247-
Err(BlockError::InvalidSignature(
1248-
InvalidSignature::BlockBodySignatures,
1249-
))
1250-
}
1235+
block,
1236+
},
1237+
block_root: from.block_root,
1238+
parent: Some(parent),
1239+
consensus_context,
1240+
}),
1241+
Err(_) => Err(BlockError::InvalidSignature(
1242+
InvalidSignature::BlockBodySignatures,
1243+
)),
12511244
}
12521245
}
12531246

beacon_node/beacon_chain/src/data_availability_checker/overflow_lru_cache.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use crate::block_verification_types::{
99
};
1010
use crate::data_availability_checker::{Availability, AvailabilityCheckError};
1111
use crate::data_column_verification::KzgVerifiedCustodyDataColumn;
12+
use lighthouse_tracing::SPAN_PENDING_COMPONENTS;
1213
use lru::LruCache;
1314
use parking_lot::RwLock;
1415
use std::cmp::Ordering;
@@ -288,7 +289,7 @@ impl<E: EthSpec> PendingComponents<E> {
288289

289290
/// Returns an empty `PendingComponents` object with the given block root.
290291
pub fn empty(block_root: Hash256, max_len: usize) -> Self {
291-
let span = debug_span!(parent: None, "pending_components", %block_root);
292+
let span = debug_span!(parent: None, SPAN_PENDING_COMPONENTS, %block_root);
292293
let _guard = span.clone().entered();
293294
Self {
294295
block_root,
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[package]
2+
name = "lighthouse_tracing"
3+
version = "0.1.0"
4+
edition = { workspace = true }
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
//! This module contains root span identifiers for key code paths in the beacon node.
2+
//!
3+
//! TODO: These span identifiers will be used to implement selective tracing export (to be implemented),
4+
//! where only the listed root spans and their descendants will be exported to the tracing backend.
5+
6+
/// Data Availability checker span identifiers
7+
pub const SPAN_PENDING_COMPONENTS: &str = "pending_components";
8+
9+
/// Gossip methods root spans
10+
pub const SPAN_PROCESS_GOSSIP_DATA_COLUMN: &str = "process_gossip_data_column";
11+
pub const SPAN_PROCESS_GOSSIP_BLOB: &str = "process_gossip_blob";
12+
pub const SPAN_PROCESS_GOSSIP_BLOCK: &str = "process_gossip_block";
13+
14+
/// Sync methods root spans
15+
pub const SPAN_SYNCING_CHAIN: &str = "syncing_chain";
16+
pub const SPAN_OUTGOING_RANGE_REQUEST: &str = "outgoing_range_request";
17+
pub const SPAN_OUTGOING_CUSTODY_REQUEST: &str = "outgoing_custody_request";
18+
pub const SPAN_PROCESS_RPC_BLOCK: &str = "process_rpc_block";
19+
pub const SPAN_PROCESS_RPC_BLOBS: &str = "process_rpc_blobs";
20+
pub const SPAN_PROCESS_RPC_CUSTODY_COLUMNS: &str = "process_rpc_custody_columns";
21+
pub const SPAN_PROCESS_CHAIN_SEGMENT: &str = "process_chain_segment";
22+
23+
/// RPC methods root spans
24+
pub const SPAN_HANDLE_BLOCKS_BY_RANGE_REQUEST: &str = "handle_blocks_by_range_request";
25+
pub const SPAN_HANDLE_BLOBS_BY_RANGE_REQUEST: &str = "handle_blobs_by_range_request";
26+
pub const SPAN_HANDLE_DATA_COLUMNS_BY_RANGE_REQUEST: &str = "handle_data_columns_by_range_request";
27+
pub const SPAN_HANDLE_BLOCKS_BY_ROOT_REQUEST: &str = "handle_blocks_by_root_request";
28+
pub const SPAN_HANDLE_BLOBS_BY_ROOT_REQUEST: &str = "handle_blobs_by_root_request";
29+
pub const SPAN_HANDLE_DATA_COLUMNS_BY_ROOT_REQUEST: &str = "handle_data_columns_by_root_request";
30+
pub const SPAN_HANDLE_LIGHT_CLIENT_UPDATES_BY_RANGE: &str = "handle_light_client_updates_by_range";
31+
pub const SPAN_HANDLE_LIGHT_CLIENT_BOOTSTRAP: &str = "handle_light_client_bootstrap";
32+
pub const SPAN_HANDLE_LIGHT_CLIENT_OPTIMISTIC_UPDATE: &str =
33+
"handle_light_client_optimistic_update";
34+
pub const SPAN_HANDLE_LIGHT_CLIENT_FINALITY_UPDATE: &str = "handle_light_client_finality_update";
35+
36+
/// List of all root span names that are allowed to be exported to the tracing backend.
37+
/// Only these spans and their descendants will be processed to reduce noise from
38+
/// uninstrumented code paths. New root spans must be added to this list to be traced.
39+
pub const LH_BN_ROOT_SPAN_NAMES: &[&str] = &[
40+
SPAN_SYNCING_CHAIN,
41+
SPAN_PENDING_COMPONENTS,
42+
SPAN_PROCESS_GOSSIP_DATA_COLUMN,
43+
SPAN_PROCESS_GOSSIP_BLOB,
44+
SPAN_PROCESS_GOSSIP_BLOCK,
45+
SPAN_OUTGOING_RANGE_REQUEST,
46+
SPAN_OUTGOING_CUSTODY_REQUEST,
47+
SPAN_PROCESS_RPC_BLOCK,
48+
SPAN_PROCESS_RPC_BLOBS,
49+
SPAN_PROCESS_RPC_CUSTODY_COLUMNS,
50+
SPAN_PROCESS_CHAIN_SEGMENT,
51+
SPAN_HANDLE_BLOCKS_BY_RANGE_REQUEST,
52+
SPAN_HANDLE_BLOBS_BY_RANGE_REQUEST,
53+
SPAN_HANDLE_DATA_COLUMNS_BY_RANGE_REQUEST,
54+
SPAN_HANDLE_BLOCKS_BY_ROOT_REQUEST,
55+
SPAN_HANDLE_BLOBS_BY_ROOT_REQUEST,
56+
SPAN_HANDLE_DATA_COLUMNS_BY_ROOT_REQUEST,
57+
SPAN_HANDLE_LIGHT_CLIENT_UPDATES_BY_RANGE,
58+
SPAN_HANDLE_LIGHT_CLIENT_BOOTSTRAP,
59+
SPAN_HANDLE_LIGHT_CLIENT_OPTIMISTIC_UPDATE,
60+
SPAN_HANDLE_LIGHT_CLIENT_FINALITY_UPDATE,
61+
];

beacon_node/network/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ hex = { workspace = true }
2828
igd-next = { version = "0.16", features = ["aio_tokio"] }
2929
itertools = { workspace = true }
3030
lighthouse_network = { workspace = true }
31+
lighthouse_tracing = { workspace = true }
3132
logging = { workspace = true }
3233
lru_cache = { workspace = true }
3334
metrics = { workspace = true }

beacon_node/network/src/network_beacon_processor/gossip_methods.rs

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ use beacon_chain::{
2121
};
2222
use beacon_processor::{Work, WorkEvent};
2323
use lighthouse_network::{Client, MessageAcceptance, MessageId, PeerAction, PeerId, ReportSource};
24+
use lighthouse_tracing::{
25+
SPAN_PROCESS_GOSSIP_BLOB, SPAN_PROCESS_GOSSIP_BLOCK, SPAN_PROCESS_GOSSIP_DATA_COLUMN,
26+
};
2427
use logging::crit;
2528
use operation_pool::ReceivedPreCapella;
2629
use slot_clock::SlotClock;
@@ -602,7 +605,13 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
602605
}
603606
}
604607

605-
#[instrument(skip_all, level = "trace", fields(slot = ?column_sidecar.slot(), block_root = ?column_sidecar.block_root(), index = column_sidecar.index), parent = None)]
608+
#[instrument(
609+
name = SPAN_PROCESS_GOSSIP_DATA_COLUMN,
610+
parent = None,
611+
level = "debug",
612+
skip_all,
613+
fields(slot = ?column_sidecar.slot(), block_root = ?column_sidecar.block_root(), index = column_sidecar.index),
614+
)]
606615
pub async fn process_gossip_data_column_sidecar(
607616
self: &Arc<Self>,
608617
message_id: MessageId,
@@ -760,7 +769,16 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
760769
}
761770

762771
#[allow(clippy::too_many_arguments)]
763-
#[instrument(skip_all, level = "trace", fields(slot = ?blob_sidecar.slot(), block_root = ?blob_sidecar.block_root(), index = blob_sidecar.index), parent = None)]
772+
#[instrument(
773+
name = SPAN_PROCESS_GOSSIP_BLOB,
774+
parent = None,
775+
level = "debug",
776+
skip_all,
777+
fields(
778+
slot = ?blob_sidecar.slot(),
779+
block_root = ?blob_sidecar.block_root(),
780+
index = blob_sidecar.index),
781+
)]
764782
pub async fn process_gossip_blob(
765783
self: &Arc<Self>,
766784
message_id: MessageId,
@@ -1098,7 +1116,13 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
10981116
///
10991117
/// Raises a log if there are errors.
11001118
#[allow(clippy::too_many_arguments)]
1101-
#[instrument(skip_all, fields(block_root = tracing::field::Empty), parent = None)]
1119+
#[instrument(
1120+
name = SPAN_PROCESS_GOSSIP_BLOCK,
1121+
parent = None,
1122+
level = "debug",
1123+
skip_all,
1124+
fields(block_root = tracing::field::Empty),
1125+
)]
11021126
pub async fn process_gossip_block(
11031127
self: Arc<Self>,
11041128
message_id: MessageId,

0 commit comments

Comments
 (0)