Tempo log correlation - expect to see all logs in parent span

Hi,

I’ve been testing out Grafana Cloud, specifically log correlation with Tempo and Loki.

All seems good, I can find traces and view the logs within the top-level span. However, I’ve tested adding child spans within the trace and I’ve noticed I don’t get all the logs within the top-level span anymore.

I guess this makes sense because logs emitted in the child span have a different spanid, so they’re filtered out of the parent span. However, it would make more sense to me if we could view all the logs within a span AND its descendant spans.

To me, this should filter out the logs of the span’s parent and siblings, but keep logs within this span and its children.

Alternatively, it seems there needs to be a button to view logs for the trace. In Grafana 11.2.2 (the latest release from 1 Oct 2024), there are only View Logs buttons next to the spans, so you’re forced to click through each of them to see each set of logs. If there was a View Logs button on the trace itself this would help solve this issue.

Example:

Viewing logs of the parent span/trace shows no logs (the example code didn’t log anything in the parent span directly):

Viewing the logs in the child span shows a log:

Again, I think it would be a lot better UX to see all logs descending from a span rather than hard filtering logs only for that specific span id

Cheers