pub struct SegmentReader { /* private fields */ }Expand description
Queries sealed segments + live WAL for span data.
Implementations§
Source§impl SegmentReader
impl SegmentReader
Sourcepub fn open(dir: impl AsRef<Path>) -> Result<Self>
pub fn open(dir: impl AsRef<Path>) -> Result<Self>
Open all .nxb files and at most one .nxsw file found under dir.
Sourcepub fn find_by_trace(&self, trace_id: u128) -> Result<Vec<Span>>
pub fn find_by_trace(&self, trace_id: u128) -> Result<Vec<Span>>
Return all spans belonging to a trace, sorted by start_time_ns.
Sourcepub fn find_span(&self, trace_id: u128, span_id: u64) -> Result<Option<Span>>
pub fn find_span(&self, trace_id: u128, span_id: u64) -> Result<Option<Span>>
Find a specific span by (trace_id, span_id).
Sourcepub fn find_by_time(&self, start_ns: i64, end_ns: i64) -> Result<Vec<Span>>
pub fn find_by_time(&self, start_ns: i64, end_ns: i64) -> Result<Vec<Span>>
Return spans in a time window across all segments.
Sourcepub fn stats(&self) -> ReaderStats
pub fn stats(&self) -> ReaderStats
Summary: how many segments + records are loaded.
Auto Trait Implementations§
impl Freeze for SegmentReader
impl RefUnwindSafe for SegmentReader
impl Send for SegmentReader
impl Sync for SegmentReader
impl Unpin for SegmentReader
impl UnsafeUnpin for SegmentReader
impl UnwindSafe for SegmentReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more