def get_logs_metric(
    metric: str,
    key: str,
    filter: Optional[str] = None,
    project: Optional[str] = None,
    api_key: Optional[str] = None,
) -> Union[float, int, bool]:

source code

Retrieve a set of log metrics across a project, after applying the filtering.

Arguments:

  • metric - The reduction metric to compute for the specified key. Supported are:
  • key - The key to compute the reduction statistic for.
  • filter - The filtering to apply to the various log values, expressed as a string,
  • project - The id of the project to retrieve the logs for.
  • api_key - If specified, unify API key to be used. Defaults to the value in the

Returns:

The full set of reduced log metrics for the project, after optionally applying the optional filtering.