Struct opentelemetry::trace::SpanContext [−][src]
pub struct SpanContext { /* fields omitted */ }
trace
only.Expand description
Immutable portion of a Span
which can be serialized and propagated.
Spans that do not have the sampled
flag set in their TraceFlags
will
be ignored by most tracing tools.
Implementations
Create an invalid empty span context
pub fn new(
trace_id: TraceId,
span_id: SpanId,
trace_flags: TraceFlags,
is_remote: bool,
trace_state: TraceState
) -> Self
[src]
pub fn new(
trace_id: TraceId,
span_id: SpanId,
trace_flags: TraceFlags,
is_remote: bool,
trace_state: TraceState
) -> Self
[src]Construct a new SpanContext
Returns details about the trace. Unlike TraceState
values, these are
present in all traces. Currently, the only option is a boolean sampled flag.
Returns a bool flag which is true if the SpanContext
has a valid (non-zero) trace_id
and a valid (non-zero) span_id
.
Returns true if the SpanContext
was propagated from a remote parent.
Returns true
if the sampled
trace flag is set.
Spans that are not sampled will be ignored by most tracing tools.
Returns the context’s TraceState
.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for SpanContext
impl Send for SpanContext
impl Sync for SpanContext
impl Unpin for SpanContext
impl UnwindSafe for SpanContext
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V