# Disabling Traces in Elastic APM While Retaining Metrics

**URL:** https://discuss.elastic.co/t/disabling-traces-in-elastic-apm-while-retaining-metrics/372262
**Category:** APM
**Created:** [December 20, 2024, 8:19am UTC](https://discuss.elastic.co/t/disabling-traces-in-elastic-apm-while-retaining-metrics/372262 "2024-12-20T08:19:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Raushan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raushan/32/102180_2.png) [@Raushan](https://discuss.elastic.co/u/Raushan)
#### Post date: [December 20, 2024, 8:19am UTC](https://discuss.elastic.co/t/disabling-traces-in-elastic-apm-while-retaining-metrics/372262/1 "2024-12-20T08:19:13Z")

</div>

We are using the Elastic APM agent to monitor our applications. However, we only want to collect metrics and do not want to capture traces for the transactions.

Is there a way to disable trace collection while retaining metrics in the Elastic APM agent? If so, could you please guide us on how to configure this?

---

<div class="post-metadata">

### Author: ![Raushan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raushan/32/102180_2.png) [@Raushan](https://discuss.elastic.co/u/Raushan)
#### Post date: [January 13, 2025, 7:46am UTC](https://discuss.elastic.co/t/disabling-traces-in-elastic-apm-while-retaining-metrics/372262/2 "2025-01-13T07:46:24Z")

</div>

@Sylvain_Juge @stephenb hey guys, please suggest.

---

<div class="post-metadata">

### Author: ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)
#### Post date: [January 13, 2025, 8:24am UTC](https://discuss.elastic.co/t/disabling-traces-in-elastic-apm-while-retaining-metrics/372262/3 "2025-01-13T08:24:35Z")

</div>

Hi,

Unfortunately there is no simple way to do that with the "classic" APM agents currently. You could however drop data with an ingest pipeline, so it would not consume any storage.

As a probably simpler alternative, the OpenTelemetry agent allows to distinguish the collection on a per-signal basis, so using any of the Elastic distributions (EDOT) or the upstream OpenTelemetry distributions/agents would allow to do that easily.
