apm-agent-java
apm-agent-java copied to clipboard
Add instrumentation for Log4j2 with AsyncLoggerContextSelector that enables log correlation
Is your feature request related to a problem?
If using LOG4J in async logging with AsyncLoggerContextSelector, log correlation doesn't happen, see this discussion
Describe the solution you'd like
Log correlation should work the same as per sync log4j logging
@jackshirazi are there any workarounds for this currently (to enrich logs with trace.id when async logging is enabled for Log4J2?
Unfortunately not
@maggieghamry @jackshirazi There's a workaround, see https://gist.github.com/kelunik/c3971068a7d1a1f0acd7c2143028ce1b, which is also linked in the above linked original discussion.