You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This function does a very interesting and important mathematical calculation.// Suppose we want to record both the inputs to the calculation *and* its result...#[instrument(fields(result))]pubfndo_calculation(input_1:usize,input_2:usize) -> usize{// Rerform the calculation.let result = input_1 + input_2;// Record the result as part of the current span.
tracing::Span::current().record("result",&result);// ... etc ...}
Is it possible to implement similar feature in minitrace?
The text was updated successfully, but these errors were encountered:
tracing::instrument
supports following use case:Is it possible to implement similar feature in minitrace?
The text was updated successfully, but these errors were encountered: