Class DefaultInMemoryTraceState
- java.lang.Object
-
- io.servicetalk.opentracing.inmemory.DefaultInMemoryTraceState
-
- All Implemented Interfaces:
InMemoryTraceState
public final class DefaultInMemoryTraceState extends java.lang.Object implements InMemoryTraceState
Default implementation ofInMemoryTraceState.
-
-
Constructor Summary
Constructors Constructor Description DefaultInMemoryTraceState(java.lang.String traceIdHex, java.lang.String spanIdHex, java.lang.String parentSpanIdHex, boolean sampled)Constructs an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisSampled()Determine if this state is sampled.java.lang.StringparentSpanIdHex()The hex representation of the parent's spanId.java.lang.StringspanIdHex()The hex representation of the traceId.java.lang.StringtraceIdHex()The hex representation of the traceId.
-
-
-
Constructor Detail
-
DefaultInMemoryTraceState
public DefaultInMemoryTraceState(java.lang.String traceIdHex, java.lang.String spanIdHex, @Nullable java.lang.String parentSpanIdHex, boolean sampled)Constructs an instance.- Parameters:
traceIdHex- trace IDspanIdHex- span IDparentSpanIdHex- parent span ID, optionalsampled- whether the trace is sampled
-
-
Method Detail
-
traceIdHex
public java.lang.String traceIdHex()
Description copied from interface:InMemoryTraceStateThe hex representation of the traceId.- Specified by:
traceIdHexin interfaceInMemoryTraceState- Returns:
- hex representation of the traceId.
-
spanIdHex
public java.lang.String spanIdHex()
Description copied from interface:InMemoryTraceStateThe hex representation of the traceId.- Specified by:
spanIdHexin interfaceInMemoryTraceState- Returns:
- hex representation of the traceId.
-
parentSpanIdHex
@Nullable public java.lang.String parentSpanIdHex()
Description copied from interface:InMemoryTraceStateThe hex representation of the parent's spanId.- Specified by:
parentSpanIdHexin interfaceInMemoryTraceState- Returns:
- hex representation of the parent's spanId, or
nullif there is no parent.
-
isSampled
public boolean isSampled()
Description copied from interface:InMemoryTraceStateDetermine if this state is sampled.- Specified by:
isSampledin interfaceInMemoryTraceState- Returns:
trueif this state is sampled.
-
-