Class TraceID


  • public class TraceID
    extends java.lang.Object
    • Method Detail

      • create

        public static TraceID create​(AWSXRayRecorder creator)
        Returns a new TraceID which represents the start of a new trace. This new ID is generated according to the settings provided by the AWSXRayRecorder instance that created it.
      • fromString

        public static TraceID fromString​(java.lang.String xrayTraceId)
        Returns the TraceID parsed out of the String. If the parse fails, a new TraceID will be returned, effectively restarting the trace.
      • invalid

        public static TraceID invalid()
        Returns an invalid TraceID which can be used when an ID is needed outside the context of a trace, for example for an unsampled segment.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getNumber

        @Deprecated
        public java.math.BigInteger getNumber()
        Deprecated.
        Returns:
        the number
      • getNumberAsHex

        public java.lang.String getNumberAsHex()
        Returns the number component of this TraceID as a hexadecimal string.
      • setNumber

        @Deprecated
        public void setNumber​(@Nullable java.math.BigInteger number)
        Deprecated.
        TraceID is effectively immutable and this will be removed
        Parameters:
        number - the number to set
      • getStartTime

        public long getStartTime()
        Deprecated.
        Returns:
        the startTime
      • getStartTimeAsHex

        public java.lang.String getStartTimeAsHex()
        Returns the start time of this TraceID as a hexadecimal string representing the number of seconds since the epoch.
      • setStartTime

        @Deprecated
        public void setStartTime​(long startTime)
        Deprecated.
        TraceID is effectively immutable and this will be removed
        Parameters:
        startTime - the startTime to set
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(@Nullable java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object