trace

Function trace 

Source
pub fn trace<S, C>(name: S, categories: C)
where S: Into<StrCow>, C: Into<CategoriesT>,
Expand description

Create an instantaneous sample without any payload. This is the lowest overhead tracing routine available.

§Performance

The json_payload feature makes this ~1.3-~1.5x slower. See trace_payload for a more complete discussion.

§Arguments

  • name - A string that provides some meaningful name to this sample. Usage of static strings is encouraged for best performance to avoid copies. However, anything that can be converted into a Cow string can be passed as an argument.

  • categories - A static array of static strings that tags the samples in some way.

§Examples

xi_trace::trace("something happened", &["rpc", "response"]);