Class GetTracesRequest

java.lang.Object
com.langfuse.client.resources.trace.requests.GetTracesRequest

public final class GetTracesRequest extends Object
  • Method Details

    • getTags

      public Optional<List<String>> getTags()
      Returns:
      Only traces that include all of these tags will be returned.
    • getEnvironment

      public Optional<List<String>> getEnvironment()
      Returns:
      Optional filter for traces where the environment is one of the provided values.
    • getPage

      public Optional<Integer> getPage()
      Returns:
      Page number, starts at 1
    • getLimit

      public Optional<Integer> getLimit()
      Returns:
      Limit of items per page. If you encounter api issues due to too large page sizes, try to reduce the limit.
    • getUserId

      public Optional<String> getUserId()
    • getName

      public Optional<String> getName()
    • getSessionId

      public Optional<String> getSessionId()
    • getFromTimestamp

      public Optional<OffsetDateTime> getFromTimestamp()
      Returns:
      Optional filter to only include traces with a trace.timestamp on or after a certain datetime (ISO 8601)
    • getToTimestamp

      public Optional<OffsetDateTime> getToTimestamp()
      Returns:
      Optional filter to only include traces with a trace.timestamp before a certain datetime (ISO 8601)
    • getOrderBy

      public Optional<String> getOrderBy()
      Returns:
      Format of the string [field].[asc/desc]. Fields: id, timestamp, name, userId, release, version, public, bookmarked, sessionId. Example: timestamp.asc
    • getVersion

      public Optional<String> getVersion()
      Returns:
      Optional filter to only include traces with a certain version.
    • getRelease

      public Optional<String> getRelease()
      Returns:
      Optional filter to only include traces with a certain release.
    • getFields

      public Optional<String> getFields()
      Returns:
      Comma-separated list of fields to include in the response. Available field groups: 'core' (always included), 'io' (input, output, metadata), 'scores', 'observations', 'metrics'. If not specified, all fields are returned. Example: 'core,scores,metrics'. Note: Excluded 'observations' or 'scores' fields return empty arrays; excluded 'metrics' returns -1 for 'totalCost' and 'latency'.
    • getFilter

      public Optional<String> getFilter()
      Returns:
      JSON string containing an array of filter conditions. When provided, this takes precedence over query parameter filters (userId, name, sessionId, tags, version, release, environment, fromTimestamp, toTimestamp).
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static GetTracesRequest.Builder builder()