minitrace-rust
minitrace-rust copied to clipboard
Need a check mode for path correnctness
Due to the fact that the current tracing is based on runtime TLS stacks to decide whether to enable or not. This brings us a clean codebase (no explicit context required) but also a certain mental burden to users, especially with async codes.
How to make lives easier?
My idea is to introduce a new crate feature. When specifying it, if any of the buried points fail to enable at runtime, warning information will be issued (or the program will be panicked).
For #8 as an example, we can easily put trace_async
everywhere at first. Turn on check mode. Soon, it will complain to us there is no parent where trace_task
is needed.
cc @Renkai