pub struct TracingService { /* private fields */ }Expand description
Service for managing distributed tracing
Implementations§
Source§impl TracingService
impl TracingService
pub fn new(provider: Arc<TelemetryProvider>) -> Self
Sourcepub async fn start_trace(&self, operation: &str) -> TraceContext
pub async fn start_trace(&self, operation: &str) -> TraceContext
Start a new trace for an operation
Sourcepub async fn start_child_trace(
&self,
operation: &str,
parent: &TraceContext,
) -> TraceContext
pub async fn start_child_trace( &self, operation: &str, parent: &TraceContext, ) -> TraceContext
Start a child trace
Sourcepub async fn end_trace(&self, trace: TraceContext)
pub async fn end_trace(&self, trace: TraceContext)
End a trace
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TracingService
impl !RefUnwindSafe for TracingService
impl Send for TracingService
impl Sync for TracingService
impl Unpin for TracingService
impl !UnwindSafe for TracingService
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