# APM config\_file location

**URL:** <https://discuss.elastic.co/t/apm-config-file-location/203887>\
**Category:** APM\
**Tags:** java\
**Created:** [October 16, 2019, 4:52pm UTC](https://discuss.elastic.co/t/apm-config-file-location/203887 "2019-10-16T16:52:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Svetlana\_Nikitina](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/svetlana_nikitina/32/46276_2.png) [@Svetlana\_Nikitina](https://discuss.elastic.co/u/Svetlana_Nikitina)\
**Post date:** [October 16, 2019, 4:52pm UTC](https://discuss.elastic.co/t/apm-config-file-location/203887/1 "2019-10-16T16:52:57Z")

</div>

Guys,  
I want to start APM upon Spring boot startup using:

`ElasticApmAttacher.attach(Collections.singletonMap("config_file", elasticapm-dev.properties));`

`elasticapm-dev.properties` is a properties file with the name other than the standard `elasticapm.properties` in our resouces folder: `src/main/resources/`

What would be the correct path to provide to our `elasticapm-dev.properties` file

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [October 16, 2019, 5:15pm UTC](https://discuss.elastic.co/t/apm-config-file-location/203887/2 "2019-10-16T17:15:28Z")

</div>

Please see [the relevant documentation](https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-config-file).  
Either place somewhere on the file system and provide the full path, or at the same folder the elastic-apm-agent.jar is in and use the special value `_AGENT_HOME_`.

---

<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:** [October 21, 2019, 7:04am UTC](https://discuss.elastic.co/t/apm-config-file-location/203887/3 "2019-10-21T07:04:41Z")

</div>

Unfortunately, despite stating so in the documentation, providing a classpath location for `config_file` does not work. I've updated the documentation accordingly.

I've added `ElasticApmAttacher.attach(String propertiesLocation)` which makes it possible to customize the location of the properties file.

You can follow this PR: [https://github.com/elastic/apm-agent-java/pull/892](https://github.com/elastic/apm-agent-java/pull/892) and subscribe the repository for releases in order to get notified when this gets released.

---

<div class="post-metadata">

**Author:** ![Svetlana\_Nikitina](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/svetlana_nikitina/32/46276_2.png) [@Svetlana\_Nikitina](https://discuss.elastic.co/u/Svetlana_Nikitina)\
**Post date:** [October 31, 2019, 2:11pm UTC](https://discuss.elastic.co/t/apm-config-file-location/203887/4 "2019-10-31T14:11:05Z")

</div>

Thank you @felixbarny that was my point  
I have tried all possible combinations before posting here (checked it with the docs accordingly) and miserably failed  
I am looking forward for this PR be released

---

<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:** [October 31, 2019, 2:24pm UTC](https://discuss.elastic.co/t/apm-config-file-location/203887/5 "2019-10-31T14:24:49Z")

</div>

You won't have to wait very long 😉  
Be sure to subscribe the GitHub repository for releases in order to get an email notification.

---

<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 21, 2019, 10:24am UTC](https://discuss.elastic.co/t/apm-config-file-location/203887/6 "2019-11-21T10:24:52Z")

</div>

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