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

# Tempo

> Connect Tempo for distributed trace search and TraceQL queries during diagnosis

The Tempo integration gives sureops agents access to your Tempo instance for distributed trace search, individual trace retrieval, and TraceQL metric queries — used during diagnosis to identify where in a request path a failure or latency spike originates.

> [!NOTE]
>
> Unlike Prometheus and Loki, Tempo **should be connected even if Grafana is already configured**. The Grafana MCP server does not expose Tempo's full TraceQL surface (trace search, get-trace, and traceql-metrics). Connect Tempo directly to give agents the full distributed tracing capability.

***

## What this integration enables

* **Trace search** — agents search for traces matching service name, span attributes, error status, and time range
* **Individual trace retrieval** — agents pull the complete trace waterfall for a specific trace ID to identify the failing span
* **TraceQL metric queries** — agents use Tempo's `traceql_metrics` API to aggregate trace data into rate, error, and duration metrics
* **Multi-tenant support** — if you run a multi-tenant Tempo, configure the Tenant ID to scope queries to the correct org

***

## Prerequisites

* An environment selected in the top-right context switcher — **Settings → Environment → Integrations** is scoped to that environment and stays disabled until one is selected
* A running Tempo instance reachable from your network
* The `tempo-mcp` server running and reachable from sureops

> [!NOTE]
>
> Integration connections are per-environment. Connecting Tempo here only applies to the environment that was selected in the context switcher at the time — it does not carry over to your other environments. Repeat this connect flow for each environment that needs Tempo.

***

## Setup

**1. Stand up tempo-mcp**

Tempo 2.9 and later ships a built-in MCP server at `/api/mcp` — if you're on Tempo 2.9+, you can likely point sureops directly at that endpoint without deploying a separate MCP server — you still need an ingress or proxy in front of it that checks a bearer token. If you're using the sureops demo environment, `tempo-mcp` is already provisioned in-cluster — you can skip this step.

On an older Tempo version, deploy a standalone MCP server that speaks TraceQL against your Tempo instance's base URL.

**2. Connect in sureops**

In sureops, go to **Settings → Environment → Integrations** and click **Connect** next to Tempo.

Fill in:

* **Integration Name** — prefilled; change it if you need to tell two configurations of this integration apart
* **MCP Server Endpoint** — the URL of your running `tempo-mcp` server (e.g. `https://tempo-mcp.internal.company.com/mcp`)
* **Bearer Token** — the token your `tempo-mcp` endpoint (or the proxy in front of it) expects. sureops always sends this to `tempo-mcp` as an `Authorization: Bearer` header, so there is no authentication method to choose. The form won't save a blank token, so if nothing in front of `tempo-mcp` checks a token, put it behind an ingress or proxy that does.

Click **Save & Connect**.

**3. Configure Tenant ID (after connecting, if needed)**

Once connected, reopen the Tempo integration from **Settings → Environment → Integrations**. If you run a multi-tenant Tempo, a **Settings** section appears below the connection status with a **Tenant ID** field — set it there, not on the connect form. When set, it's sent as the `X-Scope-OrgID` header. There's no system default — `single-tenant` is just an example value, not something to type in unless it's genuinely your tenant ID. Leave it blank for single-tenant Tempo.

***

## Required credentials

Fields collected when you connect the integration:

| Field | Required | Description |
| - | - | - |
| Integration Name | No | Prefilled with a default name; distinguishes two configurations of the same integration in one environment |
| MCP Server Endpoint | Yes | URL of your running `tempo-mcp` server |
| Bearer Token | Yes | Token your `tempo-mcp` endpoint (or the proxy in front of it) expects. Required; sent to `tempo-mcp` as an `Authorization: Bearer` header |

Field configured afterward, via the integration's Settings section once connected:

| Field | Required | Description |
| - | - | - |
| Tenant ID | No | Optional Tempo `X-Scope-OrgID` for multi-tenant deployments. Unset by default — no system default value. |

***

## Common errors

| Error | Fix |
| - | - |
| "No traces found" | Your TraceQL query returned no results. Confirm that your services are emitting traces with `resource.service.name` set and that they are being ingested by Tempo. |
| "Connection timed out" | Your `tempo-mcp` server is not reachable from sureops. Check network accessibility and port configuration. |
| Unexpected or missing traces when pointed at Tempo's built-in MCP (2.9+) | The connection token isn't enforced by Tempo's built-in `/api/mcp` server — it's accepted but ignored, so a wrong token won't surface as a 401. If you're seeing traces from the wrong tenant or none at all, the cause is upstream of auth: confirm the URL you're pointed at resolves to the correct Tempo tenant/instance rather than assuming the token is the problem. (A standalone `tempo-mcp` proxy in front of an older Tempo version may enforce its own token checking — this caveat is specific to Tempo's built-in server.) |

***

## Official documentation

* [Tempo documentation](https://grafana.com/docs/tempo/latest/)
* [TraceQL reference](https://grafana.com/docs/tempo/latest/traceql/)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.