Class SearchLogsOptions

java.lang.Object
codes.grow.packages.betterstack.SearchLogsOptions

public final class SearchLogsOptions extends Object
Options of BetterStackQuery.searchLogs(SearchLogsOptions). Values are checked when the search runs (ValidationException).
  • Method Details

    • defaults

      public static SearchLogsOptions defaults()
      Defaults: the configured source table, no text filter, the last 24 h, 100 records, newest first.
      Returns:
      options
    • builder

      public static SearchLogsOptions.Builder builder()
      Returns a builder.
      Returns:
      builder
    • toBuilder

      public SearchLogsOptions.Builder toBuilder()
      Returns a builder pre-filled with these options.
      Returns:
      builder
    • source

      public Optional<String> source()
      Collection (t1234_myapp); empty uses the configured source table.
      Returns:
      source
    • contains

      public Optional<String> contains()
      Case-sensitive literal text searched in the raw event JSON (JSON-escaped first, so it matches text inside string values); empty matches everything.
      Returns:
      text
    • start

      public Optional<Instant> start()
      Inclusive window start; empty means 24 h before end() (or before now).
      Returns:
      start
    • end

      public Optional<Instant> end()
      Inclusive window end; empty means no upper bound (robust to clock skew and ingest delay).
      Returns:
      end
    • limit

      public int limit()
      Records per page, 1 to 10000 (default 100).
      Returns:
      limit
    • order

      public SortOrder order()
      Order by dt (default newest first).
      Returns:
      order
    • cursor

      public Optional<String> cursor()
      Opaque cursor of a previous page.
      Returns:
      cursor