How to disable transactions being sent from Java APM agent, and how to only send error events?

Hi, thanks for the quick response @Sylvain_Juge.

This discussion that my colleague started is related to this issue APM Flask - Treating all transactions as Errors - #6 by basepi but with the Python agent.

For our Flask apps we have ECS formatted the logs and use Filebeat for INFO. However for ERRORS we capture and send them as messages via APM agent.

With Java we have also formatted the logs using the ECS formatter and included the APM identifiers (trace.id, transaction.id and span.id) so we're not dropping tracing data. We just don't want the agent to handle sending these logs to the APM server as it is putting strain on our apis. Filebeat can handle sending the logs with the APM identifiers so they show up in the APM dashboard.

We're looking at how to replicate this with the Java agent by turning off the message sending for everything but errors but can't seem to get it working!

Thanks in Advance,

James