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()
InMemoryTraceStatetraceIdHex in interface InMemoryTraceStatepublic java.lang.String spanIdHex()
InMemoryTraceStatespanIdHex in interface InMemoryTraceState@Nullable public java.lang.String parentSpanIdHex()
InMemoryTraceStateparentSpanIdHex in interface InMemoryTraceStatenull if there is no parent.public boolean isSampled()
InMemoryTraceStateisSampled in interface InMemoryTraceStatetrue if this state is sampled.