Class DefaultInMemorySpanContext
java.lang.Object
io.servicetalk.opentracing.inmemory.DefaultInMemorySpanContext
- All Implemented Interfaces:
io.opentracing.SpanContext
,InMemorySpanContext
SpanContext object used by the
DefaultInMemoryTracer
.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultInMemorySpanContext
(String traceId, String spanId, String parentSpanId, Boolean sampled) Constructs an instance. -
Method Summary
-
Constructor Details
-
DefaultInMemorySpanContext
public DefaultInMemorySpanContext(String traceId, String spanId, @Nullable String parentSpanId, @Nullable Boolean sampled) Constructs an instance.- Parameters:
traceId
- trace IDspanId
- span IDparentSpanId
- parent span ID, optionalsampled
- whether the trace is sampled
-
-
Method Details
-
isSampled
Description copied from interface:InMemorySpanContext
Returns whether the span should be sampled ornull
if the sampling was not decided.- Specified by:
isSampled
in interfaceInMemorySpanContext
- Returns:
- whether the span should be sampled
-
baggageItems
- Specified by:
baggageItems
in interfaceio.opentracing.SpanContext
-
toSpanId
- Specified by:
toSpanId
in interfaceio.opentracing.SpanContext
-
toTraceId
- Specified by:
toTraceId
in interfaceio.opentracing.SpanContext
-
parentSpanId
Description copied from interface:InMemorySpanContext
Returns the parent span ID in hex, ornull
if the parent span ID is not present.- Specified by:
parentSpanId
in interfaceInMemorySpanContext
- Returns:
- parent span ID in hex
-
toString
-