public final class DefaultInMemoryTraceState extends java.lang.Object implements InMemoryTraceState
InMemoryTraceState
.Constructor and Description |
---|
DefaultInMemoryTraceState(java.lang.String traceIdHex,
java.lang.String spanIdHex,
java.lang.String parentSpanIdHex,
boolean sampled)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isSampled()
Determine if this state is sampled.
|
java.lang.String |
parentSpanIdHex()
The hex representation of the parent's spanId.
|
java.lang.String |
spanIdHex()
The hex representation of the traceId.
|
java.lang.String |
traceIdHex()
The hex representation of the traceId.
|
public DefaultInMemoryTraceState(java.lang.String traceIdHex, java.lang.String spanIdHex, @Nullable java.lang.String parentSpanIdHex, boolean sampled)
traceIdHex
- trace IDspanIdHex
- span IDparentSpanIdHex
- parent span ID, optionalsampled
- whether the trace is sampledpublic java.lang.String traceIdHex()
InMemoryTraceState
traceIdHex
in interface InMemoryTraceState
public java.lang.String spanIdHex()
InMemoryTraceState
spanIdHex
in interface InMemoryTraceState
@Nullable public java.lang.String parentSpanIdHex()
InMemoryTraceState
parentSpanIdHex
in interface InMemoryTraceState
null
if there is no parent.public boolean isSampled()
InMemoryTraceState
isSampled
in interface InMemoryTraceState
true
if this state is sampled.