docs/sources/datasources/jaeger/query-editor/index.md
This document explains how to use the Jaeger query editor to search for traces, query by trace ID, visualize service dependencies, and import trace files.
For general information about querying data sources in Grafana, refer to Query and transform data.
The Jaeger query editor supports the following query types:
To search for traces:
| Field | Description |
|---|---|
| Service Name | Select a service from the drop-down list, or type to filter. Supports template variables. |
| Operation Name | Select an operation for the chosen service. Select All to query all operations. This field is disabled until you select a service. |
| Tags | Enter tags in logfmt format, such as error=true db.statement="select * from User". |
| Min Duration | Filter traces with a duration greater than this value. Use formats like 1.2s, 100ms, or 500us. |
| Max Duration | Filter traces with a duration less than this value. Use the same format as Min Duration. |
| Limit | Maximum number of traces to return. |
{{< figure src="/static/img/docs/explore/jaeger-search-form.png" class="docs-image--no-shadow" caption="Jaeger query editor showing a search query" >}}
To query a specific trace:
{{< figure src="/static/img/docs/explore/jaeger-trace-id.png" class="docs-image--no-shadow" caption="Jaeger query editor with TraceID selected" >}}
The dependency graph query type displays service dependencies as a Node Graph. It shows how services communicate and the volume of calls between them.
To visualize the dependency graph:
The dependency graph uses the dashboard time range to query the Jaeger /api/dependencies endpoint. Grafana displays the result as a Node Graph with:
{{< admonition type="note" >}} Your Jaeger instance must have dependency data available. If the graph is empty, verify that Jaeger is collecting and processing dependency information for the selected time range. {{< /admonition >}}
You can upload a JSON file that contains a single trace and visualize it in Grafana. If the file contains multiple traces, Grafana visualizes the first trace.
To import a trace:
{{< figure src="/static/img/docs/explore/jaeger-upload-json.png" class="docs-image--no-shadow" caption="Jaeger data source with import trace selected" >}}
The JSON file must follow the Jaeger trace format with a data array containing trace objects:
{
"data": [
{
"traceID": "2ee9739529395e31",
"spans": [
{
"traceID": "2ee9739529395e31",
"spanID": "2ee9739529395e31",
"flags": 1,
"operationName": "CAS",
"references": [],
"startTime": 1616095319593196,
"duration": 1004,
"tags": [
{
"key": "sampler.type",
"type": "string",
"value": "const"
}
],
"logs": [],
"processID": "p1",
"warnings": null
}
],
"processes": {
"p1": {
"serviceName": "loki-all",
"tags": [
{
"key": "jaeger.version",
"type": "string",
"value": "Go-2.25.0"
}
]
}
},
"warnings": null
}
],
"total": 0,
"limit": 0,
"offset": 0,
"errors": null
}
Jaeger offers an alternative method for querying data that uses their gRPC service over HTTP. For detailed information about the API and setup requirements, refer to the Jaeger API documentation.
The following queries are supported through the gRPC endpoint:
To enable gRPC querying for Jaeger within Grafana, enable the jaegerEnableGrpcEndpoint feature flag. Grafana Cloud customers should contact support to request access and provide feedback on this feature.
The Jaeger query editor supports Grafana template variables for creating dynamic, reusable dashboards. You can use template variables in the following query fields:
Use standard Grafana variable syntax such as $variable or ${variable} in these fields. For example, set Service Name to $service to let dashboard users select the service from a drop-down list.