Record Class GetTraceOptions

java.lang.Object
java.lang.Record
codes.grow.packages.datadogapm.GetTraceOptions
Record Components:
preview - use the preview trace-by-id endpoint GET /api/v2/trace/{id} (full trace, x-unstable, 60 requests/minute) instead of searching the indexed spans
from - search window start (search mode; default 24 hours ago)
to - search window end (search mode; default now)

public record GetTraceOptions(boolean preview, Optional<DatadogTime> from, Optional<DatadogTime> to) extends Record
  • Constructor Details

    • GetTraceOptions

      public GetTraceOptions(boolean preview, Optional<DatadogTime> from, Optional<DatadogTime> to)
      Fills the defaults.
      Parameters:
      preview - preview mode
      from - start
      to - end
  • Method Details

    • defaults

      public static GetTraceOptions defaults()
      Search mode (the default) over the last 24 hours.
      Returns:
      options
    • previewApi

      public static GetTraceOptions previewApi()
      The preview trace-by-id endpoint.
      Returns:
      options
    • window

      public static GetTraceOptions window(DatadogTime from, DatadogTime to)
      Search mode over a window.
      Parameters:
      from - start or null
      to - end or null
      Returns:
      options
    • 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.
    • preview

      public boolean preview()
      Returns the value of the preview record component.
      Returns:
      the value of the preview record component
    • from

      public Optional<DatadogTime> from()
      Returns the value of the from record component.
      Returns:
      the value of the from record component
    • to

      public Optional<DatadogTime> to()
      Returns the value of the to record component.
      Returns:
      the value of the to record component