public abstract class BraveSpanContext extends Object implements io.opentracing.SpanContext
unsampled
context results in a NoopSpan.
This type also includes hooks to integrate with the underlying Tracer. Ex
you can access the underlying trace context with unwrap()
| Modifier and Type | Method and Description |
|---|---|
abstract Iterable<Map.Entry<String,String>> |
baggageItems()
Returns empty unless
ExtraFieldPropagation is in use |
abstract brave.propagation.TraceContext |
unwrap()
Returns the underlying trace context for use in Brave apis, or null if this object does not
represent a span.
|
public abstract brave.propagation.TraceContext unwrap()
When a span context is returned from BraveSpan.context(), there's no ambiguity. It
represents the current span. However, a span context can be in an intermediate state when
extracted from headers. In other words, unwrap might not have a TraceContext to return.
Why? Extraction from headers can return partial
info. For example, in Amazon Web Services, you may be suggested just a trace ID. In other cases, you
might just inherit baggage or a sampling hint.
Copyright © 2016–2018 OpenZipkin. All rights reserved.