From d6e84dbf0aa6e6b94e40c5f104a71806e5495d67 Mon Sep 17 00:00:00 2001 From: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> Date: Fri, 19 Apr 2024 15:17:11 -0400 Subject: [PATCH] [DOC] Update the traces to profile content based upon SDK updates (#86628) Update the traces to profile content based upon SDK updates --- .../datasources/tempo-traces-to-profiles.md | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/docs/sources/shared/datasources/tempo-traces-to-profiles.md b/docs/sources/shared/datasources/tempo-traces-to-profiles.md index 02c4edd3fb7..b433c4b4d79 100644 --- a/docs/sources/shared/datasources/tempo-traces-to-profiles.md +++ b/docs/sources/shared/datasources/tempo-traces-to-profiles.md @@ -29,32 +29,36 @@ There are two ways to configure the trace to profiles feature: - Configure a custom query where you can use a template language to interpolate variables from the trace or span. {{< admonition type="note">}} -Traces to profile requires a Tempo data source with Traces to profiles configured and a Pyroscope data source. This integration supports profile data generated using [Go](/docs/pyroscope//configure-client/trace-span-profiles/go-span-profiles/), [Ruby](/docs/pyroscope//configure-client/trace-span-profiles/ruby-span-profiles/), and [Java](/docs/pyroscope//configure-client/trace-span-profiles/java-span-profiles/) instrumentation SDKs. +Traces to profile requires a Tempo data source with Traces to profiles configured and a Pyroscope data source. As with traces, your application needs to be instrumented to emit profiling data. For more information, refer to [Linking tracing and profiling with span profiles](/docs/pyroscope//configure-client/trace-span-profiles/). {{< /admonition >}} -To use trace to profiles, navigate to **Explore** and query a trace. Each span now links to your queries. Clicking a link runs the query in a split panel. If tags are configured, Grafana dynamically inserts the span attribute values into the query. The query runs over the time range of the (span start time - 60) to (span end time + 60 seconds). +To use trace to profiles, navigate to **Explore** and query a trace. +Each span links to your queries. Clicking a link runs the query in a split panel. +If tags are configured, Grafana dynamically inserts the span attribute values into the query. +The query runs over the time range of the (span start time - 60) to (span end time + 60 seconds). ![Selecting a link in the span queries the profile data source](/media/docs/tempo/profiles/tempo-trace-to-profile.png) -To use trace to profiles, you must have a configured Grafana Pyroscope data source. For more information, refer to the [Grafana Pyroscope data source](/docs/grafana//datasources/grafana-pyroscope/) documentation. +To use trace to profiles, you must have a configured Grafana Pyroscope data source. +For more information, refer to the [Grafana Pyroscope data source](/docs/grafana//datasources/grafana-pyroscope/) documentation. -**Embedded flame graphs** are also inserted into each span details section that has a linked profile (requires a configured Grafana Pyroscope data source). +**Embedded flame graphs** are also inserted into each span details section that has a linked profile. This lets you see resource consumption in a flame graph visualization for each span without having to navigate away from the current view. -Hover over a particular block in the flame graph to see more details about the resources being consumed. +Hover over a particular block in the flame graph to see more details about the consumed resources. ## Configuration options The following table describes options for configuring your Trace to profiles settings: -| Setting name | Description | -| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Data source** | Defines the target data source. You can currently select a Pyroscope \[profiling\] data source. | -| **Tags** | Defines the tags to use in the profile query. Default: `cluster`, `hostname`, `namespace`, `pod`, `service.name`, `service.namespace`. You can change the tag name for example to remove dots from the name if they are not allowed in the target data source. For example, map `http.status` to `http_status`. | -| **Profile type** | Defines the profile type that used in the query. | -| **Use custom query** | Toggles use of custom query with interpolation. | -| **Query** | Input to write custom query. Use variable interpolation to customize it with variables from span. | +| Setting name | Description | +| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Data source** | Defines the target data source. You can select a Pyroscope \[profiling\] data source. | +| **Tags** | Defines the tags to use in the profile query. Default: `cluster`, `hostname`, `namespace`, `pod`, `service.name`, `service.namespace`. You can change the tag name for example to remove dots from the name if they're not allowed in the target data source. For example, map `http.status` to `http_status`. | +| **Profile type** | Defines the profile type that used in the query. | +| **Use custom query** | Toggles use of custom query with interpolation. | +| **Query** | Input to write custom query. Use variable interpolation to customize it with variables from span. | ## Use a basic configuration