pub struct SpanLink { /* private fields */ }Expand description
A link between spans describing a causal relationship.
Implementations§
Source§impl SpanLink
impl SpanLink
Sourcepub fn new(trace_id: u64, span_id: u64) -> Self
pub fn new(trace_id: u64, span_id: u64) -> Self
Creates a new span link for the provided identifiers.
Sourcepub fn with_trace_id(self, trace_id: u64) -> Self
pub fn with_trace_id(self, trace_id: u64) -> Self
Sets the trace identifier.
Sourcepub fn with_trace_id_high(self, trace_id_high: u64) -> Self
pub fn with_trace_id_high(self, trace_id_high: u64) -> Self
Sets the high bits of the trace identifier.
Sourcepub fn with_span_id(self, span_id: u64) -> Self
pub fn with_span_id(self, span_id: u64) -> Self
Sets the span identifier.
Sourcepub fn with_attributes(
self,
attributes: impl Into<Option<FastHashMap<MetaString, MetaString>>>,
) -> Self
pub fn with_attributes( self, attributes: impl Into<Option<FastHashMap<MetaString, MetaString>>>, ) -> Self
Replaces the attributes map.
Sourcepub fn with_tracestate(self, tracestate: impl Into<MetaString>) -> Self
pub fn with_tracestate(self, tracestate: impl Into<MetaString>) -> Self
Sets the W3C tracestate value.
Sourcepub fn with_flags(self, flags: u32) -> Self
pub fn with_flags(self, flags: u32) -> Self
Sets the W3C trace flags.
Sourcepub fn trace_id_high(&self) -> u64
pub fn trace_id_high(&self) -> u64
Returns the high bits of the trace identifier.
Sourcepub fn attributes(&self) -> &FastHashMap<MetaString, MetaString>
pub fn attributes(&self) -> &FastHashMap<MetaString, MetaString>
Returns the attributes map.
Sourcepub fn tracestate(&self) -> &str
pub fn tracestate(&self) -> &str
Returns the W3C tracestate value.
Trait Implementations§
impl StructuralPartialEq for SpanLink
Auto Trait Implementations§
impl Freeze for SpanLink
impl RefUnwindSafe for SpanLink
impl Send for SpanLink
impl Sync for SpanLink
impl Unpin for SpanLink
impl UnwindSafe for SpanLink
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Instruments this type by attaching the given allocation group token, returning a
Tracked wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Instruments this type by attaching the current allocation group, returning a
Tracked wrapper. Read more