Like other mainstream APM agents, the ARMS agent uses bytecode instrumentation based on frameworks such as ASM to automatically collect monitoring data. Running two APM agents simultaneously instruments your code twice. Because vendors implement instrumentation differently, code conflicts can cause issues such as slow application startup and monitoring data loss. We recommend that you do not install multiple APM agents at the same time.
During a migration period, such as transitioning from a third-party APM product to ARMS Application Monitoring, you may need to run two APM agents simultaneously. ARMS has been extensively tested for compatibility during such transitions. However, local conflicts can still occur if both agents enhance the same plugin. In this case, disable the conflicting plugin in the custom configurations of your application in ARMS.
Even if no local conflicts occur, running multiple agents can still degrade your application's performance. After the migration is complete, ensure that only the ARMS agent remains installed.
The SkyWalking cache mechanism can cause compatibility issues that prevent ARMS features such as Arthas from working correctly. If you are migrating from SkyWalking to ARMS Application Monitoring, add the following parameters to your Java startup command to disable the SkyWalking cache mechanism during the transition. For more information, see the official SkyWalking documentation.
-Dskywalking.agent.is_cache_enhanced_class=true -Dskywalking.agent.class_cache_mode=MEMORY
If you run two APM agents and encounter startup errors or request failures, adjust the agent loading order and restart the application. The following methods are recommended:
-
Adjust startup parameters for manual installation
If you used automatic installation in a Container Service for Kubernetes (ACK) environment, try switching to manual installation. If you are already using manual installation, adjust the loading order of the open-source SkyWalking agent and the ARMS agent in your startup script. Ensure the ARMS agent is loaded last.
Spring Boot example:
-javaagent:/home/admin/apache-skywalking-apm-bin/agent/skywalking-agent.jar -javaagent:/{user.workspace}/ArmsAgent/aliyun-java-agent.jar -
Add JVM parameters for automatic installation
If you used automatic installation in a Container Service for Kubernetes (ACK) environment, modifying the startup script for manual installation can require significant effort. As an alternative, you can add JVM parameters in the container environment.
-
Log on to the ACK console. On the Deployments page of the target cluster, find the application monitored by ARMS and click Edit in the Actions column.
-
In the Environment Variables section, add the parameter for the SkyWalking agent, and then click Update.
For Type, select Custom. For Variable Name, enter
JAVA_TOOL_OPTIONS. For Value, enter-javaagent:/home/admin/apache-skywalking-apm-bin/agent/skywalking-agent.jar.
-
For other open-source APM agents such as TTL-Agent, Pinpoint, and the OTel Agent, you can resolve startup or runtime issues by adjusting the agent loading order in the same way. Replace the agent package name and path with the ones you are using. For example, to adjust the loading order for a TransmittableThreadLocal agent, use one of the following methods.
-
Adjust startup parameters for manual installation
If you used automatic installation in a Container Service for Kubernetes (ACK) environment, try switching to manual installation. If you are already using manual installation, adjust the loading order of the open-source TTL agent and the ARMS agent in your startup script. Ensure the ARMS agent is loaded last.
Spring Boot example:
-javaagent:/home/admin/transmittable-thread-local-2.14.2.jar -javaagent:/{user.workspace}/ArmsAgent/aliyun-java-agent.jar -
Add JVM parameters for automatic installation
If you used automatic installation in a Container Service for Kubernetes (ACK) environment, modifying the startup script for manual installation can require significant effort. As an alternative, you can add JVM parameters in the container environment.
-
Log on to the ACK console. On the Deployments page of the target cluster, find the application monitored by ARMS and click Edit in the Actions column.
-
In the Environment Variables section, add the parameter for the TTL agent, and then click Update.
For Type, select Custom. For Variable Name, enter
JAVA_TOOL_OPTIONS. For Value, enter-javaagent:/home/admin/transmittable-thread-local-2.14.2.jar.
-
If you use a bytecode encryption tool, meet the following requirements to prevent application startup failures after installing the ARMS agent.
-
Ensure your custom agent runs first, and the ARMS agent runs last.
-
Use an ARMS agent of version 4.x or later to ensure the application integrates successfully.