Package io.opentelemetry.api.trace
Class ImmutableTraceFlags
java.lang.Object
io.opentelemetry.api.trace.ImmutableTraceFlags
- All Implemented Interfaces:
TraceFlags
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte
(package private) static final ImmutableTraceFlags
(package private) static final int
private final String
private static final ImmutableTraceFlags[]
(package private) static final ImmutableTraceFlags
private static final byte
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte
asByte()
Returns the byte representation of thisTraceFlags
.asHex()
Returns the lowercase hex (base16) representation of thisTraceFlags
.private static ImmutableTraceFlags[]
(package private) static ImmutableTraceFlags
fromByte
(byte traceFlagsByte) (package private) static ImmutableTraceFlags
fromHex
(CharSequence src, int srcOffset) boolean
toString()
-
Field Details
-
INSTANCES
-
SAMPLED_BIT
private static final byte SAMPLED_BIT- See Also:
-
DEFAULT
-
SAMPLED
-
HEX_LENGTH
static final int HEX_LENGTH- See Also:
-
hexRep
-
byteRep
private final byte byteRep
-
-
Constructor Details
-
ImmutableTraceFlags
private ImmutableTraceFlags(byte byteRep)
-
-
Method Details
-
fromHex
-
fromByte
-
buildInstances
-
isSampled
public boolean isSampled()Description copied from interface:TraceFlags
- Specified by:
isSampled
in interfaceTraceFlags
- Returns:
true
if the sampling bit is on for thisTraceFlags
, otherwise* false
.
-
asHex
Description copied from interface:TraceFlags
Returns the lowercase hex (base16) representation of thisTraceFlags
.- Specified by:
asHex
in interfaceTraceFlags
- Returns:
- the byte representation of the
TraceFlags
.
-
asByte
public byte asByte()Description copied from interface:TraceFlags
Returns the byte representation of thisTraceFlags
.- Specified by:
asByte
in interfaceTraceFlags
- Returns:
- the byte representation of the
TraceFlags
.
-
toString
-