# APM: Dynamic changes not reflected

**URL:** <https://discuss.elastic.co/t/apm-dynamic-changes-not-reflected/251301>\
**Category:** APM\
**Tags:** java\
**Created:** [October 7, 2020, 3:54pm UTC](https://discuss.elastic.co/t/apm-dynamic-changes-not-reflected/251301 "2020-10-07T15:54:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishant.mahajan](https://avatars.discourse-cdn.com/v4/letter/v/7bcc69/32.png) [@vishant.mahajan](https://discuss.elastic.co/u/vishant.mahajan)\
**Post date:** [October 7, 2020, 3:54pm UTC](https://discuss.elastic.co/t/apm-dynamic-changes-not-reflected/251301/1 "2020-10-07T15:54:28Z")

</div>

**Kibana version** :  
Kibana 6.7

**Elasticsearch version** : 6.7

**APM Server version** : 6.7

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

**Browser version** : Chrome

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**:

**Fresh install or upgraded from other version?** Fresh

**Is there anything special in your setup?** For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc. NO

We are trying to implement dynamic property update for APM.  
We are attaching the APM on our SpringBoot Application.  
Code ::  
ElasticApmAttacher.attach();  
SpringApplication.run(Application.class, args);

**Steps to reproduce** :  
We supply Java system variables on startup : -Delastic.apm.service\_name=service\_Oct6 -Delastic.apm.application\_packages=com.abc -Delastic.apm.server\_urls=http://apm-server-url:8200

After a given amount of time, we update System property from within the code.  
System.setProperty("elastic.apm.application\_packages", "com.xyz");

We expect the transactions and spans in APM to show for "com.xyz" . But they still show data from "com.abc".

Approach 2 ::  
We tried a second option of javaagent.  
Downloaded java agent 1.18 . attached it to the application on startup .  
We commended the code [//ElasticApmAttacher.attach](https://ElasticApmAttacher.attach)();

-javaagent:../elastic-apm-agent-1.18.1.jar -Delastic.apm.service\_name=service\_Oct6 -Delastic.apm.application\_packages=com.abc -Delastic.apm.server\_urls=http://apm-server-url:8200

After a given amount of time, we update System property from within the code.  
System.setProperty("elastic.apm.application\_packages", "com.xyz");

We expect the transactions and spans in APM to show for "com.xyz" . But they still show data from "com.abc".

Could you please help in suggesting what could be going wrong or if there is a problem with implementation.

**Errors in browser console (if relevant)**: No errors

**Provide logs and/or server output (if relevant)**:

---

<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:** [October 28, 2020, 11:54am UTC](https://discuss.elastic.co/t/apm-dynamic-changes-not-reflected/251301/2 "2020-10-28T11:54:30Z")

</div>

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