fibre_tracing is a layer for the tracing ecosystem that keeps the spans of one unit of work together as a trace your program can read back. You mark the top span of a request, a job or a build with fibre.root = true. Every span opened under it then joins that trace with its depth, its start time relative to the root, its duration and its fields.
The problem it solves is that tracing only writes. Spans go out to a subscriber and nothing comes back, which suits logs but not the code that wants the whole unit of work in hand: an error page that shows what a request did before it failed, a test that checks which steps a handler actually ran and a timing header with a per-step breakdown. fibre_tracing keeps those spans in process so that code can exist without a collector or any other infrastructure.
You can read a trace while it is still running with Traces::current or read finished ones from an in-memory ring of recent traces. A listener registered with on_finish sees each trace as its root closes, which is the point where you can decide to export only the traces that failed or ran long. The crate never sets a global subscriber, so it sits on a registry beside a log sink or an OpenTelemetry exporter rather than replacing them.
let = layer;
registry.with.init;
info_span!.in_scope
;
let trace = traces.recent.pop.unwrap;
for span in &trace.spans
