How to jump from traces to logs?

I just read this article, particularly the integration between logs and traces.

I can already jump from logs to traces by using derivedDataFields. But reversely, I’m super interested in how we can jump to logs from a trace (like the image below):

The particle didn’t provide any detailed hint on how to achieve this result. Much appreciated if someone can point me to an example.

Traces to logs currently requires Loki and can be configured under the Tempo datasource.

image

I believe there is also a way to get generic links to work on the span level, but I’m not seeing configuration for it. @connorlindsey or @joeytawadrous may have more info.

Thank you, I should have taken a look at the docs.

But I don’t really understand the values of the tags.

Tags - The tags that will be used in the logs query.

For example, I have this configuration:

    - name: Tempo
      type: tempo
      uid: my-tempo
      access: proxy
      url: http://tempo:3100
      isDefault: false
      jsonData:
        httpMethod: GET
        tracesToLogs:
          datasourceUid: 'my-loki'
          tags: ['app', 'namespace']
        lokiSearch:
          datasourceUid: 'my-loki'

Could you explain in more detail what the role of tags here?

There was a recent slack thread about this also.

To quote Connor:

There needs to be some shared tag between your trace spans and logs for the feature to work correctly. For example, pod, job, app, etc. are good labels on your logs that you could also include on your spans to enable trace to logs.

The tags in common between the logs and spans are what allow the go-between to function.