instrument_error

Function instrument_error 

Source
pub fn instrument_error<E>(error: E) -> ComposableError<E>
Expand description

Instruments an error with the current span and all its parents.

This function captures the entire span hierarchy, providing a complete picture of the execution context when the error occurred.

§Example

use error_rail::async_ext::instrument_error;

let error = ApiError::NotFound;
let instrumented = instrument_error(error);
// Error now contains context from all active spans