# APM without "metrics"

**URL:** <https://discuss.elastic.co/t/apm-without-metrics/229477>\
**Category:** APM\
**Tags:** java\
**Created:** [April 23, 2020, 1:47pm UTC](https://discuss.elastic.co/t/apm-without-metrics/229477 "2020-04-23T13:47:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emanuel\_Velzi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emanuel_velzi/32/66975_2.png) [@Emanuel\_Velzi](https://discuss.elastic.co/u/Emanuel_Velzi)\
**Post date:** [April 23, 2020, 1:47pm UTC](https://discuss.elastic.co/t/apm-without-metrics/229477/1 "2020-04-23T13:47:48Z")

</div>

Hi!

Using Elastic Stack for Application Performance Management (APM) I want to **take insights about "transactions" but not "metrics".**

I want to take insights about "transactions" like headers, custom fields, status, and so on.  
But I'm not interested in "metrics" about CPU, memory, and so on, due to I have other tools for this.

I mean, I would like to **index "transactions" but not "metrics" in elasticsearch**.

I'm using the version 7.6.1 of the Elastic Stack (Elasticsearch, Kibana, APM Server) and the APM Java Agent 1.15.0.

The problem is that I can not stop the "metrics" sampling from Java Agent. I have treated using some JVM parameters from [here](https://github.com/elastic/apm-agent-java/blob/master/docs/configuration.asciidoc):

- `-Delastic.apm.disable_metrics=true`
- `-Delastic.apm.transaction_sample_rate=0.0`
- `-Delastic.apm.instrument=false`

Using `"-Delastic.apm.recording=false"` the APM agent stop taking samples (metrics, transactions, everything) but this is not useful for me.

I'm running the java app from Intellij IDE. These are the other JVM parameters:

- -javaagent:/elastic-apm-agent-1.15.0.jar
- -Delastic.apm.service\_name=myservice
- -Delastic.apm.server\_urls=http://apm-monitoring:8200
- -Delastic.apm.application\_packages=com.myapp
- -Dfile.encoding=UTF-8

Does anyone know how I can achieve this?

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [April 23, 2020, 1:56pm UTC](https://discuss.elastic.co/t/apm-without-metrics/229477/2 "2020-04-23T13:56:45Z")

</div>

Hi and welcome to the forum 👋

The [`disable_metrics`](https://www.elastic.co/guide/en/apm/agent/java/current/config-reporter.html#config-disable-metrics) option is not a boolean. It's a list of metrics to exclude.  
To disable metrics sending, set [`metrics_interval`](https://www.elastic.co/guide/en/apm/agent/java/current/config-reporter.html#config-metrics-interval) to `0s`.

---

<div class="post-metadata">

**Author:** ![Emanuel\_Velzi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emanuel_velzi/32/66975_2.png) [@Emanuel\_Velzi](https://discuss.elastic.co/u/Emanuel_Velzi)\
**Post date:** [April 23, 2020, 3:25pm UTC](https://discuss.elastic.co/t/apm-without-metrics/229477/3 "2020-04-23T15:25:53Z")

</div>

This works perfectly...!

It's just what I was looking for! Thanks!!

---

<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:** [May 14, 2020, 11:25am UTC](https://discuss.elastic.co/t/apm-without-metrics/229477/4 "2020-05-14T11:25:54Z")

</div>

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