Skip to content

Commit e3f6273

Browse files
committed
Add service name
1 parent 62940aa commit e3f6273

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

beacon_node/beacon_chain/src/block_verification.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,9 @@ impl<T: BeaconChainTypes> ExecutionPendingBlock<T> {
14121412
)?;
14131413
let is_valid_merge_transition_block =
14141414
is_merge_transition_block(&parent.pre_state, block.message().body());
1415+
let current_span = tracing::Span::current();
14151416
let payload_verification_future = async move {
1417+
let _guard = current_span.enter();
14161418
let chain = payload_notifier.chain.clone();
14171419
let block = payload_notifier.block.clone();
14181420

@@ -1453,14 +1455,10 @@ impl<T: BeaconChainTypes> ExecutionPendingBlock<T> {
14531455
// Spawn the payload verification future as a new task, but don't wait for it to complete.
14541456
// The `payload_verification_future` will be awaited later to ensure verification completed
14551457
// successfully.
1456-
let current_span = tracing::Span::current();
14571458
let payload_verification_handle = chain
14581459
.task_executor
14591460
.spawn_handle(
1460-
async move {
1461-
let _guard = current_span.enter();
1462-
payload_verification_future.await
1463-
},
1461+
payload_verification_future,
14641462
"execution_payload_verification",
14651463
)
14661464
.ok_or(BeaconChainError::RuntimeShutdown)?;

beacon_node/beacon_chain/src/execution_payload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use state_processing::per_block_processing::{
2424
};
2525
use std::sync::Arc;
2626
use tokio::task::JoinHandle;
27-
use tracing::{debug, instrument, warn};
27+
use tracing::{debug, warn};
2828
use tree_hash::TreeHash;
2929
use types::payload::BlockProductionVersion;
3030
use types::*;

lighthouse/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,11 @@ fn run<E: EthSpec>(
689689

690690
let provider = opentelemetry_sdk::trace::SdkTracerProvider::builder()
691691
.with_batch_exporter(exporter)
692+
.with_resource(
693+
opentelemetry_sdk::Resource::builder()
694+
.with_service_name("lighthouse")
695+
.build(),
696+
)
692697
.build();
693698

694699
let tracer = provider.tracer("lighthouse");

0 commit comments

Comments
 (0)