Enum RandomIdGenerator

java.lang.Object
java.lang.Enum<RandomIdGenerator>
io.opentelemetry.sdk.trace.RandomIdGenerator
All Implemented Interfaces:
IdGenerator, Serializable, Comparable<RandomIdGenerator>, java.lang.constant.Constable

enum RandomIdGenerator extends Enum<RandomIdGenerator> implements IdGenerator
  • Enum Constant Details

  • Field Details

  • Constructor Details

    • RandomIdGenerator

      private RandomIdGenerator()
  • Method Details

    • values

      public static RandomIdGenerator[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static RandomIdGenerator valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • generateSpanId

      public String generateSpanId()
      Description copied from interface: IdGenerator
      Generates a new valid SpanId.
      Specified by:
      generateSpanId in interface IdGenerator
      Returns:
      a new valid SpanId.
    • generateTraceId

      public String generateTraceId()
      Description copied from interface: IdGenerator
      Generates a new valid TraceId.
      Specified by:
      generateTraceId in interface IdGenerator
      Returns:
      a new valid TraceId.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<RandomIdGenerator>