Record Class TraceSummary

java.lang.Object
java.lang.Record
dev.dokimos.server.dto.v1.TraceSummary

public record TraceSummary(UUID id, String traceId, UUID projectId, String rootSpanName, int spanCount, Instant createdAt, Instant expiresAt) extends Record
Compact view of a Trace for the list endpoint, without its spans.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TraceSummary(UUID id, String traceId, UUID projectId, String rootSpanName, int spanCount, Instant createdAt, Instant expiresAt)
    Creates an instance of a TraceSummary record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the createdAt record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the expiresAt record component.
    from(Trace trace)
     
    final int
    Returns a hash code value for this object.
    id()
    Returns the value of the id record component.
    Returns the value of the projectId record component.
    Returns the value of the rootSpanName record component.
    int
    Returns the value of the spanCount record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the traceId record component.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TraceSummary

      public TraceSummary(UUID id, String traceId, UUID projectId, String rootSpanName, int spanCount, Instant createdAt, Instant expiresAt)
      Creates an instance of a TraceSummary record class.
      Parameters:
      id - the value for the id record component
      traceId - the value for the traceId record component
      projectId - the value for the projectId record component
      rootSpanName - the value for the rootSpanName record component
      spanCount - the value for the spanCount record component
      createdAt - the value for the createdAt record component
      expiresAt - the value for the expiresAt record component
  • Method Details

    • from

      public static TraceSummary from(Trace trace)
    • 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.
    • id

      public UUID id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • traceId

      public String traceId()
      Returns the value of the traceId record component.
      Returns:
      the value of the traceId record component
    • projectId

      public UUID projectId()
      Returns the value of the projectId record component.
      Returns:
      the value of the projectId record component
    • rootSpanName

      public String rootSpanName()
      Returns the value of the rootSpanName record component.
      Returns:
      the value of the rootSpanName record component
    • spanCount

      public int spanCount()
      Returns the value of the spanCount record component.
      Returns:
      the value of the spanCount record component
    • createdAt

      public Instant createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • expiresAt

      public Instant expiresAt()
      Returns the value of the expiresAt record component.
      Returns:
      the value of the expiresAt record component