Class TraceFlags


  • @Immutable
    public final class TraceFlags
    extends Object
    Helper methods for dealing with trace flags options. These options are propagated to all child spans. These determine features such as whether a Span should be traced. It is implemented as a bitmask.
    • Method Detail

      • getHexLength

        public static int getHexLength()
        Returns the size in Hex of trace flags.
      • getDefault

        public static byte getDefault()
        Returns the default TraceFlags.
        Returns:
        the default TraceFlags.
      • isSampledFromHex

        public static boolean isSampledFromHex​(CharSequence src,
                                               int srcOffset)
        Extract the sampled flag from hex-based trace-flags.
      • byteFromHex

        public static byte byteFromHex​(CharSequence src,
                                       int srcOffset)
        Extract the byte representation of the flags from a hex-representation.
      • getSampled

        public static byte getSampled()