Skip to main content
Version: 0.6.5

Trace analytics with Grafana

In this tutorial, we will set up a Grafana Dashboard showing Quickwit traces using Docker Compose.

You only need a few minutes to get Grafana working with Quickwit and build meaningful dashboards.

Create a Docker Compose recipe

Let's add a Quickwit instance with the OTLP service enabled.

version: '3.0'
image: quickwit/quickwit
OTEL_EXPORTER_OTLP_ENDPOINT: "http://localhost:7281"
- 7280:7280
command: ["run"]

Then we create a Grafana service with the Quickwit Datasource plugin.

image: grafana/grafana-oss
container_name: grafana
- "${MAP_HOST_GRAFANA:-}:3000:3000"

Save and run the recipe:

$ docker compose up

You should be able to access Quickwit's UI on http://localhost:7280/ and Grafana's UI on http://localhost:3000/.

Setting up the datasource

In Grafana, head to Data Sources. If the plugin is installed correctly you should be able to find Quickwit in the list.

We're going to set up a new Quickwit data source lookig at Quickwit's own OpenTelemetry traces, let's configure the datasource with the following parameters:

  • URL : http://quickwit:7280/api/v1/ This uses the docker service name as the host
  • Index ID : otel-traces-v0_6
  • Timestamp field : span_start_timestamp_nanos
  • Timestamp output format : unix_timestamp_nanos

Save and test, you should obtain a confirmation that the datasource is correctly set up.

Quickwit Plugin configuration success

Creating a dashboard

You can then create a new dashboard and add a visualization : you should be able to choose our new quickwit datasource here.

Quickwit sends itself its own traces, so you should already have data to display. Let's configure some panels !

  • a Table counting span_names
    • Panel type : Table
    • Query: empty
    • Metric : Count
    • Group by : Terms : span_name : order by Count
  • a Bar Chart showing the amount of tantivy searches per hour :
    • Panel type: Time Series
    • Query : "span_name:tantivy_search"
    • Metric: Count
    • Group by : Date Histogram : span_start_timestamp_nanos : Interval 1h
  • a Bar Chart showing the amount of ERROR logs per hour for the last 6 hours :
    • Panel type: Bar Chart
    • Query: "service_name:quickwit AND events.event_attributes.level:ERROR"
    • Metric: Count
    • Group by : Terms : span_start_timestamp_nanos : Interval 1h
  • another query on the same Bar Chart for WARN logs

The result

Here's what your first dashboard can look like :

Quickwit Panel in Grafana Dashboard