pub struct TraceHandle {
pub trace_id: String,
pub span_id: String,
/* private fields */
}Expand description
Handle for managing a trace span
Fields§
§trace_id: StringTrace ID
span_id: StringSpan ID
Implementations§
Source§impl TraceHandle
impl TraceHandle
Sourcepub fn set_baggage(&self, key: &str, value: &str)
pub fn set_baggage(&self, key: &str, value: &str)
Add baggage (cross-process data)
Sourcepub fn get_baggage(&self, key: &str) -> Option<String>
pub fn get_baggage(&self, key: &str) -> Option<String>
Get baggage value
Sourcepub fn set_status(&self, status: SpanStatus)
pub fn set_status(&self, status: SpanStatus)
Set span status
Sourcepub fn record_error(&self, error: &str)
pub fn record_error(&self, error: &str)
Record an error
Auto Trait Implementations§
impl Freeze for TraceHandle
impl RefUnwindSafe for TraceHandle
impl Send for TraceHandle
impl Sync for TraceHandle
impl Unpin for TraceHandle
impl UnwindSafe for TraceHandle
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> 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