# Transaction sample rate has no effect on disk size

**URL:** <https://discuss.elastic.co/t/transaction-sample-rate-has-no-effect-on-disk-size/223015>\
**Category:** APM\
**Tags:** java\
**Created:** [March 10, 2020, 8:42pm UTC](https://discuss.elastic.co/t/transaction-sample-rate-has-no-effect-on-disk-size/223015 "2020-03-10T20:42:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rakesh\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rakesh_b/32/48128_2.png) [@Rakesh\_B](https://discuss.elastic.co/u/Rakesh_B)\
**Post date:** [March 10, 2020, 8:42pm UTC](https://discuss.elastic.co/t/transaction-sample-rate-has-no-effect-on-disk-size/223015/1 "2020-03-10T20:42:27Z")

</div>

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text 🙂

**Kibana version** : 7.5.2

**Elasticsearch version** : 7.5.2

**APM Server version** : 7.6.0

**APM Agent language and version** : Java 1.12.0

**Browser version** :

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**: kubernetes (elastic operator and elastic-apm helm chart)

We are outputing directly to elasticsearch

**Is there anything special in your setup?** We have a load balancer in front of all APM pods

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:

Two issues:

1. We changed the transaction\_sample\_rate from 1 to 0.05. This has no effect on the disk space, I do see that some transactions have no samples in the APM UI. APM metrics are taking too much of disk space, around 2.5GB every minute. This is not scalable for us. Let us know if we are doing anything wrong with the parameter "transaction\_sample\_rate"

2. We are also seeing HTTP body being captured when the default value [https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-capture-body](https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-capture-body) clearly says it should be OFF.

 ![Screen Shot 2020-03-10 at 1.40.19 PM](https://us1.discourse-cdn.com/elastic/original/3X/6/0/60fe21ee6f7d0cda370979c4d4800c1114241428.png) !

Metrics for APM and its index usage  
[Screen Shot 2020-03-10 at 1.38.45 PM|690x345](https://discuss.elastic.co/uploads/short-url/13v8pogyolVMdM9OoPpcOtseG0I.png)

 ![Screen Shot 2020-03-10 at 1.38.32 PM](https://us1.discourse-cdn.com/elastic/original/3X/e/8/e806d25c520e42e1f70bee52a6b5aa1907291a70.png)

- thank you

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [March 11, 2020, 2:11am UTC](https://discuss.elastic.co/t/transaction-sample-rate-has-no-effect-on-disk-size/223015/2 "2020-03-11T02:11:46Z")

</div>

> [@Rakesh\_B](#):
>
> transaction\_sampling\_rate

Is this just a typo here, or is that what you set in your application config? Did you configure the agents through Kibana, or in your Kubernetes spec?

I ask because the correct name for this configuration is [transaction\_sample\_rate](https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-transaction-sample-rate) ("sample", not "sampling").

Regarding capture\_body, there's a note about this in the docs:

> If the HTTP request or the JMS message has a body and this setting is disabled, the body will be shown as [REDACTED].

---

<div class="post-metadata">

**Author:** ![Rakesh\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rakesh_b/32/48128_2.png) [@Rakesh\_B](https://discuss.elastic.co/u/Rakesh_B)\
**Post date:** [March 11, 2020, 2:27am UTC](https://discuss.elastic.co/t/transaction-sample-rate-has-no-effect-on-disk-size/223015/3 "2020-03-11T02:27:11Z")

</div>

> [@axw](#):
>
> transaction\_sample\_rate

Hi,

Thank you for your reply, yes that is a typo here, this is the exact parameter on the server "-Delastic.apm.transaction\_sample\_rate=0.05".

Also, thanks for clarifying about the HTTP body

---

<div class="post-metadata">

**Author:** ![Rakesh\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rakesh_b/32/48128_2.png) [@Rakesh\_B](https://discuss.elastic.co/u/Rakesh_B)\
**Post date:** [March 11, 2020, 11:48pm UTC](https://discuss.elastic.co/t/transaction-sample-rate-has-no-effect-on-disk-size/223015/4 "2020-03-11T23:48:00Z")

</div>

sorry for the trouble, I forgot to update the parameters on most of the servers which were sending all the samples. After re-building all the servers with the latest parameters the issue was resolved

---

<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:** [April 1, 2020, 7:48pm UTC](https://discuss.elastic.co/t/transaction-sample-rate-has-no-effect-on-disk-size/223015/5 "2020-04-01T19:48:03Z")

</div>

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