minitrace-rust icon indicating copy to clipboard operation
minitrace-rust copied to clipboard

Need a check mode for path correnctness

Open zhongzc opened this issue 4 years ago • 0 comments

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

zhongzc avatar Jun 04 '20 19:06 zhongzc