Get Logs Metric
Returns the reduction metric for filtered values (base + derived) for one or more keys from a project.
This endpoint supports three modes of operation:
-
Single key, no grouping: Returns a single metric value Example:
Response:
-
Multiple keys, no grouping: Returns a dict mapping keys to metric values Example:
Response:
-
With grouping: Returns metrics grouped by one or more fields Example:
Response:
For nested grouping, provide a list of fields: Example:
Response:
The group_by parameter can be a string for single-level grouping or a list of strings for nested grouping. Each group_by field can be prefixed with “params/” to indicate it’s a parameter.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Query Parameters
Body
Single key string or a list of keys.
Optional per-key metrics mapping. If provided, overrides the path metric for those keys.
Expression to filter logs (string or key->expr dict).
Log IDs to include (string or key->IDs dict).
Log IDs to exclude (string or key->IDs dict).
Context name (string).
Field(s) to group by when computing metrics. Can be a single field name or a list of field names for nested grouping.