Related pages: |
Java Agent helps you monitor the workloads running in Azure Spring Cloud. To gain visibility into the topology of the application along with the data flows between the services, activate the Java Agent on services that make up your Azure Spring Cloud application.
The Java Agent also provides root-cause analysis of slow or error transactions within the Azure Spring Cloud application.
The Java agent provides JVM memory usage of services within the Azure Spring Cloud application along with garbage collection information.
To monitor the Spring Cloud workloads with AppDynamics, you can use the agent with your Azure Spring Cloud application. To do this, perform these steps:
The Java Agent is deployed as a read-only artifact within the Azure Spring Cloud environment. This results in some limitations in features available through the Java agent. The limitations are:
controller-info.xml
, agent. properties
) is not available.log4j2.xml
) is not available.You can activate the Java Agent with the Azure Spring Cloud apps in these two ways:
Create an application:
```shell az spring-cloud app create --name "appName" --is-public true \ -s "resourceName" -g "resourceGroupName"``` |
You must access the APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY
, APPDYNAMICS_AGENT_ACCOUNT_NAME
and APPDYNAMICS_CONTROLLER_HOST_NAME
to connect to AppDynamics and customize other variables as per your requirement.
```shell az spring-cloud app deploy --name "appName" --jar-path app.jar \ -s "resourceName" -g "resourceGroupName" \ --jvm-options="-javaagent:/opt/agents/appdynamics/java/javaagent.jar" \ --env APPDYNAMICS_AGENT_APPLICATION_NAME=<YOUR_APPLICATION_NAME> \ APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY=<YOUR_AGENT_ACCESS_KEY> \ APPDYNAMICS_AGENT_ACCOUNT_NAME=<YOUR_AGENT_ACCOUNT_NAME> \ APPDYNAMICS_AGENT_NODE_NAME=<YOUR_AGENT_NODE_NAME> \ APPDYNAMICS_AGENT_TIER_NAME=<YOUR_AGENT_TIER_NAME> \ APPDYNAMICS_CONTROLLER_HOST_NAME=<YOUR_APPDYNAMICS_CONTROLLER_HOST_NAME> \ APPDYNAMICS_CONTROLLER_SSL_ENABLED=true \ APPDYNAMICS_CONTROLLER_PORT=443 |
Azure Spring Cloud pre-installs the Java Agent to the following path: /opt/agents/appdynamics/agent/javaagent.jar.
Click General settings to add, update or delete the JVM Options of the application in the General settings tab.
Click Save.
Click Restart to ensure the configuration is complete.
You can use these environment variables to configure the setup to use the agent with your Azure Spring Cloud application:
Environment Variable |
---|
|
|
|
|
|
|
|
|
|
|
|
You can also use these system properties:
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
|
|
For a description of these system properties, see Java Agent Configuration Properties. To locate the account and account access key, see Agent-to-Controller Connections.
By default, Azure Spring Cloud prints the info level logs of the agent to
STDOUT
. The logs are mixed with the application logs. You can find the explicit agent version from the application logs.
You cannot configure the controller-info.xml.
Therefore,
to obtain debug logs, you must set the environment variable for the log level on the app within ASC and then restart the app.
To run the command for capturing the ASC logs, see az spring-cloud app log.