From c4ed5c4d4beba41a022952e760a464183e51daeb Mon Sep 17 00:00:00 2001 From: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com> Date: Tue, 2 Aug 2022 17:21:09 +0200 Subject: [PATCH] Docs: Update explain section in Loki docs (#53107) --- 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 9b845b5a5085..2fc006ce3865 100644 --- a/docs/sources/datasources/loki.md +++ b/docs/sources/datasources/loki.md @@ -61,9 +61,9 @@ The new field with the link shown in log details: ## Loki query editor -Loki query editor is separated into 3 distinct modes that you can switch between. See docs for each section below. +Loki query editor is separated into 2 distinct modes that you can switch between. See docs for each section below. -At the top of the editor, select `Run queries` to run a query. Select `Explain | Builder | Code` tabs to switch between the editor modes. If the query editor is in Builder mode, there are additional elements explained in the Builder section. +At the top of the editor, select `Run queries` to run a query. Select `Builder | Code` tabs to switch between the editor modes. If the query editor is in Builder mode, there are additional elements explained in the Builder section. > **Note:** In Explore, to run Loki queries, select `Run query`. @@ -107,6 +107,7 @@ In addition to `Run query` button and mode switcher, in builder mode additional | Name | Description | | -------------- | --------------------------------------------------------------------------------------------------------------------------------- | | Query patterns | A list of useful operation patterns that can be used to quickly add multiple operations to your query to achieve a specific goal. | +| Explain | Toggle to show a step by step explanation of all query parts and the operations. | | Raw query | Toggle to show raw query generated by the builder that will be sent to Loki instance. | #### Labels selector @@ -127,14 +128,14 @@ Some operations make sense only in specific order, if adding an operation would In same cases the query editor can detect which operations would be most appropriate for a selected log stream. In such cases it will show a hint next to the `+ Operations` button. Click on the hint to add the operations to your query. +#### Explain mode + +Explain mode helps with understanding the query. It shows a step by step explanation of all query parts and the operations. + #### Raw query This section is shown only if the `Raw query` switch from the query editor top toolbar is set to `on`. It shows the raw query that will be created and executed by the query editor. -### Explain mode - -Explain mode helps with understanding the query. It shows a step by step explanation of all query parts and the operations. - ## Querying with Loki There are two types of LogQL queries: