mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
Add tracing support to node (#1940)
* drop in tracing to replace log * add structured logging to trace messages * add structured logging to debug messages * add structured logging to info messages * add structured logging to warn messages * add structured logging to error messages * normalize spacing and Display vs Debug * add instrumentation to the various 'fn run' * use explicit tracing module throughout * fix availability distribution test * don't double-print errors * remove further redundancy from logs * fix test errors * fix more test errors * remove unused kv_log_macro * fix unused variable * add tracing spans to collation generation * add tracing spans to av-store * add tracing spans to backing * add tracing spans to bitfield-signing * add tracing spans to candidate-selection * add tracing spans to candidate-validation * add tracing spans to chain-api * add tracing spans to provisioner * add tracing spans to runtime-api * add tracing spans to availability-distribution * add tracing spans to bitfield-distribution * add tracing spans to network-bridge * add tracing spans to collator-protocol * add tracing spans to pov-distribution * add tracing spans to statement-distribution * add tracing spans to overseer * cleanup
This commit is contained in:
committed by
GitHub
parent
94670d8082
commit
e49989971d
@@ -40,6 +40,8 @@ use sp_api::{ProvideRuntimeApi};
|
||||
|
||||
use futures::prelude::*;
|
||||
|
||||
const LOG_TARGET: &str = "RuntimeApi";
|
||||
|
||||
/// The `RuntimeApiSubsystem`. See module docs for more details.
|
||||
pub struct RuntimeApiSubsystem<Client> {
|
||||
client: Arc<Client>,
|
||||
@@ -66,6 +68,7 @@ impl<Client, Context> Subsystem<Context> for RuntimeApiSubsystem<Client> where
|
||||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(ctx, subsystem), fields(subsystem = LOG_TARGET))]
|
||||
async fn run<Client>(
|
||||
mut ctx: impl SubsystemContext<Message = RuntimeApiMessage>,
|
||||
subsystem: RuntimeApiSubsystem<Client>,
|
||||
@@ -90,6 +93,7 @@ async fn run<Client>(
|
||||
}
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "trace", skip(client, metrics), fields(subsystem = LOG_TARGET))]
|
||||
fn make_runtime_api_request<Client>(
|
||||
client: &Client,
|
||||
metrics: &Metrics,
|
||||
|
||||
Reference in New Issue
Block a user