I'm trying to send a custom transaction to apm through the Java Agent.
However I'm experiencing problems and for every transaction I close, the server replies http400 with this error on console:
This is fixed in master, which contains a complete overhaul of the JSON serialization.
The problem is that the Java agent pre-allocates the Transaction.context.request object. But if this object is not null, the JSON schema requires the method to be set. In the current version on master, Transaction.context.request is only serialized if it actually hasContent.
Are you ok with building the Java agent from source?
FYI: when you enable TRACE logs for co.elastic.apm, you can see the actual JSON sent to the APM-server.
Thanks Felix for your help.
I've tried to build from source but I'm experiencing problems due to Java 9.
I'll have time to deal with it during the next days.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.