[DOC] Update Tempo and Pyroscope data source doc (#91704)

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
This commit is contained in:
Kim Nylander
2024-08-13 10:39:55 -04:00
committed by GitHub
co-authored by Isabel Matwawana
parent d779dfb0a2
commit b03a709500
7 changed files with 338 additions and 207 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ labels:
- cloud
- enterprise
- oss
title: Grafana Pyroscope
weight: 1150
title: Pyroscope
weight: 1350
refs:
flame-graph:
- pattern: /docs/grafana/
@@ -33,98 +33,93 @@ refs:
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/tempo/configure-tempo-data-source/
- pattern: /docs/grafana-cloud/
destination: docs/grafana-cloud/connect-externally-hosted/data-sources/tempo/configure-tempo-data-source/
provisioning-data-sources:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
- pattern: /docs/grafana-cloud/provision
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
---
# Configure the Grafana Pyroscope data source
To configure basic settings for the data source, complete the following steps:
The Pyroscope data source sets how Grafana connects to your Pyroscope database.
1. Click **Connections** in the left-side menu.
1. Under Your connections, click **Data sources**.
1. Enter `Grafana Pyroscope` in the search bar.
1. Select **Add new data source**.
1. Click **Grafana Pyroscope** to display the **Settings** tab of the data source.
1. Set the data source's basic configuration options.
1. Select **Save & test**.
## Configuration options
You can configure several options for the Pyroscope data source, including the name, HTTP, authentication, querying, and private data source connect.
You can configure the data source using either the data source interface in Grafana or using a configuration file.
This page explains how to set up and enable the data source capabilities using Grafana.
If you make any changes, select **Save & test** to preserve those changes.
![Configuration options for the Pyroscope data source](/media/docs/grafana/data-sources/screenshot-pyroscope-data-source-config.png)
If you're using your own installation of Grafana, you can provision the Pyroscope data source using a YAML configuration file.
For more information about provisioning and available configuration options, refer to [Provisioning Grafana](ref:provisioning-data-sources).
### Name and default
## Before you begin
**Name**
: Enter a name to specify the data source in panels, queries, and Explore.
To configure a Pyroscope data source, you need administrator rights to your Grafana instance and a Pyroscope instance configured to send data to Grafana.
**Default**
: The default data source is pre-selected for new panels.
If you're provisioning a Pyroscope data source, then you also need administrative rights on the server hosting your Grafana instance.
### HTTP
## Add or modify a data source
The HTTP section is shown in number 1 in the screenshot.
You can use these procedures to configure a new Pyroscope data source or to edit an existing one.
**URL**
: The URL of the Grafana Pyroscope instance, for example, `https://localhost:4100`.
### Create a new data source
**Allowed cookies**
: The Grafana Proxy deletes forwarded cookies. Use this field to specify cookies by name that should be forwarded to the data source.
To configure basic settings for the data source, complete the following steps:
**Timeout**
: HTTP request timeout in seconds.
1. Select **Connections** in the main menu.
1. Enter `Grafana Pyroscope` in the search bar.
1. Select **Grafana Pyroscope**.
1. Select **Add new data source** in the top-right corner of the page.
1. On the **Settings** tab, complete the **Name**, **Connection**, and **Authentication** sections.
### Auth
- Use the **Name** field to specify the name used for the data source in panels, queries, and Explore. Toggle the **Default** switch for the data source to be pre-selected for new panels.
- Under **Connection**, enter the **URL** of the Pyroscope instance. For example, `https://example.com:4100`.
- Complete the [**Authentication** section](#authentication).
The Auth section is shown in number 2 in the screenshot.
1. Optional: Use **Additional settings** to configure other options.
1. Select **Save & test**.
**Basic auth**
: Enable basic authentication to the data source. When activated, it provides **User** and **Password** fields.
### Update an existing data source
**With Credentials**
: Whether credentials, such as cookies or auth headers, should be sent with cross-site requests.
To modify an existing Pyroscope data source:
**TLS Client Auth**
: Toggle on to use client authentication. When enabled, it adds the **Server name**, **Client cert**, and **Client key** fields. The client provides a certificate that is validated by the server to establish the client's trusted identity. The client key encrypts the data between client and server. These details are encrypted and stored in the Grafana database.
1. Select **Connections** in the main menu.
1. Select **Data sources** to view a list of configured data sources.
1. Select the Pyroscope data source you wish to modify.
1. Optional: Use **Additional settings** to configure or modify other options.
1. After completing your updates, select **Save & test**.
**With CA Cert**
: Activate this option to verify self-signed TLS certificates.
## Authentication
**Skip TLS Verify**
: When activated, it bypasses TLS certificate verification.
Use this section to select an authentication method to access the data source.
**Forward OAuth Identity**
: When activated, the user’s upstream OAuth 2.0 identity is forwarded to the data source along with their access token.
{{< admonition type="note" >}}
Use Transport Layer Security (TLS) for an additional layer of security when working with Pyroscope.
For additional information on setting up TLS encryption with Pyroscope, refer to [Pyroscope configuration](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-server/reference-configuration-parameters/).
{{< /admonition >}}
**Custom HTTP Headers**
: Select Add header to add Header and Value fields.
[//]: # 'Shared content for authentication section procedure in data sources'
**Header**
: Add a custom header. This allows custom headers to be passed based on the needs of your Pyroscope instance.
{{< docs/shared source="grafana" lookup="datasources/datasouce-authentication.md" leveloffset="+2" version="<GRAFANA_VERSION>" >}}
**Value**
: The value of the header.
## Additional settings
Use the down arrow to expand the **Additional settings** section to view these options.
### Advanced HTTP settings
The Grafana Proxy deletes forwarded cookies. Use the **Allowed cookies** field to specify cookies that should be forwarded to the data source by name.
The **Timeout** field sets the HTTP request timeout in seconds.
### Querying
The **Querying** section is shown in number 3 in the screenshot.
**Minimum step** is used for queries returning time-series data. The default value is 15 seconds.
Adjusting this option can help prevent gaps when you zoom in to profiling data.
### Private data source connect
The **Private data source connect** section is shown in number 4 in the screenshot.
[//]: # 'Shared content for authentication section procedure in data sources'
This feature is only available in Grafana Cloud.
This option lets you query data that lives within a secured network without opening the network to inbound traffic from Grafana Cloud.
Use the drop-down box to select a configured private data sources.
Select **Manage private data source connect** to configure and manage any private data sources you have configured.
For more information, refer to [Private data source connect](https://grafana.com/docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/).
{{< docs/shared source="grafana" lookup="datasources/datasouce-private-ds-connect.md" leveloffset="+2" version="<GRAFANA_VERSION>" >}}
@@ -47,7 +47,7 @@ refs:
provisioning-data-sources:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
- pattern: /docs/grafana-cloud/
- pattern: /docs/grafana-cloud/provision
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
explore:
- pattern: /docs/grafana/
@@ -56,66 +56,108 @@ refs:
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
---
# Configure the Tempo data source
# Configure a Tempo data source
The Tempo data source sets how Grafana connects to your Tempo database and lets you configure features and integrations with other telemetry signals.
To configure basic settings for the Tempo data source, complete the following steps:
You can configure the data source using either the data source interface in Grafana or using a configuration file.
This page explains how to set up and enable the data source capabilities using Grafana.
1. Click **Connections** in the left-side menu.
1. Under Your connections, click **Data sources**.
1. Enter `Tempo` in the search bar.
1. Select **Tempo**.
If you're using your own installation of Grafana, you can provision the Tempo data source using a YAML configuration file.
1. On the **Settings** tab, set the data source's basic configuration options:
Depending upon your tracing environment, you may have more than one Tempo instance.
Grafana supports multiple Tempo data sources.
| Name | Description |
| -------------- | ------------------------------------------------------------------------ |
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
| **Default** | Sets the data source that's pre-selected for new panels. |
| **URL** | Sets the URL of the Tempo instance, such as `http://tempo`. |
| **Basic Auth** | Enables authentication to the Tempo data source. |
| **User** | Sets the user name for basic authentication. |
| **Password** | Sets the password for basic authentication. |
## Before you begin
You can also configure settings specific to the Tempo data source.
To configure a Tempo data source, you need administrator rights to your Grafana instance and a Tempo instance configured to send tracing data to Grafana.
This video explains how to add data sources, including Loki, Tempo, and Mimir, to Grafana and Grafana Cloud. Tempo data source set up starts at 4:58 in the video.
If you're provisioning a Tempo data source, then you also need administrative rights on the server hosting your Grafana instance.
Refer to [Provision the data source](#provision-the-data-source) for next steps.
{{< youtube id="cqHO0oYW6Ic" start="298" >}}
![Provisioned data source warning](/media/docs/grafana/data-sources/tempo/tempo-data-source-provisioned-error.png)
## Add or modify a data source
You can use these procedures to configure a new Tempo data source or to edit an existing one.
### Add a new data source
Follow these steps to set up a new Tempo data source:
1. Select **Connections** in the main menu.
1. Enter `Tempo` in the search bar.
1. Select **Tempo**.
1. Select **Add new data source** in the top-right corner of the page.
1. On the **Settings** tab, complete the **Name**, **Connection**, and **Authentication** sections.
- Use the **Name** field to specify the name used for the data source in panels, queries, and Explore. Toggle the **Default** switch for the data source to be pre-selected for new panels.
- Under **Connection**, enter the **URL** of the Tempo instance, for example, `https://example.com:4100`.
- Complete the [**Authentication** section](#authentication).
1. Optional: Configure other sections to add capabilities to your tracing data. Refer to the additional procedures for instructions.
1. Select **Save & test**.
### Update an existing data source
To modify an existing Tempo data source:
1. Select **Connections** in the main menu.
1. Select **Data sources** to view a list of configured data sources.
1. Select the Tempo data source you wish to modify.
1. Configure or update additional sections to add capabilities to your tracing data. Refer to the additional procedures for instructions.
1. After completing your updates, select **Save & test**.
## Authentication
Use this section to select an authentication method to access the data source.
{{< admonition type="note" >}}
Use Transport Layer Security (TLS) for an additional layer of security when working with Tempo.
For additional information on setting up TLS encryption with Tempo, refer to [Configure TLS communication](https://grafana.com/docs/tempo/<TEMPO_VERSION>/configuration/network/tls/) and [Tempo configuration](https://grafana.com/docs/tempo/<TEMPO_VERSION>/configuration/).
{{< /admonition >}}
[//]: # 'Shared content for authentication section procedure in data sources'
{{< docs/shared source="grafana" lookup="datasources/datasouce-authentication.md" leveloffset="+2" version="<GRAFANA_VERSION>" >}}
## Streaming
<!-- The traceQLStreaming toggle will be deprecated in Grafana 11.2 and removed in 11.3. -->
Streaming enables TraceQL query results to be displayed as they become available. Without streaming, no results are displayed until all results have returned.
Streaming enables TraceQL query results to be displayed as they become available.
Without streaming, no results are displayed until all results have returned.
{{< docs/public-preview product="TraceQL streaming results" >}}
### Requirements
To use streaming, you need to:
- Be running Tempo version 2.2 or newer, or Grafana Enterprise Traces (GET) version 2.2 or newer, or be using Grafana Cloud Traces.
- Run Tempo version 2.2 or newer, or Grafana Enterprise Traces (GET) version 2.2 or newer, or use Grafana Cloud Traces.
- 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 disabled.
### Activate streaming
For streaming to work for a particular Tempo data source, set your Grafana's `traceQLStreaming` [feature toggle](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/feature-toggles/) to true and set **Streaming** to enabled in your Tempo data source configuration.
You can activate streaming by either setting the `traceQLStreaming` [feature toggle](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/feature-toggles/) to true or by activating the **Streaming** toggle in the Tempo data source.
![Streaming section in Tempo data source](/media/docs/grafana/data-sources/tempo-data-source-streaming-v11.2.png)
If you are using Grafana Cloud, the `traceQLStreaming` feature toggle is already set to `true` by default.
If the Tempo data source is set to allow streaming but the `traceQLStreaming` feature toggle is set to `false` in Grafana, no streaming will occur.
If the Tempo data source is set to allow streaming but the `traceQLStreaming` feature toggle is set to `false` in Grafana, streaming occurs.
If the data source has streaming disabled and `traceQLStreaming` is set to `true`, no streaming will happen for that data source.
If the data source has streaming disabled and `traceQLStreaming` is set to `true`, streaming happens for that data source.
When streaming is active, it's shows as **Enabled** in **Explore**.
To check the status, select Explore in the menu, select your Tempo data source, and expand the **Options** section.
![The Explore screen shows the Tempo data source with streaming active](/media/docs/grafana/data-sources/tempo/tempo-query-stream-active.png)
## Trace to logs
The **Trace to logs** setting configures [trace to logs](ref:explore-trace-integration) that's available when you integrate Grafana with Tempo.
Trace to logs can also be used with other tracing data sources, such as Jaeger and Zipkin.
![Trace to logs settings](/media/docs/tempo/tempo-trace-to-logs-9-4.png)
![Trace to logs settings](/media/docs/grafana/data-sources/tempo/tempo-data-source-trace-to-logs.png)
There are two ways to configure the trace to logs feature:
@@ -171,7 +213,9 @@ There are two ways to configure the trace to metrics feature:
- Use a basic configuration with a default query, or
- Configure one or more custom queries where you can use a [template language](ref:variable-syntax) to interpolate variables from the trace or span.
Refer to the Trace to metrics configuration options section to learn about the available options.
Refer to the [Trace to metrics configuration options](#trace-tometrics-configuration-options) section to learn about the available options.
![Trace to metrics settings in the Tempo data source](/media/docs/grafana/data-sources/tempo/tempo-data-source-trace-to-metrics.png)
### Set up a simple configuration
@@ -233,7 +277,7 @@ To use custom queries with the configuration, follow these steps:
[//]: # 'Shared content for Trace to profiles in the Tempo data source'
{{< docs/shared source="grafana" lookup="datasources/tempo-traces-to-profiles.md" leveloffset="+1" version="<GRAFANA_VERSION>" >}}
{{< docs/shared source="grafana" lookup="datasources/tempo-traces-to-profiles.md" leveloffset="+2" version="<GRAFANA_VERSION>" >}}
## Custom query variables
@@ -252,27 +296,37 @@ For example, `${__span.name}`.
| **\_\_trace.duration** | The duration of the trace. |
| **\_\_trace.name** | The name of the trace. |
## Service Graph
## Additional settings
The **Service Graph** setting configures the [Service Graph](/docs/tempo/latest/metrics-generator/service_graphs/enable-service-graphs/) feature.
Use the down arrow to expand the **Additional settings** section to view these options.
### Advanced HTTP settings
The Grafana Proxy deletes forwarded cookies. Use the **Allowed cookies** field to specify cookies by name that should be forwarded to the data source.
The **Timeout** field sets the HTTP request timeout in seconds.
### Service graph
The **Service graph** setting configures the [Service Graph](/docs/tempo/latest/metrics-generator/service_graphs/enable-service-graphs/) data.
Configure the **Data source** setting to define in which Prometheus instance the Service Graph data is stored.
To use the Service Graph, refer to the [Service Graph documentation](#use-the-service-graph).
## Node Graph
### Node graph
The **Node Graph** setting enables the [node graph visualization](ref:node-graph), which is disabled by default.
The **Node graph** setting enables the [node graph visualization](ref:node-graph), which isn't activated by default.
Once enabled, Grafana displays the node graph above the trace view.
Once activated, Grafana displays the node graph above the trace view.
## Tempo search
### Tempo search
The **Search** setting configures [Tempo search](/docs/tempo/latest/configuration/#search).
You can configure the **Hide search** setting to hide the search query option in **Explore** if search is not configured in the Tempo instance.
## TraceID query
### TraceID query
The **TraceID query** setting modifies how TraceID queries are run. The time range can be used when there are performance issues or timeouts since it will narrow down the search to the defined range. This setting is disabled by default.
@@ -284,7 +338,7 @@ You can configure this setting as follows:
| **Time shift start** | Time shift for start of search. Default: `30m`. |
| **Time shift end** | Time shift for end of search. Default: `30m`. |
## Span bar
### Span bar
The **Span bar** setting helps you display additional information in the span bar row.
@@ -296,12 +350,30 @@ You can choose one of three options:
| **Duration** | _(Default)_ Displays the span duration on the span bar row. |
| **Tag** | Displays the span tag on the span bar row. You must also specify which tag key to use to get the tag value, such as `component`. |
### Private data source connect
[//]: # 'Shared content for authentication section procedure in data sources'
{{< docs/shared source="grafana" lookup="datasources/datasouce-private-ds-connect.md" leveloffset="+2" version="<GRAFANA_VERSION>" >}}
## Provision the data source
You can define and configure the Tempo data source in YAML files as part of Grafana's provisioning system.
You can define and configure the Tempo data source in YAML files as part of the Grafana provisioning system.
Provisioning is primarily used Grafana instances that don't use Grafana Cloud.
You can use version control, like git, to track and manage file changes.
Changes can be updated or rolled back as needed.
For more information about provisioning and available configuration options, refer to [Provisioning Grafana](ref:provisioning-data-sources).
Example provision YAML file:
{{< admonition type="note" >}}
You can't modify a provisioned data source using the Tempo data source settings in Grafana.
Grafana displays a message for provisioned data sources.
{{< /admonition >}}
### Example file
This example provision YAML file sets up the equivalents of the options available in the Tempo data source user interface.
```yaml
apiVersion: 1