Skip to content

Commit d8a1705

Browse files
Jonathan Woollett-LightJonathanWoollett-Light
authored andcommitted
docs: Improve tracing documentation
Improves tracing documentation. Signed-off-by: Jonathan Woollett-Light <[email protected]>
1 parent 5cbd55a commit d8a1705

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

docs/tracing.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,35 @@ outputting a `Trace` level log when entering and exiting every function.
3333
It is disabled by default at compile-time. Tracing functionality has no
3434
impact on the release binary.
3535

36+
You can use `cargo run --bin clippy-tracing --` to build and run the
37+
latest version in the repo or you can run
38+
`cargo install --path src/clippy-tracing` to install the binary then use
39+
`clippy-tracing` to run this binary.
40+
41+
You can run `clippy-tracing --help` for help.
42+
3643
To enable tracing in Firecracker, add instrumentation with:
3744

3845
```
3946
clippy-tracing \
40-
--action fix \
41-
--path ./src \
42-
--exclude vmm_config/logger.rs,virtio/gen,bindings.rs,net/gen,benches,logger/,signal_handler.rs,time.rs
47+
--action fix \
48+
--path ./src \
49+
--exclude \
50+
benches,\
51+
virtio/gen,bindings.rs,net/gen,\
52+
log-instrument-macros/,log-instrument/,clippy-tracing/,\
53+
vmm_config/logger.rs,logger/,signal_handler.rs,time.rs
4354
```
4455

45-
and re-compile with `--features tracing`:
56+
`--exclude` can be used to avoid adding instrumentation to specific
57+
files, here it is used to avoid adding instrumentation in:
58+
59+
- tests.
60+
- bindings.
61+
- the instrumentation tooling.
62+
- logger functionality that may form an infinite loop.
63+
64+
After adding instrumentation re-compile with `--features tracing`:
4665

4766
```
4867
cargo build --features tracing

0 commit comments

Comments
 (0)