From ac412e6859ad62b339deb5550dd18871fc1b1329 Mon Sep 17 00:00:00 2001 From: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> Date: Thu, 13 Feb 2025 13:42:43 -0500 Subject: [PATCH] [DOC] Update links, page weights for mounting content in Tempo data source (#100395) Co-authored-by: Jack Baldry --- docs/sources/datasources/tempo/_index.md | 13 +++++++++-- .../tempo/configure-tempo-data-source.md | 2 +- .../datasources/tempo/query-editor/_index.md | 6 ++--- .../tempo/query-editor/traceql-editor.md | 4 ++-- .../tempo/query-editor/traceql-search.md | 2 +- .../tempo/query-editor/traceql-structure.md | 21 +++++++++++++++++ .../datasources/tempo/service-graph.md | 8 +++---- .../tempo/traces-in-grafana/_index.md | 23 +++++++++++++++++++ .../json-trace-file.md | 14 +++++++++-- .../{ => traces-in-grafana}/link-trace-id.md | 9 +++++--- docs/sources/explore/trace-integration.md | 3 ++- 11 files changed, 86 insertions(+), 19 deletions(-) create mode 100644 docs/sources/datasources/tempo/query-editor/traceql-structure.md create mode 100644 docs/sources/datasources/tempo/traces-in-grafana/_index.md rename docs/sources/datasources/tempo/{ => traces-in-grafana}/json-trace-file.md (82%) rename docs/sources/datasources/tempo/{ => traces-in-grafana}/link-trace-id.md (87%) diff --git a/docs/sources/datasources/tempo/_index.md b/docs/sources/datasources/tempo/_index.md index 8b2123b5cd4..836db6cac14 100644 --- a/docs/sources/datasources/tempo/_index.md +++ b/docs/sources/datasources/tempo/_index.md @@ -71,7 +71,14 @@ refs: # Tempo data source -Grafana ships with built-in support for [Tempo](https://grafana.com/docs/tempo/latest/), a high-volume, minimal-dependency trace storage, open source tracing solution from Grafana Labs. This topic explains configuration and queries specific to the Tempo data source. +Grafana ships with built-in support for [Tempo](https://grafana.com/docs/tempo//), a high-volume, minimal-dependency trace storage, open source tracing solution from Grafana Labs. + +To learn more about traces, refer to [Introduction to tracing](https://grafana.com/docs/tempo//introduction/). + +To use traces, you need you have an application or service that is instrumented to emit traces. +Refer to the [Instrument for tracing](https://grafana.com/docs/tempo//getting-started/instrumentation/) for more information. + +## Add a data source For instructions on how to add a data source to Grafana, refer to the [administration documentation](ref:data-source-management). Only users with the organization administrator role can add data sources. @@ -81,6 +88,8 @@ This video explains how to add data sources, including Loki, Tempo, and Mimir, t {{< youtube id="cqHO0oYW6Ic" start="298" >}} -Once you've added the data source, you can [configure it]({{< relref "./configure-tempo-data-source/" >}}) so that your Grafana instance's users can create queries in its [query editor]({{< relref "./query-editor/" >}}) when they [build dashboards](ref:build-dashboards) and use [Explore](ref:explore). +## Learn more + +After you've added the data source, you can [configure it](./configure-tempo-data-source/) so that your Grafana instance's users can create queries in its [query editor](./query-editor/) when they [build dashboards](ref:build-dashboards) and use [Explore](ref:explore). {{< section withDescriptions="true">}} diff --git a/docs/sources/datasources/tempo/configure-tempo-data-source.md b/docs/sources/datasources/tempo/configure-tempo-data-source.md index 24844b82ef3..39d3cdf751a 100644 --- a/docs/sources/datasources/tempo/configure-tempo-data-source.md +++ b/docs/sources/datasources/tempo/configure-tempo-data-source.md @@ -131,7 +131,7 @@ To use streaming, you need to: - Run Tempo version 2.2 or later, or Grafana Enterprise Traces (GET) version 2.2 or later, or use Grafana Cloud Traces. - Tempo must have `stream_over_http_enabled: true` for streaming to work. - For more information, refer to [Tempo GRPC API](https://grafana.com/docs/tempo//api_docs/#tempo-grpc-api). + For more information, refer to [Tempo gRPC API](https://grafana.com/docs/tempo//api_docs/#tempo-grpc-api). - For self-managed Tempo or GET instances: If your Tempo or GET instance is behind a load balancer or proxy that doesn't supporting gRPC or HTTP2, streaming may not work and should be deactivated. diff --git a/docs/sources/datasources/tempo/query-editor/_index.md b/docs/sources/datasources/tempo/query-editor/_index.md index b561a54bdcd..b6aa5c0f49b 100644 --- a/docs/sources/datasources/tempo/query-editor/_index.md +++ b/docs/sources/datasources/tempo/query-editor/_index.md @@ -105,7 +105,7 @@ Refer to the [Search using the TraceQL query builder documentation]({{< relref " The **TraceQL** query editor lets you search by trace ID and write TraceQL queries using autocomplete. -Refer to the [TraceQL query editor documentation]({{< relref "./traceql-editor" >}}) to learn more about constructing queries using a code-editor-like experience. +Refer to the [TraceQL query editor documentation](./traceql-editor) to learn more about constructing queries using a code-editor-like experience. ![The TraceQL query editor](/media/docs/grafana/data-sources/tempo/query-editor/tempo-ds-query-traceql-v11.png) @@ -113,8 +113,8 @@ You can also search for a trace ID by entering it into the query field. ### Service graph view -Grafana’s **Service Graph** view uses metrics to display span request rates, error rates, and durations, as well as service graphs. -Once the requirements are set up, this preconfigured view is immediately available. +The **Service Graph** view uses metrics to display span request rates, error rates, and durations, as well as service graphs. +After the requirements are set up, this preconfigured view is immediately available. Using the service graph view, you can: diff --git a/docs/sources/datasources/tempo/query-editor/traceql-editor.md b/docs/sources/datasources/tempo/query-editor/traceql-editor.md index 7752a290229..cc5b38beaaa 100644 --- a/docs/sources/datasources/tempo/query-editor/traceql-editor.md +++ b/docs/sources/datasources/tempo/query-editor/traceql-editor.md @@ -12,7 +12,7 @@ labels: - oss menuTitle: Write TraceQL queries title: Write TraceQL queries with the editor -weight: 300 +weight: 400 refs: explore: - pattern: /docs/grafana/ @@ -41,4 +41,4 @@ refs: [//]: # 'Shared content for the TraceQL query editor' [//]: # 'This content is located in /docs/sources/shared/datasources/tempo-editor-traceql.md' -{{< docs/shared source="grafana" lookup="datasources/tempo-editor-traceql.md" version="" >}} +{{< docs/shared source="grafana" lookup="datasources/tempo-editor-traceql.md" version="" >}} diff --git a/docs/sources/datasources/tempo/query-editor/traceql-search.md b/docs/sources/datasources/tempo/query-editor/traceql-search.md index b885f1239d8..84ac0b396c4 100644 --- a/docs/sources/datasources/tempo/query-editor/traceql-search.md +++ b/docs/sources/datasources/tempo/query-editor/traceql-search.md @@ -56,4 +56,4 @@ To enable the TraceQL query builder in self-hosted Grafana through version 10.1, [//]: # 'Shared content for the Search - TraceQL query builder' -{{< docs/shared source="grafana" lookup="datasources/tempo-search-traceql.md" leveloffset="+1" version="" >}} +{{< docs/shared source="grafana" lookup="datasources/tempo-search-traceql.md" leveloffset="+1" version="" >}} diff --git a/docs/sources/datasources/tempo/query-editor/traceql-structure.md b/docs/sources/datasources/tempo/query-editor/traceql-structure.md new file mode 100644 index 00000000000..b67d57cedf3 --- /dev/null +++ b/docs/sources/datasources/tempo/query-editor/traceql-structure.md @@ -0,0 +1,21 @@ +--- +description: Learn how to create TraceQL queries are structured. +keywords: + - queries + - TraceQL +labels: + products: + - cloud + - enterprise + - oss +menuTitle: TraceQL query structure +title: TraceQL query structure +weight: 200 +--- + +# TraceQL query structure + +[//]: # 'Shared content for best practices for traces' +[//]: # 'This content is located in /tempo/docs/sources/shared/trace-structure.md' + +{{< docs/shared source="tempo" lookup="traceql-query-structure.md" version="" >}} diff --git a/docs/sources/datasources/tempo/service-graph.md b/docs/sources/datasources/tempo/service-graph.md index 0e6c1f8b657..d1644d41b73 100644 --- a/docs/sources/datasources/tempo/service-graph.md +++ b/docs/sources/datasources/tempo/service-graph.md @@ -72,8 +72,8 @@ You use the Service Graph to detect performance issues; track increases in error ## Display the Service Graph -1. [Configure Grafana Alloy](https://grafana.com/docs/tempo/latest/configuration/grafana-alloy/) or [Tempo or GET](https://grafana.com/docs/tempo/latest/metrics-generator/service_graphs/#tempo) to generate Service Graph data. -1. Link a Prometheus data source in the Tempo data source's [Service Graph]({{< relref "./configure-tempo-data-source#configure-service-graph" >}}) settings. +1. [Configure Grafana Alloy](https://grafana.com/docs/tempo//configuration/grafana-alloy/) or [Tempo or GET](https://grafana.com/docs/tempo//metrics-generator/service_graphs/#tempo) to generate Service Graph data. +1. Link a Prometheus data source in the Tempo data source's [Service Graph](./configure-tempo-data-source#configure-service-graph) settings. 1. Navigate to [Explore](ref:explore). 1. Select the Tempo data source. 1. Select the **Service Graph** query type. @@ -113,10 +113,10 @@ To open the Service Graph view: 1. Run the query. 1. _(Optional)_ Filter your results. -{{% admonition type="note" %}} +{{< admonition type="note" >}} Grafana uses the `traces_spanmetrics_calls_total` metric to display the name, rate, and error rate columns, and `traces_spanmetrics_latency_bucket` to display the duration column. These metrics must exist in your Prometheus data source. -{{% /admonition %}} +{{< /admonition >}} To open a query in Prometheus with the span name of that row automatically set in the query, click a row in the **rate**, **error rate**, or **duration** columns. diff --git a/docs/sources/datasources/tempo/traces-in-grafana/_index.md b/docs/sources/datasources/tempo/traces-in-grafana/_index.md new file mode 100644 index 00000000000..c3f622bb57d --- /dev/null +++ b/docs/sources/datasources/tempo/traces-in-grafana/_index.md @@ -0,0 +1,23 @@ +--- +description: Learn about how you can use tracing data in Grafana Cloud to query data, + generate metrics, and link your tracing data with logs, metrics, and profiles. +keywords: + - Grafana + - traces + - tracing +title: Use traces in Grafana +weight: 275 +--- + +# Use traces in Grafana + +Using traces, you can search for traces, generate metrics from spans, and link your tracing data with logs, metrics, and profiles. + +This page provides a summary of how you can use tracing data in Grafana. + +For general documentation on querying data sources in Grafana, refer to [Query and transform data](https://grafana.com/docs/grafana-cloud/visualizations/panels-visualizations/query-transform-data/). + +[//]: # 'Shared content for best practices for traces' +[//]: # 'This content is located in /tempo/docs/sources/shared/tempo-in-grafana.md' + +{{< docs/shared source="tempo" lookup="tempo-in-grafana.md" version="" >}} diff --git a/docs/sources/datasources/tempo/json-trace-file.md b/docs/sources/datasources/tempo/traces-in-grafana/json-trace-file.md similarity index 82% rename from docs/sources/datasources/tempo/json-trace-file.md rename to docs/sources/datasources/tempo/traces-in-grafana/json-trace-file.md index 0387eab883a..77b45011a2f 100644 --- a/docs/sources/datasources/tempo/json-trace-file.md +++ b/docs/sources/datasources/tempo/traces-in-grafana/json-trace-file.md @@ -12,7 +12,9 @@ labels: - oss menuTitle: Upload JSON trace file title: Upload a JSON trace file -weight: 400 +weight: 900 +aliases: + - ../json-trace-file/ # /docs/grafana/latest/datasources/tempo/json-trace-file --- # Upload a JSON trace file @@ -20,7 +22,15 @@ weight: 400 You can upload a JSON file that contains a single trace and visualize it. If the file has multiple traces, Grafana visualizes the first trace. -**To download a trace or Service Graph through the inspector:** +To upload a trace file: + +1. Select **Explore** in Grafana. +1. Select **Import trace** in the right corner. +1. Upload your JSON trace file. + +## Download a trace or service graph + +To download a trace or Service Graph through the [Inspector panel](https://grafana.com/docs/grafana//explore/explore-inspector/): 1. Open the inspector. 1. Navigate to the **Data** tab. diff --git a/docs/sources/datasources/tempo/link-trace-id.md b/docs/sources/datasources/tempo/traces-in-grafana/link-trace-id.md similarity index 87% rename from docs/sources/datasources/tempo/link-trace-id.md rename to docs/sources/datasources/tempo/traces-in-grafana/link-trace-id.md index d53496e3784..07c7f6f2bec 100644 --- a/docs/sources/datasources/tempo/link-trace-id.md +++ b/docs/sources/datasources/tempo/traces-in-grafana/link-trace-id.md @@ -12,7 +12,10 @@ labels: - oss menuTitle: Link to a trace ID title: Link to a trace ID -weight: 700 +weight: 800 +aliases: + - ../link-trace-id/ # /docs/grafana/latest/datasources/tempo/link-trace-id/ + refs: configure-grafana-feature-toggles: - pattern: /docs/grafana/ @@ -69,10 +72,10 @@ You can link to Tempo traces from logs or metrics. You can link to Tempo traces from logs in Loki, Elasticsearch, Splunk, and other logs data sources by configuring an internal link. -To configure this feature, see the [Derived fields]({{< relref "../loki#configure-derived-fields" >}}) section of the Loki data source docs or the [Data links]({{< relref "../elasticsearch#data-links" >}}) section of the Elasticsearch or Splunk data source docs. +To configure this feature, refer to the [Derived fields](../../loki#configure-derived-fields) section of the Loki data source docs or the [Data links](../../elasticsearch#data-links) section of the Elasticsearch or Splunk data source docs. ## Link to a trace ID from metrics You can link to Tempo traces from metrics in Prometheus data sources by configuring an exemplar. -To configure this feature, see the [introduction to exemplars](ref:exemplars) documentation. +To configure this feature, refer to the [Exemplars](ref:exemplars) documentation. diff --git a/docs/sources/explore/trace-integration.md b/docs/sources/explore/trace-integration.md index f9b0779b12d..532bb3ca8f2 100644 --- a/docs/sources/explore/trace-integration.md +++ b/docs/sources/explore/trace-integration.md @@ -157,7 +157,8 @@ The node graph requires data to be returned from the data source in a specific f ## Service graph -A service graph visualizes span metrics, including rates, error rates, and durations (RED), along with service relationships. Once the requirements are configured, this pre-configured view is immediately available. +A service graph visualizes rates, error rates, and durations (RED), along with service relationships. +After the requirements are configured, this pre-configured view is immediately available. For additional information refer to the following documentation: