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:InMemorySpanContextReturns whether the span should be sampled ornullif the sampling was not decided.- Specified by:
isSampledin interfaceInMemorySpanContext- Returns:
- whether the span should be sampled
-
baggageItems
- Specified by:
baggageItemsin interfaceio.opentracing.SpanContext
-
toSpanId
- Specified by:
toSpanIdin interfaceio.opentracing.SpanContext
-
toTraceId
- Specified by:
toTraceIdin interfaceio.opentracing.SpanContext
-
parentSpanId
Description copied from interface:InMemorySpanContextReturns the parent span ID in hex, ornullif the parent span ID is not present.- Specified by:
parentSpanIdin interfaceInMemorySpanContext- Returns:
- parent span ID in hex
-
toString
-