-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for connecting tokio-console to binaries (#1915)
# Description If compiled with `RUSTFLAGS="--cfg tokio_unstable"` we can now attact [tokio-console](https://github.com/tokio-rs/console) to our binaries which can help us to debug issues with debug issues with our async code # Changes - Adds https://github.com/tokio-rs/console/tree/main/console-subscriber as a dependency to our observe crate - Conditionally registers the console subscriber as an extra layer in our tracing subscriber registry (this required some rewriting of the existing layering) Docs: https://docs.rs/console-subscriber/latest/console_subscriber/#adding-the-console-subscriber ## How to test ``` RUSTFLAGS="--cfg tokio_unstable" cargo run --bin autopilot ``` In a separate console ``` cargo install --locked tokio-console tokio-console ``` and observe tokio runtime information <img width="1401" alt="image" src="https://github.com/cowprotocol/services/assets/1200333/df47ff54-24df-49bf-ae29-f7df26045339">
- Loading branch information
Showing
4 changed files
with
192 additions
and
14 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters