Skip to content

Grafana Tempo Search Returns No Results Fix

DodaTech Updated 2026-06-24 3 min read

In this tutorial, you'll learn about Grafana Tempo Search Returns No Results Fix. We cover key concepts, practical examples, and best practices.

Your Grafana Tempo search field shows "no traces found" — the search tags are not configured, the time range has no data, or the ingester search is disabled. Tempo requires specific configuration for its search functionality beyond trace ID lookup.

The Problem

# tempo.yaml — minimal config without search
distributor: ...
ingester: ...
compactor: ...

The trace ID lookup works (/api/traces/{traceID}) but the search API returns empty. Tempo's search feature requires the ingester to index span attributes for search.

Step-by-Step Fix

ingester:
  lifecycler: ...
  trace_idle_period: 10s
  max_block_duration: 5m
  # Enable search on ingester data
  search:
    enabled: true

2. Configure search tags

# tempo.yaml
search_tags:
  - service.name
  - http.method
  - http.status_code
  - http.url
  - db.system
  - span.kind

3. Configure search limits

# tempo.yaml
overrides:
  defaults:
    search:
      max_duration: 24h        # Max time range for search
      max_spans_per_span_set: 100
      max_results: 10000

4. Query via Grafana Explore

# Use Grafana Explore with Tempo data source:
# 1. Select "Tempo" as data source
# 2. Select "Search" query type
# 3. Add filters:
#    - resource.service.name = "payment-service"
#    - span.http.status_code >= 400
# 4. Set time range to last 1h
# 5. Click "Run query"
// TraceQL is more powerful than the search API
{ resource.service.name = "payment-service" && span.http.status_code >= 400 }

Expected output:

Search results: 23 traces found in last 1h
  Trace 1: payment-service → POST /api/orders (500) 234ms
  Trace 2: payment-service → GET /api/users (401) 12ms
  ...

Prevention Tips

  • Enable ingester.search.enabled for search on recent traces
  • Configure search_tags with relevant span and resource attributes
  • Use TraceQL for complex queries beyond simple tag matching
  • Set appropriate max_duration limits for search performance
  • Use trace ID lookup for known problematic traces
  1. Using head and tail instead of pattern matching, causing runtime errors on empty lists
  2. Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks
  3. Using return to exit a function early instead of wrapping a pure value in the monad

These mistakes appear frequently in real-world GRAFANA code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

Practice Exercise

Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

FAQ

### What's the difference between search and TraceQL?

Search is a simpler tag-based query (key=value) that returns traces matching ALL specified tags. TraceQL is a more powerful query language supporting boolean operators, duration filters, nested conditions, and aggregations. TraceQL is the recommended approach for Tempo.

Why does search only return recent traces?

Tempo stores traces in the ingester (recent, searchable) and in the backend store (older, indexed by trace ID only). Search is optimized for recent data. For older traces, use TraceQL with a wider time range or enable search.backend_cache for improved backend search performance.

Can I search by trace ID in the Grafana UI?

Yes, in Grafana Explore with Tempo data source, select the "TraceID" query type and enter the trace ID. This returns the complete trace regardless of age, using the /api/traces/{traceID} endpoint.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro