Class LokiLogQueryClient

java.lang.Object
codes.grow.packages.loki.LokiLogQueryClient
All Implemented Interfaces:
LogQueryClient

public final class LokiLogQueryClient extends Object implements LogQueryClient
LogQueryClient of the logging category on top of the Loki query API: search (query_range, merge-sorted across streams, cursor pagination), tail (WebSocket), listStreams (series), listLabels (labels) and waitForLog.

Records are normalized: the line becomes body; structured metadata and parsed labels become attributes (the SDK's own keys map back to severity, traceId, spanId, traceFlags and observedTimestamp); stream labels become resource (service_name → service.name, deployment_environment → deployment.environment, …).

  • Field Details

    • MAX_QUERY_LIMIT

      public static final int MAX_QUERY_LIMIT
      Largest limit Loki accepts per query by default (max_entries_limit_per_query).
      See Also:
    • ALL_STREAMS_SELECTOR

      public static final String ALL_STREAMS_SELECTOR
      Selector used for free-text searches and listStreams().
      See Also:
  • Constructor Details

    • LokiLogQueryClient

      public LokiLogQueryClient(LokiClient client)
      Creates a query client.
      Parameters:
      client - client (and tenant) to query
  • Method Details