Record Class DatadogIds.DatadogTraceId

java.lang.Object
java.lang.Record
codes.grow.packages.datadogapm.DatadogIds.DatadogTraceId
Record Components:
low64Decimal - low 64 bits as an unsigned decimal (x-datadog-trace-id, the Agent's trace_id)
high64Hex - high 64 bits as 16 lower-case hex characters (_dd.p.tid); all zeros for a 64-bit id
is128Bit - true when the high 64 bits are not zero (the id needs _dd.p.tid)
Enclosing class:
DatadogIds

public static record DatadogIds.DatadogTraceId(String low64Decimal, String high64Hex, boolean is128Bit) extends Record
A trace id split the way Datadog stores it.
  • Constructor Details

    • DatadogTraceId

      public DatadogTraceId(String low64Decimal, String high64Hex, boolean is128Bit)
      Creates an instance of a DatadogTraceId record class.
      Parameters:
      low64Decimal - the value for the low64Decimal record component
      high64Hex - the value for the high64Hex record component
      is128Bit - the value for the is128Bit record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • low64Decimal

      public String low64Decimal()
      Returns the value of the low64Decimal record component.
      Returns:
      the value of the low64Decimal record component
    • high64Hex

      public String high64Hex()
      Returns the value of the high64Hex record component.
      Returns:
      the value of the high64Hex record component
    • is128Bit

      public boolean is128Bit()
      Returns the value of the is128Bit record component.
      Returns:
      the value of the is128Bit record component