Skip to content

Commit

Permalink
docs: add tokio-console installation section (#313)
Browse files Browse the repository at this point in the history
## Description

This PR adds a section for installing the tokio-console crate as well as
fixes some broken console links. All changes were made to the README.
Even though the tokio-console crate has its own README that includes
installation, users will likely stumble upon the root README first.
Thus, the purpose of this PR is to aid folks who may not wish to clone
the repository when trying out the project.

## Commit Notes

- Add tokio-console installation section in the README as the primary
  method of using tokio-console
- Move the local cargo run option to its own alternative method section
- Update broken console links to use tokio-console in the README
- Add ".idea" to gitignore
- Update cargo install to use "--locked" flag in the nested README

## Additional Notes

Excellent project! Thank you for this.

Signed-off-by: Nick Gerace <nickagerace@gmail.com>
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
  • Loading branch information
nickgerace and hawkw authored Apr 8, 2022
1 parent 0045e9b commit d793903
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
**/target
**/result
**/*.swp
**/.idea
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ toolkit consists of multiple components:
[`tracing`].

* tools for **displaying and exploring diagnostic data**, implemented as gRPC
clients using the console wire protocol. the [`console`] crate implements an
clients using the console wire protocol. the [`tokio-console`] crate implements an
**an interactive command-line tool** that consumes this data, but **other
implementations**, such as graphical or web-based tools, are also possible.

Expand Down Expand Up @@ -129,11 +129,23 @@ notes:
### running the console
to **run the console command-line tool**, simply
to **run the console command-line tool**, install `tokio-console` from [crates.io](https://crates.io/crates/tokio-console)
```shell
$ cargo install --locked tokio-console
```
and run locally
```shell
$ cargo run
$ tokio-console
```
in this repository.
> **alternative method:** run the tool from a local checkout of this repository
>
> ```shell
> $ cargo run
> ```
by default, this will attempt to connect to an instrumented application running
on localhost on port 6669. if the application is running somewhere else, or is
Expand Down Expand Up @@ -248,7 +260,7 @@ cargo run --example $name
[`tracing-subscriber`]: https://lib.rs/crates/tracing-subscriber
[`console-api`]: ./console-api
[`console-subscriber`]: ./console-subscriber
[`console`]: ./console
[`tokio-console`]: ./tokio-console
[`Layer`]: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/layer/trait.Layer.html
[`tracing` targets]: https://docs.rs/tracing/latest/tracing/struct.Metadata.html
[`TRACE` level]: https://docs.rs/tracing/latest/tracing/struct.Level.html#associatedconstant.TRACE
Expand Down
2 changes: 1 addition & 1 deletion tokio-console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ use the [Tokio] runtime, this means that:
Once the application is instrumented, install the console CLI using

```shell
cargo install tokio-console
cargo install --locked tokio-console
```

Running `tokio-console` without any arguments will connect to an application on
Expand Down

0 comments on commit d793903

Please sign in to comment.