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 intprivate final Stringprivate static final ImmutableTraceFlags[](package private) static final ImmutableTraceFlagsprivate static final byte -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyteasByte()Returns the byte representation of thisTraceFlags.asHex()Returns the lowercase hex (base16) representation of thisTraceFlags.private static ImmutableTraceFlags[](package private) static ImmutableTraceFlagsfromByte(byte traceFlagsByte) (package private) static ImmutableTraceFlagsfromHex(CharSequence src, int srcOffset) booleantoString()
-
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:
isSampledin interfaceTraceFlags- Returns:
trueif the sampling bit is on for thisTraceFlags, otherwise* false.
-
asHex
Description copied from interface:TraceFlagsReturns the lowercase hex (base16) representation of thisTraceFlags.- Specified by:
asHexin interfaceTraceFlags- Returns:
- the byte representation of the
TraceFlags.
-
asByte
public byte asByte()Description copied from interface:TraceFlagsReturns the byte representation of thisTraceFlags.- Specified by:
asBytein interfaceTraceFlags- Returns:
- the byte representation of the
TraceFlags.
-
toString
-