Package brave.propagation
Class TraceIdContext
- java.lang.Object
-
- brave.propagation.SamplingFlags
-
- brave.propagation.TraceIdContext
-
public final class TraceIdContext extends SamplingFlags
Contains inbound trace ID and sampling flags, used when users control the root trace ID, but not the span ID (ex Amazon X-Ray or other correlation).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TraceIdContext.Builder
-
Field Summary
-
Fields inherited from class brave.propagation.SamplingFlags
DEBUG, EMPTY, NOT_SAMPLED, SAMPLED
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Only includes mandatory fieldstraceIdHigh()
andtraceId()
int
hashCode()
Only includes mandatory fieldstraceIdHigh()
andtraceId()
static TraceIdContext.Builder
newBuilder()
TraceIdContext.Builder
toBuilder()
String
toString()
Returns$traceId
long
traceId()
Unique 8-byte identifier for a trace, set on all spans within it.long
traceIdHigh()
When non-zero, the trace containing this span uses 128-bit trace identifiers.String
traceIdString()
Returns the hex representation of the span's trace ID-
Methods inherited from class brave.propagation.SamplingFlags
debug, sampled, sampledLocal
-
-
-
-
Method Detail
-
newBuilder
public static TraceIdContext.Builder newBuilder()
-
traceIdHigh
public long traceIdHigh()
When non-zero, the trace containing this span uses 128-bit trace identifiers.
-
traceId
public long traceId()
Unique 8-byte identifier for a trace, set on all spans within it.
-
traceIdString
public String traceIdString()
Returns the hex representation of the span's trace ID- Since:
- 5.11
-
toBuilder
public TraceIdContext.Builder toBuilder()
-
toString
public String toString()
Returns$traceId
- Overrides:
toString
in classSamplingFlags
-
equals
public boolean equals(Object o)
Only includes mandatory fieldstraceIdHigh()
andtraceId()
-
hashCode
public int hashCode()
Only includes mandatory fieldstraceIdHigh()
andtraceId()
-
-