If you are not receiving traces and metrics in your AppOptics dashboard these are some options to troubleshoot.
- Is the APM agent connected to the AppOptics server?
- Is the APM agent jar path accessible to the application user?
- Are requests being sent to the application?
- Do you have another profiler installed?
- Has the agent been initialized?
- Are requests being sampled for tracing?
- Is the service key configured correctly?
- Where can agent logs be found?
- How to increase log verbosity?
- Are there warnings reported by the agent?
- Is your application supported?
- If firewall is enabled for your host, you might want to whitelist our AppOptics server endpoints.
Connectivity diagnostic tool can be run using the same APM agent jar installed. For example:Copy
java -cp "c:\Program Files\AppOptics\APM\java\appoptics-agent.jar" com.appoptics.diagnostic.DiagnosticTools
- More details on the diagnostic can be found here.
If an error message similar to below is found during application startup, then the agent jar path is either incorrect or the application user does not have permission to access the agent jar file.Copy
Error opening zip file or JAR manifest missing : /home/ec2-user/appoptics/appoptics-agent.jar
Error occurred during initialization of VM
agent library failed to init: instrument
- Verify the javaagent file path and ensure the application user has read access to BOTH the agent jar file and its parent directory(ies).
- Restart the application server and ensure that your application is receiving requests. In order for traces and metric data to be sent to your AppOptics dashboard your application must be receiving requests.
- It is not recommended to run other APM agent alongside with our Java Agent. Please disable other APM agents from your application process before starting your application with our Java Agent.
- Check if the agent has been enabled by inspecting the application server log files. The message
Java agent version x.x.x started successfullyshould be printed upon successful agent startup, followed by 2 other messages with agent jar and config location information. If a message
[AppOptics] Agent is disabled as agent.enabled is configured to false.is found, it means the agent is explicitly disabled by
javaagent.jsonor the corresponding environment variable
- One way to check if the agent has been initialized, is to look at the response headers returned. The agent will add the header
X-Traceto the response. If the response doesn’t contain the header
X-Trace, then the agent probably wasn’t loaded correctly.
- Review the other troubleshooting options to try to resolve the issue.
- Requests may not be sampled due to a low sample rate or connection issues. The
X-Traceresponse header ends in
00if a request isn’t traced and ends in
01if the request is being traced.
- Some requests should have a
X-Traceheader returned that ends in
01. If all
X-Traceheaders being returned end in
00the server may not be able to connect to the AppOptics collector.
- Review the application server logs for any connection issues logged by the agent.
- The service key is added to the
javaagent.jsonfile (usually under the same directory as the agent jar
appoptics-agent.jar). The first part of the service key (before the colon
:) should match one of the AppOptic API tokens listed in the AppOptics dashboard under Organization Settings > API Tokens.
- Log messages from the agent can be found in the application server log files.
- Increase the logging level verbosity to
info) to get more detailed information added to the agent logs. Use the agent configuration property LogLevel to change the logging level.
- Restart the application server to have the new level take effect.
- An application correctly configured with our Java Agent should log debug messages to
- Search the application server log files for
WARNING [AppOptics]. Sometimes configuration errors such as invalid formatting in the config file can lead to instrumentation problems.