Initialize telemetry earlier (#2549)

This fixes a bug in block import not reporting to the telemetry.
This commit is contained in:
Bastian Köcher
2021-03-02 19:51:16 +01:00
committed by GitHub
parent 4c1de66d5d
commit b55e63272d
+3 -3
View File
@@ -572,6 +572,9 @@ pub fn new_full<RuntimeApi, Executor>(
RuntimeApiCollection<StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>,
Executor: NativeExecutionDispatch + 'static,
{
let telemetry_span = TelemetrySpan::new();
let _telemetry_span_entered = telemetry_span.enter();
let role = config.role.clone();
let force_authoring = config.force_authoring;
let backoff_authoring_blocks =
@@ -662,9 +665,6 @@ pub fn new_full<RuntimeApi, Executor>(
cache_size: None, // default is fine.
};
let telemetry_span = TelemetrySpan::new();
let _telemetry_span_entered = telemetry_span.enter();
let (rpc_handlers, telemetry_connection_notifier) = service::spawn_tasks(service::SpawnTasksParams {
config,
backend: backend.clone(),