Skip to main content

Module breadcrumbs

Module breadcrumbs 

Source
Expand description

The flight recorder: a bounded, always-on, in-memory ring of recent significant events, dumped into every report.

This is the single highest-value component — it turns a non-reproducible failure into a debuggable one by preserving the operation sequence that led to it (commit ids, page allocs/frees, reopens, key ops). It is deliberately cheap (a bounded VecDeque behind a Mutex, no allocation beyond the fixed capacity’s worth of records) so it can run in production.

Recording never panics and never blocks meaningfully: on a poisoned lock it silently drops the crumb rather than propagating failure out of a logging call. Capacity is fixed at init; the oldest crumb is evicted on overflow.

Structs§

Breadcrumb
One recorded event in the flight recorder.
Recorder
The process-wide recorder. Bounded; oldest-evicted.

Enums§

Level
Severity of a breadcrumb, mirroring common log levels.

Functions§

record
Record a breadcrumb. A no-op if the recorder was never initialized, so libraries can emit crumbs unconditionally without coupling to app setup.
recorder
The global recorder, if crate::init has run.
snapshot
Snapshot the current trail (oldest-first). Empty if uninitialized.