I’m doing some tests with Tempo and Loki and I noticed that I have logs that are associated with a particular span (when you click on “logs” on a span). But some of them are not associated at all. I’m using the opentelemetry implementation in Golang for the traces, and slog for the logs, so there is no context correlation and I’m not adding any trace id. It’s just “vanilla” configuration.
How link between traces and logs is done in Grafana and how can I make it better?
This sounds like the answer is very likely “it depends”. Is there an example you can give of where it’s not associated, or any other details about how you’ve instrumented the go app?
I don’t know where I should expect correlation, since I didn’t find any documentation page stating how the correlation is done and here the correlation cannot be done inside the code (slog is not part of opentelemetry SDK).
Yes sure, I will check myself the documentation and find a way to adapt it to my issue. I will try to keep this thread up to date to say if this solution was able to help.