Java spring boot log not displaying in apm-* index

Hello Experts,

We have 2 index application-logs-* and apm-*
Application logs give more information about status and error.

The same error we would like to see from apm-* index, bit we are not able to the complete java trace and error.

Does elastic APM for Java captures logs?

Regards,
Suresh

If I understand correctly, you ingest both logs and APM traces into your Elasticsearch and you want to correlate APM traces/errors with related log data. If this is the case, take a look at our log-correlation guide. I assume you are at step 2.

Please notice that we just lately added an experimental feature that automatically reformats your application logs into ECS-JSON and includes the APM IDs in them, so that you don't need to configure your logging formatting (step 3 in the guide) - it will already be written in the proper format, ready for ingestion. Please take a look at the new log_ecs_reformatting configuration and see if it fits your needs. If so, you would need to use the latest snapshot, as this was not released yet.

Hi Eyal,

I have added below lines as environment variables, but application log is not appeared.
Let me know still what configuration i need to enable.

ELASTIC_APM_LOG_LEVEL: TRACE 
ELASTIC_APM_ENABLE_LOG_CORRELATION: true

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.