Expand description
Multi-segment span reader — queries across a set of sealed .nxb files plus an optional live .nxsw WAL.
§Memory model
Each sealed .nxb is mapped with memmap2::Mmap (no full-file Vec at open).
Per segment, an in-memory index trace_id → [absolute offsets] is built by scanning
the tail index once — O(records) heap for the index, not O(file size). WAL bytes
are still loaded into a Vec for the live .nxsw path.
§Usage
let reader = SegmentReader::open(“traces/”)? ; // find all spans for a trace let spans = reader.find_by_trace(trace_id)?; // find one span by (trace_id, span_id) let span = reader.find_span(trace_id, span_id)?;
Structs§
- Reader
Stats - Segment
Reader - Queries sealed segments + live WAL for span data.
- Span
- A decoded span record returned by queries.