Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Zipkin data source
Grafana ships with built-in support for Zipkin, an open source, distributed tracing system.
For instructions on how to add a data source to Grafana, refer to the administration documentation. Only users with the organization administrator role can add data sources. Administrators can also configure the data source via YAML with Grafana’s provisioning system.
Once you’ve added the Zipkin data source, you can configure it so that your Grafana instance’s users can create queries in its query editor when they build dashboards and use Explore.
Configure the data source
To access the data source configuration page:
- Hover the cursor over the Configuration (gear) icon.
- Select Data Sources.
- Select the Zipkin data source.
Set the data source’s basic configuration options carefully:
Configure trace to logs

Note: Available in Grafana v7.4 and higher.
The Trace to logs setting configures the trace to logs feature that is available when you integrate Grafana with Zipkin.
To configure trace to logs:
Select the target data source.
Select which tags to use in the logs query. The tags you configure must be present in the spans attributes or resources for a trace to logs span link to appear.
- Single tag
- Configuring
job
as a tag and clicking on a span link will take you to your configured logs datasource with the query{job='value from clicked span'}
.
- Configuring
- Multiple tags
- If multiple tags are used they will be concatenated so the logs query would look like
{job='value from clicked span', service='value from clicked span'}
.
- If multiple tags are used they will be concatenated so the logs query would look like
- Mapped tags
- For a mapped tag
service.name
with valueservice
, clicking on a span link will take you to your configured logs datasource with the query{service='value from clicked span'}
instead of{service.name='value from clicked span'}
. - This is useful for instances where your tracing datasource tags and your logs datasource tags don’t match one-to-one.
- For a mapped tag
- Single tag
The following table describes the ways in which you can configure your trace to logs settings:
Configure trace to metrics
Note: This feature is behind the
traceToMetrics
feature toggle.
The Trace to metrics section configures the trace to metrics feature.
Use the settings to select the target Prometheus data source, and create any desired linked queries.
Each linked query consists of:
- Link Label: (Optional) Descriptive label for the linked query.
- Query: The query ran when navigating from a trace to the metrics data source.
Interpolate tags using the
$__tags
keyword. For example, when you configure the queryrequests_total{$__tags}
with the tagsk8s.pod=pod
andcluster
, the result looks likerequests_total{pod="nginx-554b9", cluster="us-east-1"}
.
Enable Node Graph
The Node Graph setting enables the Node Graph visualization, which is disabled by default.
Once enabled, Grafana displays the Node Graph after loading the trace view.
Configure the span bar label
The Span bar label section helps you display additional information in the span bar row.
You can choose one of three options:
Query traces
You can query and display traces from Zipkin via Explore.
This topic explains configuration and queries specific to the Zipkin data source. For general documentation on querying data sources in Grafana, see Query and transform data.

To query by trace ID, enter it.

To select a particular trace from all traces logged in the time range you have selected in Explore, you can also query by trace selector. The trace selector has three levels of nesting:
- The service you’re interested in.
- Particular operation, part of the selected service
- Specific trace in which the selected operation occurred, represented by the root operation name and trace duration
View data mapping in the trace UI
You can view Zipkin annotations in the trace view as logs with annotation value displayed under the annotation key.
Upload a JSON trace file
You can upload a JSON file that contains a single trace and visualize it. If the file has multiple traces, Grafana visualizes its first trace.

Trace JSON example
[
{
"traceId": "efe9cb8857f68c8f",
"parentId": "efe9cb8857f68c8f",
"id": "8608dc6ce5cafe8e",
"kind": "SERVER",
"name": "get /api",
"timestamp": 1627975249601797,
"duration": 23457,
"localEndpoint": { "serviceName": "backend", "ipv4": "127.0.0.1", "port": 9000 },
"tags": {
"http.method": "GET",
"http.path": "/api",
"jaxrs.resource.class": "Resource",
"jaxrs.resource.method": "printDate"
},
"shared": true
}
]
Link a trace ID from logs
You can link to a Zipkin trace from logs in Loki or Splunk by configuring a derived field with an internal link.
For details, refer to Derived fields section of the Loki data source documentation.