Macro trace_here

Source
trace_here!() { /* proc-macro */ }
Expand description

This macro should be used if you want to trace a specific execution span. It will emit trace span from it’s point of invocation to the end of the block it was invoked in.

For example:

foo();
{
    bar();
    utrace::trace_here!(comment="Something is happening");  // <- Trace span will be started here.
    baz();
}                                                   // <- Trace span will be ended here.

This macro accepts following parameters:

  • comment=S — optional string, which will be saved in the metadata for trace interpretation tool to inspect
  • noenter — entry point of a span will not be emited. Useful to trace events.
  • noexit — exit point of a stan will not be emited.
  • skip=N — Report span entry and exit only each Nth time. Can be used to relief the transport bandwidth requirement.