Correlating logs to single spans

I'm currently playing around with manually instrumenting my java application. The application logs are already stored in elasticsearch.

I was hoping to find something like in Jaeger where the UI allows to view span events ("logs") per span and not per trace like in elastic apm:

When viewing a trace, I see that elastic apm allows categorizing the logs via service name. So is the only way of correlating logs to a span using the service name? Meaning, giving each span a pseudo service name which is referrenced in the corresponding log.

1 Like