From 3d7d54f72ab62724603a6c4328374d2ef5be5ca9 Mon Sep 17 00:00:00 2001 From: Andreas Gerstmayr Date: Fri, 15 Mar 2024 05:09:57 +0100 Subject: [PATCH] [DOC] document Grafana data source setup using Grafana and Tempo operators (#3473) * [docs] document Grafana data source setup using Grafana and Tempo operators * move the Grafana data source setup page to the operator folder (this page is only relevant for the operator) * document Grafana data source setup using Grafana and Tempo operators Signed-off-by: Andreas Gerstmayr * Apply suggestions from code review --------- Signed-off-by: Andreas Gerstmayr Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> --- .../operator}/grafana_datasource.md | 37 +++++++++++++----- .../operator}/grafana_datasource_tempo.png | Bin .../grafana_datasource_tempo_headers.png | Bin 3 files changed, 27 insertions(+), 10 deletions(-) rename docs/sources/tempo/{operations => setup/operator}/grafana_datasource.md (75%) rename docs/sources/tempo/{operations => setup/operator}/grafana_datasource_tempo.png (100%) rename docs/sources/tempo/{operations => setup/operator}/grafana_datasource_tempo_headers.png (100%) diff --git a/docs/sources/tempo/operations/grafana_datasource.md b/docs/sources/tempo/setup/operator/grafana_datasource.md similarity index 75% rename from docs/sources/tempo/operations/grafana_datasource.md rename to docs/sources/tempo/setup/operator/grafana_datasource.md index 21cc6b2ec70..9f16e6a9443 100644 --- a/docs/sources/tempo/operations/grafana_datasource.md +++ b/docs/sources/tempo/setup/operator/grafana_datasource.md @@ -1,15 +1,32 @@ --- -title: Grafana Tempo data source +title: Grafana data source description: Use the Tempo Operator to deploy Tempo and use it as a data source with Grafana aliases: - - /docs/tempo/latest/gateway - - /docs/tempo/operations/gateway -weight: 15 + - /docs/tempo/operator/grafana_datasource +weight: 400 --- -# Grafana Tempo data source +# Grafana data source -You can configure the `TempoStack` to send data to Grafana and configure the Tempo data source. +You can use Grafana to query and visualize traces of the `TempoStack` instance by configuring a Tempo data source in Grafana. + +## Use Grafana Operator + +If your Grafana instance is managed by the [Grafana Operator](/docs/grafana-cloud/developer-resources/infrastructure-as-code/grafana-operator/), you can instruct the Tempo Operator to create a data source (`GrafanaDatasource` custom resource): + +```yaml +apiVersion: tempo.grafana.com/v1alpha1 +kind: TempoStack +spec: + observability: + grafana: + createDatasource: true +``` +{{< admonition type="note" >}} +The feature gate `featureGates.grafanaOperator` must be enabled in the Tempo Operator configuration. +{{< /admonition >}} + +## Manual data source configuration You can choose to either use Tempo Operator's gateway or not: @@ -17,9 +34,9 @@ You can choose to either use Tempo Operator's gateway or not: * If the gateway is not used, then you need to make sure Grafana can access the `query-frontend` endpoints. -For more information, refer to the [Tempo data source for Grafana](/docs/grafana/latest/datasources/tempo/), +For more information, refer to the [Tempo data source for Grafana](/docs/grafana/latest/datasources/tempo/). -## Use with gateway +### Use with gateway The gateway, an optional component deployed as part of Tempo Operator, provides secure access to Tempo's distributor (for example, for pushing spans) and query-frontend (for example, for querying traces) via consulting an OAuth/OIDC endpoint for the request subject. @@ -70,8 +87,8 @@ If you prefer to set the Bearer token directly and not use the **Forward Oauth

Tempo data source configured for the gateway using Bearer token

-## Without the gateway +### Without the gateway If you are not using the gateway, make sure your Grafana can access to the query-frontend endpoints, you can do this by creating an ingress or a route in OpenShift. -Once you have the endpoint, you can set it as `URL` when you create the Tempo data source. \ No newline at end of file +Once you have the endpoint, you can set it as `URL` when you create the Tempo data source. diff --git a/docs/sources/tempo/operations/grafana_datasource_tempo.png b/docs/sources/tempo/setup/operator/grafana_datasource_tempo.png similarity index 100% rename from docs/sources/tempo/operations/grafana_datasource_tempo.png rename to docs/sources/tempo/setup/operator/grafana_datasource_tempo.png diff --git a/docs/sources/tempo/operations/grafana_datasource_tempo_headers.png b/docs/sources/tempo/setup/operator/grafana_datasource_tempo_headers.png similarity index 100% rename from docs/sources/tempo/operations/grafana_datasource_tempo_headers.png rename to docs/sources/tempo/setup/operator/grafana_datasource_tempo_headers.png