#spans #tracing #error-handling #capturing #handler #eyre

eyre-span

Lightweight eyre handler for capturing tracing spans

1 unstable release

0.1.0 Aug 24, 2023

#15 in #eyre

Download history 9/week @ 2024-09-22 1/week @ 2024-09-29 42/week @ 2024-10-27 393/week @ 2024-11-03

435 downloads per month

MIT/Apache

5KB
75 lines

A more lightweight alternative to color-eyre, which simply grants access to the span where an error happened, allowing them to be printed into standard logging facilityies.

To use, install the handler, after which you can get the span with ReportSpan::span or immediately log a Result with emit or its method alias Emit::emit.

This may not work correctly with all subscriber, but it works fine with the standard tracing_subscriber::fmt.

If the tracing-error feature is enabled (default), the Display implementation will show a span trace.

Dependencies

~1.5MB
~25K SLoC