pub fn query_log_range_aggregation<D: Drain>(
log_store: &LogStore<D>,
query_source: QuerySource,
start_time: DateTime<Utc>,
end_time: DateTime<Utc>,
) -> Vec<Record>Expand description
Aggregates log records based on a query source and a time range.
This function retrieves records either by a specific log group ID or by a LogQL query,
and then filters these records to include only those within the specified time range.
It is generic over D: Drain due to its use of LogStore.
Similar to execute_logql_query, this function returns Vec<Record> (cloned records)
to manage lifetimes correctly with data sourced from the Drain.
§Arguments
log_store- A reference to theLogStoreinstance.query_source- AQuerySourceenum indicating whether to fetch records by ID or by a LogQL query.start_time- TheDateTime<Utc>start of the aggregation range.end_time- TheDateTime<Utc>end of the aggregation range.
§Returns
A Vec<Record> containing all records that match the query source and fall within the time range.