Fix tracing spans are not being forwarded to spawned task (#8009)
* Fix tracing spans are not being forwarded to spawned task There is a bug that tracing spans are not forwarded to spawned task. The problem was that only the telemetry span was forwarded. The solution to this is to use the tracing provided `in_current_span` to capture the current active span and pass the telemetry span explictely. We will now always enter the span when the future is polled. This is essentially the same strategy as tracing is doing with its `Instrumented`, but now extended for our use case with having multiple spans active. * More tests
Showing
- substrate/Cargo.lock 24 additions, 23 deletionssubstrate/Cargo.lock
- substrate/client/service/Cargo.toml 2 additions, 1 deletionsubstrate/client/service/Cargo.toml
- substrate/client/service/src/task_manager/mod.rs 37 additions, 5 deletionssubstrate/client/service/src/task_manager/mod.rs
- substrate/client/service/src/task_manager/tests.rs 95 additions, 3 deletionssubstrate/client/service/src/task_manager/tests.rs
Please register or sign in to comment