loki_detected_fields
Discover log fields Loki auto-extracts from a container, including name, type, cardinality, and parser. Use it to plan LogQL parse stages for accurate queries.
Instructions
Discover the fields Loki can auto-extract from a container's logs
(name, type, cardinality, parser — e.g. logfmt/json). Use this before
writing a LogQL parse stage in loki_query_range, e.g. finding that a
service logs logfmt with a status field enables
{container="x"} | logfmt | status>=500.
container: exact container name. minutes: window to sample. Default 60. limit: max fields. Default 20.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| minutes | No | ||
| container | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |