How do I change the micro profile from the application side instead the agent itself?
Today we can only change it for all applications over the Agent.Profile:
monitor.application.java.propertiesOverride: introscope.agent.defaultProcessName=tomcat,introscope.agent.agentAutoNamingEnabled=false
Release : 22.1
Option 1:
You can set the below annotation on the application deployment, which would override the default profile used.
kubectl annotate deployment <deployment_name> ca.broadcom.com/autoattach.java.agent.overrides = "com.wily.introscope.agentProfile=/tmp/ca-deps/wily/core/config/IntroscopeAgent.jboss.profile".
Note that the IntroscopeAgentMicro.profile is created mainly for micro service applications so that java agent resource consumption is optimized. We would recommend the user test the Jboss profile change in their dev/test environment first before applying it in production.
Option 2:
Using override annotation Agent Profile Property: autoattach.java.<appName>.agent.profile=IntroscopeAgent.jboss.profile
This should be passed using annotation: ca.broadcom.com/autoattach.java.agent.overrides: autoattach.java.<appName>.agent.profile=IntroscopeAgent.jboss.profile
Note: Replace <appName> with original appName
You can check appName from DaemonSet - podmonitor container logs
Log entry: JVM Process <PID> in container <containerId> matched with application pattern "<appName>"
Option 3:
Using Environment variable:
- name: JAVA_OPTS
value: "-Dcom.wily.introscope.agentProfile=/tmp/ca-deps/java-agent/wily/core/config/IntroscopeAgentMicro.profile"
Note: JBoss application should support JAVA_OPTS env variable. (cross check the path)