From d44da8786fce5a9d4f6067c601b429769a98b653 Mon Sep 17 00:00:00 2001 From: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com> Date: Wed, 15 Jul 2020 14:22:19 +0200 Subject: [PATCH] Docs: Add derived field datasourceUid information (#26285) * Add datasourceUid info * Revert "Add datasourceUid info" This reverts commit 84dce1dcfd9b867500762fc13c0cf08c6c97d6c1. * Add datasourceUid info * Update docs/sources/features/datasources/loki.md Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> * Update derived fields info Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> (cherry picked from commit 5b2ff4498e165b67bed6e62faa10d784321e43c2) --- docs/sources/features/datasources/loki.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/sources/features/datasources/loki.md b/docs/sources/features/datasources/loki.md index 00d6aa2aefb..402c9567bb3 100755 --- a/docs/sources/features/datasources/loki.md +++ b/docs/sources/features/datasources/loki.md @@ -47,9 +47,10 @@ You can use this functionality to link to your tracing backend directly from you {{< docs-imagebox img="/img/docs/v65/loki_derived_fields.png" class="docs-image--no-shadow" caption="Screenshot of the derived fields configuration" >}} Each derived field consists of: -- **Name:** Shown in the log details as a label. -- **Regex:** A Regex pattern that runs on the log message and captures part of it as the value of the new field. Can only contain a single capture group. -- **URL**: A URL template used to construct a link next to the field value in log details. Use special `${__value.raw}` value in your template to interpolate the real field value into your URL template. +- **Name -** Shown in the log details as a label. +- **Regex -** A Regex pattern that runs on the log message and captures part of it as the value of the new field. Can only contain a single capture group. +- **URL/query -** If the link is external, then enter the full link URL. If the link is internal link, then this input serves as query for the target data source. In both cases, you can interpolate the value from the field with `${__value.raw }` macro. +- **Internal link -** Select if the link is internal or external. In case of internal link, a data source selector allows you to select the target data source. Only tracing data sources are supported. You can use a debug section to see what your fields extract and how the URL is interpolated. Click **Show example log message** to show the text area where you can enter a log message. {{< docs-imagebox img="/img/docs/v65/loki_derived_fields_debug.png" class="docs-image--no-shadow" caption="Screenshot of the derived fields debugging" >}} @@ -193,6 +194,7 @@ datasources: derivedFields: # Field with internal link pointing to data source in Grafana. # Right now, Grafana supports only Jaeger and Zipkin data sources as link targets. + # datasourceUid value can be anything, but it should be unique across all defined data source uids. - datasourceUid: my_jaeger_uid matcherRegex: "traceID=(\\w+)" name: TraceID