Package io.opentelemetry.api.trace
Class TraceFlags
- java.lang.Object
-
- io.opentelemetry.api.trace.TraceFlags
-
@Immutable public final class TraceFlags extends java.lang.ObjectHelper methods for dealing with trace flags options. These options are propagated to all childspans. These determine features such as whether aSpanshould be traced. It is implemented as a bitmask.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static bytebyteFromHex(java.lang.CharSequence src, int srcOffset)Extract the byte representation of the flags from a hex-representation.static bytegetDefault()Returns the defaultTraceFlags.static intgetHexLength()Returns the size in Hex of trace flags.static bytegetSampled()static booleanisSampledFromHex(java.lang.CharSequence src, int srcOffset)Extract the sampled flag from hex-based trace-flags.
-
-
-
Method Detail
-
getHexLength
public static int getHexLength()
Returns the size in Hex of trace flags.
-
getDefault
public static byte getDefault()
Returns the defaultTraceFlags.- Returns:
- the default
TraceFlags.
-
isSampledFromHex
public static boolean isSampledFromHex(java.lang.CharSequence src, int srcOffset)Extract the sampled flag from hex-based trace-flags.
-
byteFromHex
public static byte byteFromHex(java.lang.CharSequence src, int srcOffset)Extract the byte representation of the flags from a hex-representation.
-
getSampled
public static byte getSampled()
-
-