Record Class SpanGroupBy

java.lang.Object
java.lang.Record
codes.grow.packages.datadogapm.SpanGroupBy
Record Components:
facet - facet, e.g. service, resource_name, @http.status_code
limit - maximum number of groups (null: Datadog default 10)
sort - group order or null
missing - value used for spans without the facet (string or number) or null
total - adds a total bucket (true, or the bucket's value) or null
histogram - buckets for a numeric facet or null

public record SpanGroupBy(String facet, Integer limit, SpanGroupBy.Sort sort, Object missing, Object total, SpanGroupBy.Histogram histogram) extends Record
  • Constructor Details

  • Method Details

    • of

      public static SpanGroupBy of(String facet)
      Groups by a facet with the defaults.
      Parameters:
      facet - facet
      Returns:
      group-by
    • of

      public static SpanGroupBy of(String facet, int limit)
      Groups by a facet with a group limit.
      Parameters:
      facet - facet
      limit - maximum groups
      Returns:
      group-by
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • facet

      public String facet()
      Returns the value of the facet record component.
      Returns:
      the value of the facet record component
    • limit

      public Integer limit()
      Returns the value of the limit record component.
      Returns:
      the value of the limit record component
    • sort

      public SpanGroupBy.Sort sort()
      Returns the value of the sort record component.
      Returns:
      the value of the sort record component
    • missing

      public Object missing()
      Returns the value of the missing record component.
      Returns:
      the value of the missing record component
    • total

      public Object total()
      Returns the value of the total record component.
      Returns:
      the value of the total record component
    • histogram

      public SpanGroupBy.Histogram histogram()
      Returns the value of the histogram record component.
      Returns:
      the value of the histogram record component