Record Class DistributedTracer.TraceContext
java.lang.Object
java.lang.Record
com.loomcache.server.observability.DistributedTracer.TraceContext
- Record Components:
traceId- the trace IDspanId- the current span IDtraceFlags- trace flags (0x01 = sampled)
- Enclosing class:
DistributedTracer
-
Constructor Summary
ConstructorsConstructorDescriptionTraceContext(String traceId, String spanId, byte traceFlags) Create a TraceContext. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanCheck if this context is sampled.spanId()Returns the value of thespanIdrecord component.final StringtoString()Returns a string representation of this record class.byteReturns the value of thetraceFlagsrecord component.traceId()Returns the value of thetraceIdrecord component.
-
Constructor Details
-
TraceContext
-
-
Method Details
-
isSampled
public boolean isSampled()Check if this context is sampled.- Returns:
- true if sampled
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
traceId
-
spanId
-
traceFlags
public byte traceFlags()Returns the value of thetraceFlagsrecord component.- Returns:
- the value of the
traceFlagsrecord component
-