pub struct TraceContext { /* private fields */ }Expand description
Active W3C Trace Context and request correlation metadata stored in Hyperlane Context.
Implementations§
Source§impl TraceContext
Inherent implementation of TraceContext.
impl TraceContext
Inherent implementation of TraceContext.
Sourcepub fn to_traceparent(&self) -> String
pub fn to_traceparent(&self) -> String
Formats this context as a canonical W3C traceparent header value.
§Returns
String- Canonical00-<trace_id>-<span_id>-<flags>value.
Source§impl TraceContext
impl TraceContext
pub fn get_trace_id(&self) -> &String
pub fn get_mut_trace_id(&mut self) -> &mut String
pub fn set_trace_id(&mut self, val: String) -> &mut Self
pub fn get_span_id(&self) -> &String
pub fn get_mut_span_id(&mut self) -> &mut String
pub fn set_span_id(&mut self, val: String) -> &mut Self
pub fn get_parent_span_id(&self) -> Option<String>
pub fn try_get_parent_span_id(&self) -> Option<String>
pub fn get_mut_parent_span_id(&mut self) -> &mut Option<String>
pub fn set_parent_span_id(&mut self, val: Option<String>) -> &mut Self
pub fn get_request_id(&self) -> &String
pub fn get_mut_request_id(&mut self) -> &mut String
pub fn set_request_id(&mut self, val: String) -> &mut Self
pub fn get_sampled(&self) -> bool
pub fn get_mut_sampled(&mut self) -> &mut bool
pub fn set_sampled(&mut self, val: bool) -> &mut Self
pub fn get_tracestate(&self) -> Option<String>
pub fn try_get_tracestate(&self) -> Option<String>
pub fn get_mut_tracestate(&mut self) -> &mut Option<String>
pub fn set_tracestate(&mut self, val: Option<String>) -> &mut Self
Trait Implementations§
Source§impl Clone for TraceContext
impl Clone for TraceContext
Source§impl Debug for TraceContext
impl Debug for TraceContext
impl Eq for TraceContext
Source§impl PartialEq for TraceContext
impl PartialEq for TraceContext
impl StructuralPartialEq for TraceContext
Auto Trait Implementations§
impl Forget for TraceContext
impl Freeze for TraceContext
impl Move for TraceContext
impl RefUnwindSafe for TraceContext
impl Send for TraceContextwhere
RawVecInner: Send,
impl Sync for TraceContextwhere
RawVecInner: Sync,
impl Unpin for TraceContext
impl UnsafeUnpin for TraceContext
impl UnwindSafe for TraceContextwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.