# How to exclude certain fields from APM logs

**URL:** <https://discuss.elastic.co/t/how-to-exclude-certain-fields-from-apm-logs/253068>\
**Category:** APM\
**Tags:** java\
**Created:** [October 22, 2020, 9:01pm UTC](https://discuss.elastic.co/t/how-to-exclude-certain-fields-from-apm-logs/253068 "2020-10-22T21:01:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vabnix](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vabnix/32/74284_2.png) [@vabnix](https://discuss.elastic.co/u/vabnix)\
**Post date:** [October 22, 2020, 9:01pm UTC](https://discuss.elastic.co/t/how-to-exclude-certain-fields-from-apm-logs/253068/1 "2020-10-22T21:01:50Z")

</div>

my company recently started using Elastic Cloud APM. I am looking for some guidance on how to exclude certain fields to be available when seeing the logs from APM like **http.request.body.original**

---

<div class="post-metadata">

**Author:** ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)\
**Post date:** [October 23, 2020, 4:20am UTC](https://discuss.elastic.co/t/how-to-exclude-certain-fields-from-apm-logs/253068/2 "2020-10-23T04:20:47Z")

</div>

Hi,

Are you looking for disabling the body only or are you asking for a general response? Which APM agent do you use?

In the Java APM agent you can disable storing the request body with [this property](https://www.elastic.co/guide/en/apm/agent/java/current/config-http.html#config-capture-body-content-types) (as an example for the APM config file):

```auto
capture_body_content_types=

```

Best regards  
Wolfram

---

<div class="post-metadata">

**Author:** ![vabnix](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vabnix/32/74284_2.png) [@vabnix](https://discuss.elastic.co/u/vabnix)\
**Post date:** [November 5, 2020, 6:14pm UTC](https://discuss.elastic.co/t/how-to-exclude-certain-fields-from-apm-logs/253068/3 "2020-11-05T18:14:28Z")

</div>

Thank @Wolfram_Haussig, it seems when creating custom configuration we enabled capture\_body which is defaulted to off. By updating it back to off, the issue was fixed

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/d/0d077541cb51ec29de4035c249f651a7bedfdcff.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 26, 2020, 2:14pm UTC](https://discuss.elastic.co/t/how-to-exclude-certain-fields-from-apm-logs/253068/4 "2020-11-26T14:14:33Z")

</div>

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