Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Implement tracing::Event handling & parent_id for spans and events #6672

Merged
28 commits merged into from
Aug 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e43faeb
implement events handling, implement parent_id for spans & events
mattrutherford Jul 16, 2020
5d0d25a
add events to sp_io::storage
mattrutherford Jul 16, 2020
0b7f4f8
update test
mattrutherford Jul 16, 2020
f7981fc
add tests
mattrutherford Jul 16, 2020
f892b57
adjust limit
mattrutherford Jul 16, 2020
159ac53
Merge remote-tracking branch 'origin/master' into tracing-events
gnunicorn Jul 22, 2020
ffb8713
let tracing crate handle parent_ids
gnunicorn Jul 22, 2020
cc3e5e3
re-enable current-id tracking
gnunicorn Jul 22, 2020
89a9b73
Merge branch 'master' into tracing-events
mattrutherford Jul 22, 2020
38b412c
Merge branch 'tracing-events' of github.com:paritytech/substrate into…
mattrutherford Jul 22, 2020
1855a9a
add test for threads with CurrentSpan
mattrutherford Jul 22, 2020
2081e5d
fix log level
mattrutherford Jul 22, 2020
8da1d7a
remove redundant check for non wasm traces
mattrutherford Jul 22, 2020
64d9863
remove duplicate definition in test
mattrutherford Jul 22, 2020
4dfc683
Adding conditional events API
gnunicorn Jul 23, 2020
c4bac2d
prefer explicit parent_id over current,
mattrutherford Jul 23, 2020
c6d3b5c
Merge branch 'tracing-events' of github.com:paritytech/substrate into…
mattrutherford Jul 23, 2020
f4ee909
limit changes to client::tracing event implementation
mattrutherford Jul 23, 2020
0e14ca5
remove From impl due to fallback required on parent_id
mattrutherford Jul 23, 2020
0b7b16e
Merge branch 'master' into tracing-events
mattrutherford Jul 23, 2020
b8a105d
Merge branch 'master' into tracing-events
mattrutherford Aug 3, 2020
912b4d5
implement SPAN_LIMIT
mattrutherford Aug 3, 2020
7fa7f26
change version of tracing-core
mattrutherford Aug 3, 2020
b42464b
Merge branch 'master' into tracing-events
mattrutherford Aug 10, 2020
9e42b31
update dependancies
mattrutherford Aug 10, 2020
8f16d7b
revert limit
mattrutherford Aug 11, 2020
4717247
remove duplicate dependency
mattrutherford Aug 11, 2020
9dc17e3
Apply suggestions from code review
mattrutherford Aug 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 67 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jsonrpc-pubsub = "14.2.0"
log = "0.4.8"
rand = "0.7.2"
structopt = { version = "0.3.8", optional = true }
tracing = "0.1.10"
tracing = "0.1.18"
parking_lot = "0.10.0"

# primitives
Expand Down
2 changes: 1 addition & 1 deletion client/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ pub fn init_logger(pattern: &str) {
builder.filter(Some("hyper"), log::LevelFilter::Warn);
builder.filter(Some("cranelift_wasm"), log::LevelFilter::Warn);
// Always log the special target `sc_tracing`, overrides global level
builder.filter(Some("sc_tracing"), log::LevelFilter::Info);
builder.filter(Some("sc_tracing"), log::LevelFilter::Trace);
// Enable info for others.
builder.filter(None, log::LevelFilter::Info);

Expand Down
2 changes: 1 addition & 1 deletion client/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test-case = "0.3.3"
sp-runtime = { version = "2.0.0-rc5", path = "../../primitives/runtime" }
sp-tracing = { version = "2.0.0-rc5", path = "../../primitives/tracing" }
sc-tracing = { version = "2.0.0-rc5", path = "../tracing" }
tracing = "0.1.14"
tracing = "0.1.18"

[features]
default = [ "std" ]
Expand Down
5 changes: 4 additions & 1 deletion client/executor/src/integration_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -661,14 +661,17 @@ fn parallel_execution(wasm_method: WasmExecutionMethod) {
fn wasm_tracing_should_work(wasm_method: WasmExecutionMethod) {

use std::sync::{Arc, Mutex};
use sc_tracing::SpanDatum;

use sc_tracing::{SpanDatum, TraceEvent};

struct TestTraceHandler(Arc<Mutex<Vec<SpanDatum>>>);

impl sc_tracing::TraceHandler for TestTraceHandler {
fn handle_span(&self, sd: SpanDatum) {
self.0.lock().unwrap().push(sd);
}

fn handle_event(&self, _event: TraceEvent) {}
}

let traces = Arc::new(Mutex::new(Vec::new()));
Expand Down
2 changes: 1 addition & 1 deletion client/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ sc-telemetry = { version = "2.0.0-rc5", path = "../telemetry" }
sc-offchain = { version = "2.0.0-rc5", path = "../offchain" }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0-rc5"}
sc-tracing = { version = "2.0.0-rc5", path = "../tracing" }
tracing = "0.1.10"
tracing = "0.1.18"
parity-util-mem = { version = "0.7.0", default-features = false, features = ["primitive-types"] }

[target.'cfg(not(target_os = "unknown"))'.dependencies]
Expand Down
6 changes: 2 additions & 4 deletions client/tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ rustc-hash = "1.1.0"
serde = "1.0.101"
serde_json = "1.0.41"
slog = { version = "2.5.2", features = ["nested-values"] }
tracing-core = "0.1.7"
tracing = "0.1.18"
tracing-subscriber = "0.2.10"
sp-tracing = { version = "2.0.0-rc2", path = "../../primitives/tracing" }

sc-telemetry = { version = "2.0.0-rc5", path = "../telemetry" }

[dev-dependencies]
tracing = "0.1.10"
Loading