fix: telemetry
@@ -8,6 +8,7 @@ use sc_executor::native_executor_instance;
pub use sc_executor::NativeExecutor;
use sc_finality_grandpa::FinalityProofProvider as GrandpaFinalityProofProvider;
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
+use sc_telemetry::TelemetrySpan;
use sp_inherents::InherentDataProviders;
use sp_runtime::traits::Block as BlockT;
use std::sync::Arc;
@@ -208,6 +209,9 @@ pub fn new_full(
let enable_grandpa = !config.disable_grandpa;
let prometheus_registry = config.prometheus_registry().cloned();
+ let telemetry_span = TelemetrySpan::new();
+ let _telemetry_span_entered = telemetry_span.enter();
+
let (_rpc_handlers, telemetry_connection_notifier) = sc_service::spawn_tasks(sc_service::SpawnTasksParams {
config,
backend: backend,
@@ -221,7 +225,7 @@ pub fn new_full(
remote_blockchain: None,
network_status_sinks: network_status_sinks.clone(),
system_rpc_tx,
- telemetry_span: None
+ telemetry_span: Some(telemetry_span.clone()),
})?;
let (block_import, grandpa_link, babe_link) = import_setup;
@@ -398,6 +402,9 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
);
}
+ let telemetry_span = TelemetrySpan::new();
+ let _telemetry_span_entered = telemetry_span.enter();
+
sc_service::spawn_tasks(sc_service::SpawnTasksParams {
remote_blockchain: Some(backend.remote_blockchain()),
transaction_pool,
@@ -411,7 +418,7 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
network,
network_status_sinks,
system_rpc_tx,
- telemetry_span: None
+ telemetry_span: Some(telemetry_span.clone()),
})?;
network_starter.start_network();
