Expand description
§Log Querying
This module provides structures and functions for querying processed log data.
Log data is structured into LogGroups, which are collections of similar log records.
The primary structure for querying this data is the query::LogStore.
The LogStore is generic and operates on data provided by a drains::api::Drain
implementation. This means it doesn’t own the log data directly but rather queries
it from the underlying drain.
Key functionalities include:
- Retrieving
LogGroups by their unique ID via theLogStore. - Filtering
LogGroups based on a specific time range using theLogStore. - Executing LogQL queries against the
LogStoreusingquery::execute_logql_query. - Performing range-based aggregation on records (from specific log groups or LogQL queries)
within a given time window, facilitated by
query::query_log_range_aggregation.
§Log Querying System
This module provides structures and functions for querying log data.
The central component is the [LogStore], which acts as an abstraction layer
over a log data source, represented by an implementation of the Drain trait.
It also defines LogQL (Log Query Language) related structures like [LogQlQuery],
[StreamSelector], and [LineFilter] to enable structured querying of logs.
Structs§
- Line
Filter - Represents a line filter for LogQL queries.
- LogQl
Query - Represents a LogQL query, combining a stream selector and an optional line filter.
- LogStore
- A generic log data store that interacts with a log source via the
Draintrait.
Enums§
- Query
Source - Specifies the source of records for a query, either by a direct ID or a LogQL query.
- Stream
Selector - Represents a selector for log streams in LogQL queries.
Functions§
- execute_
logql_ query - Executes a LogQL query against the provided
LogStore. - query_
log_ range_ aggregation - Aggregates log records based on a query source and a time range.