[][src]Module opentelemetry::api::trace::span_context

OpenTelemetry SpanContext interface

A SpanContext represents the portion of a Span which must be serialized and propagated along side of a distributed context. SpanContexts are immutable.

The OpenTelemetry SpanContext representation conforms to the w3c TraceContext specification. It contains two identifiers - a TraceId and a SpanId - along with a set of common TraceFlags and system-specific TraceState values.

The spec can be viewed here: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/api-tracing.md#spancontext

Structs

SpanContext

Immutable portion of a Span which can be serialized and propagated.

SpanId

SpanId is an 8-byte value which uniquely identifies a given span within a trace The actual u64 value is wrapped in a tuple struct in order to leverage the newtype pattern

TraceId

TraceId is an 16-byte value which uniquely identifies a given trace The actual u128 value is wrapped in a tuple struct in order to leverage the newtype pattern

Constants

TRACE_FLAG_DEBUG

TRACE_FLAGS_DEBUG is a bitmask with the debug bit set.

TRACE_FLAG_DEFERRED

TRACE_FLAGS_DEFERRED is a bitmask with the deferred bit set. A SpanContext with the deferred bit set means the sampling decision has been defered to the receiver.

TRACE_FLAG_NOT_SAMPLED

A SpanContext with TRACE_FLAG_NOT_SAMPLED means the span is not sampled.

TRACE_FLAG_SAMPLED

TRACE_FLAG_SAMPLED is a bitmask with the sampled bit set. A SpanContext with the sampling bit set means the span is sampled.