mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Implement tracing::Event handling & parent_id for spans and events (#6672)
* implement events handling, implement parent_id for spans & events * add events to sp_io::storage * update test * add tests * adjust limit * let tracing crate handle parent_ids * re-enable current-id tracking * add test for threads with CurrentSpan * fix log level * remove redundant check for non wasm traces * remove duplicate definition in test * Adding conditional events API * prefer explicit parent_id over current, enhance test * limit changes to client::tracing event implementation * remove From impl due to fallback required on parent_id * implement SPAN_LIMIT change event log output * change version of tracing-core * update dependancies * revert limit * remove duplicate dependency * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Matt Rutherford <mattrutherford@users.noreply.github.com> Co-authored-by: Benjamin Kampmann <ben@parity.io> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -661,7 +661,8 @@ 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>>>);
|
||||
|
||||
@@ -669,6 +670,8 @@ fn wasm_tracing_should_work(wasm_method: WasmExecutionMethod) {
|
||||
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()));
|
||||
|
||||
Reference in New Issue
Block a user