How to integrate apm trace id with java logs

You should be able to see the logs from the trace as shown below:

But that requires the logs to be compliant with the ECS format. Make sure the logs are generated using the Java ECS Logging framework, and you will be good to go. Another way without changing your code is creating a ingest pipeline in Elasticsearch and augmenting the log data via a pipeline, which you can plug in your Filebeat configuration. But preferably, aim to generate the ECS format straight from your app.

@riferrei

1 Like