Class QueryLogsOptions

java.lang.Object
codes.grow.packages.skywalking.QueryLogsOptions

public final class QueryLogsOptions extends Object
Filter of SkyWalkingQueryClient.queryLogs(codes.grow.packages.skywalking.QueryLogsOptions). Either a window (default the last hour) or a trace id is sent.
  • Method Details

    • builder

      public static QueryLogsOptions.Builder builder()
      Returns a builder.
      Returns:
      builder with every field unset
    • defaults

      public static QueryLogsOptions defaults()
      No filter: the last hour, newest first, first page.
      Returns:
      options
    • toBuilder

      public QueryLogsOptions.Builder toBuilder()
      Returns a builder holding these values.
      Returns:
      builder copy
    • service

      public Optional<String> service()
      Service name.
      Returns:
      the service, or empty
    • instance

      public Optional<String> instance()
      Instance name (needs a service).
      Returns:
      the instance, or empty
    • endpoint

      public Optional<String> endpoint()
      Endpoint name (needs a service).
      Returns:
      the endpoint, or empty
    • traceId

      public Optional<String> traceId()
      Related trace id (native or hex). OTLP logs keep their trace id only in the trace_id tag.
      Returns:
      the id, or empty
    • segmentId

      public Optional<String> segmentId()
      Segment of the related trace.
      Returns:
      the segment id, or empty
    • spanId

      public OptionalInt spanId()
      Span of the related segment.
      Returns:
      the span id, or empty
    • keywords

      public List<String> keywords()
      Words the content must contain: sent to the server when it supports keyword search (Elasticsearch storage); on BanyanDB the page is filtered client side (case-insensitive substring).
      Returns:
      the words
    • excludingKeywords

      public List<String> excludingKeywords()
      Words the content must not contain (same rules as keywords()).
      Returns:
      the words
    • tags

      public Map<String,String> tags()
      Tag matches; only keys in SW_SEARCHABLE_LOGS_TAG_KEYS can match.
      Returns:
      immutable map
    • range

      public Optional<TimeRange> range()
      Window (default the last hour; not sent when only a trace id is given).
      Returns:
      the range, or empty
    • paging

      public Paging paging()
      Page selection (default Paging.DEFAULT; OAP accepts up to 1000 per page).
      Returns:
      the paging
    • order

      public SortOrder order()
      Order (default SortOrder.DESC, newest first).
      Returns:
      the order