April 24, 2023, 12:07pm
If I use async logging, the
trace.id fields aren't set in the log messages.
I'd like to keep using async logging, but still benefit from the trace and transaction correlation. What's the recommended way to do that?
April 26, 2023, 8:15am
These seem to be the relevant parts:
Note: When log4j is configured to have
all loggers asynchronous, log events are pre-allocated in a ring buffer and the LogEventFactory is not used.
Elastic instruments the
LogEventFactory, but this factory isn't used if async logging is used.
Yes that's the instrumentation applied for Log4j. I think you're right, I can't see where we would capture async logs. I'll discuss with the team next week but I don't think I have a useful answer for you now
April 26, 2023, 2:15pm
@Jack_Shirazi I've now added this to our already existing
Elastic APM · GitHub
It seems like this might be a good API to use for the agent as well:
Log4j – Extending Log4j 2
I haven't anything for
Thanks for the report and the suggestions, we've opened
an issue and hope to get to it next Q
May 24, 2023, 8:32am
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.