From c5223f7bf158db74c1f6138a6e7902040c3b4d62 Mon Sep 17 00:00:00 2001 From: Matias Chomicki Date: Tue, 13 Sep 2022 10:04:33 +0200 Subject: [PATCH] Loki: Update Query Variable docs (#54909) * feat(loki-query-variable-editor): update docs * Chore: fix typo in updated docs * Chore: improve redaction Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> --- docs/sources/datasources/loki.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/sources/datasources/loki.md b/docs/sources/datasources/loki.md index 91355c2a3c2..1795ae7e92d 100644 --- a/docs/sources/datasources/loki.md +++ b/docs/sources/datasources/loki.md @@ -213,13 +213,14 @@ Check out the [Templating]({{< relref "../dashboards/variables" >}}) documentati ## Query variable Variable of the type _Query_ allows you to query Loki for a list labels or label values. The Loki data source plugin -provides the following functions you can use in the `Query` input field. +provides a form to select the type of values that can be expected for a given variable. +The form has these options: -| Name | Description | -| ------------------------------------------ | -------------------------------------------------------------------------------------- | -| `label_names()` | Returns a list of label names. | -| `label_values(label)` | Returns a list of label values for the `label`. | -| `label_values(log stream selector, label)` | Returns a list of label values for the `label` in the specified `log stream selector`. | +| Query Type | Label | Stream Selector | Description | +| ------------ | ------------ | --------------------- | -------------------------------------------------------------------------------------- | +| Label names | Not required | Not required | Returns a list of label names. | +| Label values | `label` | | Returns a list of label values for the `label`. | +| Label values | `label` | `log stream selector` | Returns a list of label values for the `label` in the specified `log stream selector`. | ### Ad hoc filters variable