Skip to content

Commit

Permalink
docs: Improve tracing documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Woollett-Light <[email protected]>
  • Loading branch information
Jonathan Woollett-Light committed Nov 29, 2023
1 parent 3d18abc commit 3870eee
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion docs/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,32 @@ outputting a `Trace` level log when entering and exiting every function.
It is disabled by default at compile-time. Tracing functionality has no
impact on the release binary.

You can use `cargo run --bin clippy-tracing --` to build and run the
latest version in the repo or you can run
`cargo install --path src/clippy-tracing` to install the binary then use
`clippy-tracing` to run this binary.

You can run `clippy-tracing --help` for help.

To enable tracing in Firecracker, add instrumentation with:

```
clippy-tracing \
--action fix \
--path ./src \
--exclude vmm_config/logger.rs,virtio/gen,bindings.rs,net/gen,benches,logger/,signal_handler.rs,time.rs
--exclude \
benches,\
virtio/gen,bindings.rs,net/gen,\
log-instrument-macros/,log-instrument/,clippy-tracing/,\
vmm_config/logger.rs,logger/,signal_handler.rs,time.rs
```

`--exclude` is used to avoid adding instrumentation in:
- tests.
- bindings.
- the instrumentation tooling.
- logger functionality that may form an infinite loop.

and re-compile with `--features tracing`:

```
Expand Down

0 comments on commit 3870eee

Please sign in to comment.