Troubleshooting

Check the logs

By default the logs are sent to stderr. Common errors in the logs include missing APPOPTICS_SERVICE_KEY and not having been installed with the native library bindings built (should happen automatically on most platforms).

Check if your application is instrumented

You can check if your application is correctly instrumented by looking for X-Trace headers, eg. using curl:

curl -i http://the-url-of-your-website
HTTP/1.1 200 OK
...
X-Trace: 2BB5CEC860E76D82425C8048BBF5469BE9BC580A628B4A5611C2CA3A5601

You will find the HTTP header X-Trace from the HTTP response if the instrumentation is installed and enabled.

As a second diagnostic, the last two characters of X-Trace header indicates whether the request is traced: it is traced if the last two characters are 01 while not traced if they are 00. It is not expected that all requests will be traced; in high-traffic environments, automatic sampling kicks in.

Enabling verbose logging

Enable the verbose logging by define the following environment variable to 6 (Please don’t enable it in production environment as it will flood your system with verbose logs):

export APPOPTICS_DEBUG_LEVEL=6

See logging level for more information.

Check agent connection to the AppOptics server

Review the agent log messages to see if there are any connection issues logged.

If your server is behind a firewall, please see the FAQ: My application is behind a firewall. What IP address(es) do I need to whitelist?.

Is the service key valid?

The format of the API token recently changed. The new token format which is 71 characters long, may not work with previous versions of the agent (before v3.5.9). Try updating to the latest version of the agent which supports the new format.