- 
                Notifications
    You must be signed in to change notification settings 
- Fork 326
Open
Labels
agent-javaenhancementEnhancement of an existing featureEnhancement of an existing featureloggingapplication logging instrumentation and supportapplication logging instrumentation and support
Description
Is your feature request related to a problem?
When agent logs in ECS format, we can utilize log correlation to our logs as well.
Describe the solution you'd like
We can enhance our co.elastic.apm.agent.logging.Log4j2LoggerBridge to add to slf4j MDC before any logging event and removing after if the log format is JSON.
Describe alternatives you've considered
Another option is to utilize log4j extension capabilities - org.apache.logging.log4j.core.util.ContextDataProvider or org.apache.logging.log4j.core.ContextDataInjector
Additional context
Followup on #2428
Metadata
Metadata
Assignees
Labels
agent-javaenhancementEnhancement of an existing featureEnhancement of an existing featureloggingapplication logging instrumentation and supportapplication logging instrumentation and support