TraceContext class

W3C trace context headers.

See https://www.w3.org/TR/trace-context/

Constructors

TraceContext({String? traceparent, String? tracestate, String? baggage})
const
TraceContext.fromCarrier(Map<String, String> carrier)
Reads the trace headers out of carrier, the map an OpenTelemetry propagator injects the active context into.
factory
TraceContext.w3c({required String traceId, required String spanId, bool sampled = true, String? tracestate, String? baggage})
Formats traceparent from the parts of the active span, for tracing clients that expose ids rather than a W3C header.
factory

Properties

baggage → String?
The baggage header carrying application-defined key-value pairs.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
traceparent → String?
The traceparent header, formatted as version-traceid-parentid-traceflags.
final
tracestate → String?
The tracestate header carrying vendor-specific trace data.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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