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.

Enterprise Open source

Jaeger data source

Grafana ships with built-in support for Jaeger, which provides open source, end-to-end distributed tracing. Just add it as a data source and you are ready to query your traces in Explore.

Add data source

To access Jaeger settings, click the Configuration (gear) icon, then click Data Sources > Jaeger.

NameThe data source name in panels, queries, and Explore.
DefaultThe pre-selected data source for a new panel.
URLThe URL of the Jaeger instance. For example, http://localhost:16686.
Basic AuthEnable basic authentication for the Jaeger data source.
UserSpecify a user name for basic authentication.
PasswordSpecify a password for basic authentication.

Trace to logs

Note: This feature is available in Grafana 7.4+.

This is a configuration for the trace to logs feature. Select target data source (at this moment limited to Loki data sources) and select which tags will be used in the logs query.

  • Data source - Target data source.
  • Tags - The tags that will be used in the Loki query. Default is 'cluster', 'hostname', 'namespace', 'pod'.

Trace to logs settings

Query traces

You can query and display traces from Jaeger via Explore.

Screenshot of the Jaeger query editor
Screenshot of the Jaeger query editor

The Jaeger query editor allows you to query by trace ID directly or selecting a trace from trace selector. To query by trace ID, insert the ID into the text input.

Screenshot of the Jaeger query editor with trace selector expanded
Screenshot of the Jaeger query editor with trace selector expanded

Use the trace selector to pick particular trace from all traces logged in the time range you have selected in Explore. The trace selector has three levels of nesting:

  1. The service you are interested in.
  2. Particular operation is part of the selected service.
  3. Specific trace in which the selected operation occurred, represented by the root operation name and trace duration.

Linking Trace ID from logs

You can link to Jaeger trace from logs in Loki by configuring a derived field with internal link. See the Derived fields section in the Loki data source documentation for details.

Configure the data source with provisioning

You can set up the data source via configuration files with Grafana’s provisioning system. Refer to provisioning docs page for information on various settings and how it works.

Here is an example with basic auth and trace-to-logs field.

apiVersion: 1

  - name: Jaeger
    type: jaeger
    uid: jaeger-spectra
    access: proxy
    url: http://localhost:16686/
    basicAuth: true
    basicAuthUser: my_user
    editable: true
    isDefault: false
            # Field with internal link pointing to a Loki data source in Grafana.
            # datasourceUid value must match the `datasourceUid` value of the Loki data source.
            datasourceUid: loki
              - cluster
              - hostname
              - namespace
              - pod
        basicAuthPassword: my_password