Skip to main content

execute_logql_query

Function execute_logql_query 

Source
pub fn execute_logql_query<D: Drain>(
    log_store: &LogStore<D>,
    query: &LogQlQuery,
) -> Vec<Record>
Expand description

Executes a LogQL query against the provided LogStore.

This function processes a LogQlQuery, retrieving records from the specified log groups and applying any defined filters. It is generic over D: Drain because LogStore is generic.

Due to lifetime considerations with the Drain trait (which returns owned LogGroups), this function returns a Vec<Record> (i.e., cloned, owned records) rather than references.

§Arguments

  • log_store - A reference to the LogStore instance to query.
  • query - A reference to the LogQlQuery defining the selection and filtering criteria.

§Returns

A Vec<Record> containing all records that match the query criteria.