Elastic APM Java agent - sanitize_fields_names on application/json* data

Is it possible to support sanitize_fields_names configuration for application/json* data?Sometimes, requests body contains sensitive data sent to APM when capture_body is enabled.

We hope those fields can be sanitized. We have one way to sanitize them, which is to sanitize/filter out them by ourselves and add them into custom context manually, but we wonder is it possible that Elastic support this function or any suggestion?

Thank you!

Hi @YuZhenXie,

Filtering JSON data at agent level is not supported right now.

However, you can filter data by changing the ingest pipeline used by APM server, which has quite a few advantages:

  • support for more than just "field name matching", you have access to all ingest pipeline features
  • no performance overhead on the application

https://www.elastic.co/guide/en/apm/server/current/elasticsearch-output.html#pipeline-option-es
https://www.elastic.co/guide/en/elasticsearch/reference/current/remove-processor.html

1 Like

Hi @Sylvain_Juge,

Thanks for your suggestion! I will try it then!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.