> ## Documentation Index
> Fetch the complete documentation index at: https://docs.traversal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tempo

> Connect Grafana Tempo to query distributed traces during investigations.

Connecting Tempo allows Traversal to query and analyze distributed traces from your Grafana Tempo instance during incident investigations.

## What Traversal reads

* **Traces** — distributed traces searched by tags and fetched by trace ID

## Setup

<Steps>
  <Step title="Choose how Traversal will reach Tempo">
    <Tabs>
      <Tab title="Direct Tempo endpoint">
        Use this option if Traversal can reach Tempo, a Tempo gateway, or Tempo query-frontend directly.

        If you already view traces in Grafana, start there:

        1. In Grafana, open **Connections > Data sources**.
        2. Select the Tempo data source you use for traces.
        3. Under **Connection**, copy the Tempo URL.

        Enter that URL in Traversal as the base URL of the Tempo HTTP API.

        * **Microservices deployments:** Use the query-frontend URL or a gateway in front of Tempo.
        * **Monolithic deployments:** Use the Tempo base URL.
        * **Grafana Cloud:** Use your stack Tempo URL, which is typically `https://<your-stack>.grafana.net/tempo`.

        Do not enter a trace-specific path such as `/api/traces/<trace_id>`.
      </Tab>

      <Tab title="Grafana datasource proxy">
        Use this option if Traversal should query Tempo through Grafana instead of connecting to Tempo directly.

        1. In Grafana, open **Connections > Data sources**.
        2. Select the Tempo data source you use for traces.
        3. Note the data source UID from the page URL. In Grafana, the edit page URL ends with `/connections/datasources/edit/<uid>` or `/datasources/edit/<uid>`.
        4. Build the Traversal URL as `https://<your-grafana-host>/api/datasources/proxy/uid/<uid>`.

        For example, if your Grafana URL is `https://grafana.example.com` and the data source UID is `tempo`, enter `https://grafana.example.com/api/datasources/proxy/uid/tempo`.

        Do not copy the **Connection > URL** field for this option. That field is the underlying Tempo endpoint, not the Grafana datasource proxy URL.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Configure authentication and tenancy (if required)">
    Traversal can send an optional bearer token and `X-Scope-OrgID` header with either option.

    * If you use a direct Tempo endpoint, the token usually authenticates to a Tempo gateway or reverse proxy.
    * If you use a Grafana datasource proxy URL, the token must authenticate to Grafana or whatever sits in front of Grafana.

    If you are not sure which option to use, ask your Grafana or Tempo administrator which URL Traversal should call directly.

    Only set **Organization ID** if your administrator told you to send the `X-Scope-OrgID` header. In many multi-tenant deployments, the gateway or Grafana proxy adds this header for you.
  </Step>

  <Step title="Configure in Traversal">
    Go to **Company Knowledge > Integrations**, select Tempo, and enter the URL from the option you chose and any optional authentication details.

    Click **Save**.

    If the integration does not work as expected, confirm that you entered either a direct Tempo URL or a Grafana datasource proxy URL, not a trace-specific path, and that any required authentication or tenant headers are configured correctly.
  </Step>
</Steps>

## More information

* [Tempo HTTP API](https://grafana.com/docs/tempo/latest/api_docs/)
* [Grafana integration](/integrations/grafana)
* [Grafana data source HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/data_source/)
* [Locate your stack's URL, user, and password](https://grafana.com/docs/grafana-cloud/send-data/traces/set-up/locate-url-user-password/)
* [Enable multi-tenancy](https://grafana.com/docs/tempo/latest/setup/operator/multitenancy)
