Hi , is it possible to dynamically provide application name , when running in AWS . I have an image with the APM Agent installed (using Java and PHP) . When a new instance is started , i want to overide the Application name that is configured. Is there a way to handle this .
Hi Aditya
Apart from configuring the application name in apminsight.conf file, APM Insight Java agent allows you to provide the name as a JVM system property. Use the system property "apminsight.application.name" to set your application/monitor name. The value provided here overrides the value configured in apminsight.conf file
Related KB article is available here
Example: -javaagent:/opt/apminsight/apminsight-javaagent.jar -Dapminsight.application.name=eTicketSystem
In case of PHP agent, there isn't an option to override the value, you can run the following command to replace the application name before starting the PHP agent service
sed -i "s/application.name=.*/application.name=${Newappname}/g" /opt/zpa/conf/apminsight.conf
Replace the ${Newappname} with either a environment variable or direct value
I hope this solution, meets your requirement, if not explain us how do you wish to dynamically set the application name
Thanks
Adhi