pub struct TraceStore { /* private fields */ }Expand description
Trace store for persisting traces to PostgreSQL.
Implementations§
Source§impl TraceStore
impl TraceStore
Sourcepub async fn store(&self, spans: Vec<Span>) -> Result<()>
pub async fn store(&self, spans: Vec<Span>) -> Result<()>
Store a batch of spans to the database.
Sourcepub async fn query(
&self,
from: DateTime<Utc>,
to: DateTime<Utc>,
limit: usize,
) -> Result<Vec<String>>
pub async fn query( &self, from: DateTime<Utc>, to: DateTime<Utc>, limit: usize, ) -> Result<Vec<String>>
Query traces by time range.
Sourcepub async fn list_recent(&self, limit: usize) -> Result<Vec<TraceSummary>>
pub async fn list_recent(&self, limit: usize) -> Result<Vec<TraceSummary>>
List recent traces with summary info.
Sourcepub async fn trace_count(&self) -> usize
pub async fn trace_count(&self) -> usize
Get trace count.
Sourcepub async fn span_count(&self) -> usize
pub async fn span_count(&self) -> usize
Get total span count.
Auto Trait Implementations§
impl Freeze for TraceStore
impl !RefUnwindSafe for TraceStore
impl Send for TraceStore
impl Sync for TraceStore
impl Unpin for TraceStore
impl !UnwindSafe for TraceStore
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more