From 2ecde07356e8a135cf3c7229ffe37ef860b5ec77 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Mon, 4 Oct 2021 06:03:36 -0400 Subject: [PATCH] [v8.2.x] CloudWatch Logs: Docs for X-Ray links (#39894) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * CloudWatch Logs: Docs for X-Ray links (#39725) (cherry picked from commit 0b89bdd47dd76068e9e5c52d98485e314bdc2c38) * Docs: Lint CloudWatch index page Co-authored-by: Andrej Ocenas Co-authored-by: Piotr Jamróz --- docs/sources/datasources/aws-cloudwatch/_index.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/sources/datasources/aws-cloudwatch/_index.md b/docs/sources/datasources/aws-cloudwatch/_index.md index 635bc61cb2e..7309a95cef8 100644 --- a/docs/sources/datasources/aws-cloudwatch/_index.md +++ b/docs/sources/datasources/aws-cloudwatch/_index.md @@ -29,6 +29,18 @@ To access data source settings, hover your mouse over the **Configuration** (gea | `Assume Role Arn` | Specify the ARN of the role to assume | | `External ID` | If you are assuming a role in another account, that has been created with an external ID, specify the external ID here. | +### X-Ray trace links + +Link an X-Ray data source in the "X-Ray trace link" section of the configuration page to automatically add links in your logs when the log contains `@xrayTraceId` field. + +![Trace link configuration](/static/img/docs/cloudwatch/xray-trace-link-configuration-8-2.png 'Trace link configuration') + +The data source select will contain only existing data source instances of type X-Ray so in order to use this feature you need to have existing X-Ray data source already configured, see [X-Ray docs](https://grafana.com/grafana/plugins/grafana-x-ray-datasource/) for details. + +The X-Ray link will then appear in the log details section which is accessible by clicking on the log row either in Explore or in dashboard [Logs panel]({{< relref "../../visualizations/logs-panel.md" >}}). To log the `@xrayTraceId` in your logs see the [AWS X-Ray documentation](https://docs.amazonaws.cn/en_us/xray/latest/devguide/xray-services.html). To provide the field to Grafana your log queries also have to contain the `@xrayTraceId` field, for example using query `fields @message, @xrayTraceId`. + +![Trace link in log details](/static/img/docs/cloudwatch/xray-link-log-details-8-2.png 'Trace link in log details') + ## Authentication For authentication options and configuration details, see [AWS authentication]({{< relref "aws-authentication.md" >}}) topic.