SpanContext class

Immutable representation of a SpanContext. A SpanContext contains the state that must propagate to child Spans and across process boundaries. SpanContext follows the W3C Trace Context specification.

Constructors

SpanContext.fromJson(Map<String, dynamic> json)
Creates a SpanContext instance from a JSON representation.
factory

Properties

hashCode → int
The hash code for this object.
no setteroverride
isRemote → bool
Returns true if this span context was propagated from a remote parent.
no setter
isValid → bool
Returns true if this span context is valid.
no setter
parentSpanId → SpanId?
The parent SpanId for this span context, if any.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spanId → SpanId
The SpanId for this span context.
final
traceFlags → TraceFlags
The TraceFlags for this span context.
final
traceId → TraceId
The TraceId for this span context.
final
traceState → TraceState?
The TraceState for this span context.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this SpanContext to a JSON-serializable map.
toString() → String
A string representation of this object.
override
withTraceFlags(TraceFlags flags) → SpanContext
Creates a new SpanContext with updated trace flags.
withTraceState(TraceState state) → SpanContext
Creates a new SpanContext with updated trace state.

Operators

operator ==(Object other) → bool
The equality operator.
override