list_field_values
Get distinct values for a log field with message counts, sorted by frequency, to identify sources, environments, or logger names.
Instructions
List distinct values of a field with message counts. Useful for discovering available sources, environments, logger names, etc. Results are sorted by count descending.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End time for absolute range (ISO string or timestamp) | |
| from | No | Start time for absolute range (ISO string or timestamp) | |
| field | Yes | The field to get distinct values for (e.g. 'source', 'env', 'logger_name', 'level') | |
| limit | No | Maximum number of distinct values to return. Default: 20 | |
| query | No | Query to scope the results (e.g. search within specific messages) | |
| filters | No | Field filters to narrow scope (e.g. {"env": "marketplace_loki"}) | |
| streamIds | No | Optional stream IDs to scope the search. Use 'list_streams' to get available stream IDs. | |
| timeRange | No | Time range (e.g., '1h', '2d', '30m') or use from/to for absolute range | |
| exactMatch | No | If true (default), wraps the query in quotes for exact match. Set to false for fuzzy/wildcard search. | |
| timeRangeInSeconds | No | [DEPRECATED] Use timeRange instead. Time range in seconds. Default: 3600 (1 hour) |