From 5e9afa7ebf26dc612b0e86e9ba78be1874581afb Mon Sep 17 00:00:00 2001 From: Tony Choe <12507518+tonychoe@users.noreply.github.com> Date: Fri, 2 Apr 2021 10:49:15 -0700 Subject: [PATCH] Configure the Jaeger data source with provisioning (#32620) * Configure the Jaeger data source with provisioning We should have a good instruction and example for configuring the Jaeger data source with provisioning. It was hard to find how to add the tarce-to-logs, so I made one. * Update docs/sources/datasources/jaeger.md Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> --- docs/sources/datasources/jaeger.md | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/sources/datasources/jaeger.md b/docs/sources/datasources/jaeger.md index c1228b76460..8109edec8b0 100644 --- a/docs/sources/datasources/jaeger.md +++ b/docs/sources/datasources/jaeger.md @@ -54,3 +54,35 @@ Use the trace selector to pick particular trace from all traces logged in the ti ## Linking Trace ID from logs You can link to Jaeger trace from logs in Loki by configuring a derived field with internal link. See the [Derived fields]({{< relref "loki.md#derived-fields" >}}) section in the [Loki data source]({{< relref "loki.md" >}}) documentation for details. + +## Configure the data source with provisioning + +You can set up the data source via configuration files with Grafana’s provisioning system. Refer to [provisioning docs page]({{< relref "../administration/provisioning/#datasources" >}}) for information on various settings and how it works. + +Here is an example with basic auth and trace-to-logs field. + +```yaml +apiVersion: 1 + +datasources: + - name: Jaeger + type: jaeger + uid: jaeger-spectra + access: proxy + url: http://localhost:16686/ + basicAuth: true + basicAuthUser: my_user + editable: true + isDefault: false + jsonData: + tracesToLogs: + # Field with internal link pointing to a Loki data source in Grafana. + # datasourceUid value must match the `datasourceUid` value of the Loki data source. + datasourceUid: loki + tags: + - cluster + - hostname + - namespace + - pod + secureJsonData: + basicAuthPassword: my_password