pub fn span<T>(request: T) -> EnteredSpanExpand description
Creates a new span for tracing.
This function creates a new tracing::span::EnteredSpan based on the
provided request. It uses the request to determine the endpoint and includes
a unique request ID in the span.
The level of the span is set to ERROR, so it will be included on all log levels.
§Arguments
request- A value that can be converted into aValue. Depending on the specific variant ofValue, additional information like height, round, or path might be included in the span.
§Returns
An entered span which represents an active or entered span state.
§Examples
let request = request::Value::Info(RequestInfo::default());
let span = span(request);