Skip to content

Commit f7ea3d0

Browse files
authored
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
1 parent de70336 commit f7ea3d0

File tree

53 files changed

+564
-280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+564
-280
lines changed

Cargo.lock

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

cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ polkadot-parachain = { path = "../parachain", optional = true }
2525

2626
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
2727
sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" }
28+
tracing-futures = "0.2.4"
2829
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
2930
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
3031
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }

core-primitives/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ pub type Hash = sp_core::H256;
5959
#[derive(Clone, Copy, Encode, Decode, Hash, Eq, PartialEq, Debug, Default)]
6060
pub struct CandidateHash(pub Hash);
6161

62+
#[cfg(feature="std")]
63+
impl std::fmt::Display for CandidateHash {
64+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
65+
self.0.fmt(f)
66+
}
67+
}
68+
6269
/// Index of a transaction in the relay chain. 32-bit should be plenty.
6370
pub type Nonce = u32;
6471

node/collation-generation/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ edition = "2018"
66

77
[dependencies]
88
futures = "0.3.8"
9-
log = "0.4.11"
9+
tracing = "0.1.21"
10+
tracing-futures = "0.2.4"
1011
polkadot-erasure-coding = { path = "../../erasure-coding" }
1112
polkadot-node-primitives = { path = "../primitives" }
1213
polkadot-node-subsystem = { path = "../subsystem" }

0 commit comments

Comments
 (0)