Jaeger data source

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

    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'.
    • Span start time shift - Shift in the start time for the Loki query based on the span start time. In order to extend to the past, you need to use a negative value. Use time interval units like 5s, 1m, 3h. The default is 0.
    • Span end time shift - Shift in the end time for the Loki query based on the span end time. Time units can be used here, for example, 5s, 1m, 3h. The default is 0.
    • Filter by Trace ID - Toggle to append the trace ID to the Loki query.
    • Filter by Span ID - Toggle to append the span ID to the Loki query.

    Node Graph

    This is a configuration for the beta Node Graph visualization. The Node Graph is shown after the trace view is loaded and is disabled by default.

    You can query and display traces from Jaeger via .

    Jaeger - 图2

    You can query by trace ID or use the search form to find traces. To query by trace ID, select the TraceID from the Query type selector and insert the ID into the text input.

    Jaeger - 图4

    • Operation - Field gets populated once you select a service. It then lists the operations related to the selected service. Select All option to query all operations.
    • Tags - Use values in the logfmt format. For example error=true db.statement="select * from User".
    • Min Duration - Filter all traces with a duration higher than the set value. Possible values are 1.2s, 100ms, 500us.
    • Max Duration - Filter all traces with a duration lower than the set value. Possible values are 1.2s, 100ms, 500us.
    • Limit - Limits the number of traces returned.

    You can upload a JSON file that contains a single trace to visualize it. If the file has multiple traces then the first trace is used for visualization.

    Jaeger - 图6

    Here is an example JSON:

    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 documentation for details.

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

    1. datasources:
    2. - name: Jaeger
    3. type: jaeger
    4. uid: jaeger-spectra
    5. access: proxy
    6. url: http://localhost:16686/
    7. basicAuthUser: my_user
    8. editable: true
    9. isDefault: false
    10. tracesToLogs:
    11. # Field with internal link pointing to a Loki data source in Grafana.
    12. # datasourceUid value must match the `datasourceUid` value of the Loki data source.
    13. datasourceUid: loki
    14. tags:
    15. - cluster
    16. - hostname
    17. - namespace
    18. - pod
    19. basicAuthPassword: my_password