Since I have upgraded to APM server 7.15.0 (on Elastic cloud) when capture_body is enabled JSON body is stored in a single field. This is not different from the older versions. However, the value of JSON message stored is not normalized which means if there are any characters such as quotations in that field, it must be escaped. This is used to work in 7.14.x but seems to be broken after it's upgraded.
A workaround could be setting an ingest pipeline to process documents and escape all required characters but I am not sure which processor would give me that option.
P.S: I am using java-agent (1.26.0) with Spring boot 2.5.4
Where do you get that JSON from? Did you copy it from a query in Kibana?
I thing that's just a different way the JSON is quoted in the presentation layer to make it easier to ready or copy/paste. Note that in 7.15, the string starts with three quotes (""") this makes escaping the quotes in the JSON (\") unnecessary.
If you directly query Elasticsearch, I'd expect the same output as in 7.14.
I got JSON from query Elastic APM index directly (not using Kibana). The reason I am suspicious about this is that there is a separate ingest pipeline processor to parse JSON for body.original
, but that is not working so I thought this is because the String representation of that JSON field is not valid anymore.
Great. Thank you. I have checked the workaround and it's fine. I hope the main issue will be resolved soon so I can remove the dot_expander processor. Thanks for your help.
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.