# Disable profiling apm-agent-java

**URL:** <https://discuss.elastic.co/t/disable-profiling-apm-agent-java/246593>\
**Category:** APM\
**Tags:** java\
**Created:** [August 27, 2020, 9:46am UTC](https://discuss.elastic.co/t/disable-profiling-apm-agent-java/246593 "2020-08-27T09:46:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergiusz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sergiusz/32/74608_2.png) [@Sergiusz](https://discuss.elastic.co/u/Sergiusz)\
**Post date:** [August 27, 2020, 9:46am UTC](https://discuss.elastic.co/t/disable-profiling-apm-agent-java/246593/1 "2020-08-27T09:46:33Z")

</div>

Hello,  
Starting from v1.14.0 Java APM Agent creates in the temporary folder the following files:  
/tmp/apm-activation-events-\*.bin  
/tmp/apm-traces-\*.jfr  
They are created regardless of the whether profiling is enabled/disabled.  
Is there any setting I missed that may switch it off.  
I have found the PR ([https://github.com/elastic/apm-agent-java/pull/1350](https://github.com/elastic/apm-agent-java/pull/1350)), which is not officially released, but it is only about configuring the directory where to store such files.

Any help would be appreciated.

---

<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:** [August 27, 2020, 3:45pm UTC](https://discuss.elastic.co/t/disable-profiling-apm-agent-java/246593/2 "2020-08-27T15:45:12Z")

</div>

Hi @Sergiusz, welcome to our forum.

Yes, currently those files are created even if the profiler is disabled `profiling_inferred_spans_enabled=false`.

Making those files created lazily and only if needed seems a good improvement, I've opened a pull-request for that: [https://github.com/elastic/apm-agent-java/pull/1360](https://github.com/elastic/apm-agent-java/pull/1360). You can subscribe to it to get notifications when it's merged.

Have a nice day.

---

<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:** [September 17, 2020, 11:45am UTC](https://discuss.elastic.co/t/disable-profiling-apm-agent-java/246593/3 "2020-09-17T11:45:23Z")

</div>

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