Troubleshoot APM Go Agent
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless Observability
Generally available
Stack
Generally available
Is something not working as expected? Don’t worry if you can’t figure out what the problem is; we’re here to help! First, ensure your app is compatible with the agent’s supported technologies.
If you’re an existing Elastic customer with a support contract, create a ticket in the Elastic Support portal. Other users can post in the APM discuss forum.
Upload your complete debug logs to a service like GitHub Gist so that we can analyze the problem. Logs should include everything from when the application starts up until the first request executes. Instructions for enabling logging are below.
Agent logs are critical to the debugging process. By default, this logging is disabled. To enable it, set a log output file with ELASTIC_APM_LOG_FILE. Alternatively, if you’re using Docker or Kubernetes and are okay with mixing agent and application logs, you can set ELASTIC_APM_LOG_FILE=stderr.
The agent does not rotate log files. Log rotation must be handled externally.
With logging enabled, use ELASTIC_APM_LOG_LEVEL to increase the granularity of the agent’s logging. For example: ELASTIC_APM_LOG_LEVEL=debug.
Be sure to execute a few requests to your application before posting your log files. Each request should add lines similar to these in the logs:
{"level":"debug","time":"2020-07-23T11:46:32+08:00","message":"sent request with 100 transactions, 0 spans, 0 errors, 0 metricsets"}
If you don’t see lines like these, it’s likely that you haven’t instrumented your application correctly.
In the unlikely event the agent causes disruptions to a production application, you can disable the agent while you troubleshoot.
If you have access to dynamic configuration, you can disable the recording of events by setting ELASTIC_APM_RECORDING to false. When changed at runtime from a supported source, there’s no need to restart your application.
If that doesn’t work, or you don’t have access to dynamic configuration, you can disable the agent by setting ELASTIC_APM_ACTIVE to false. Restart your application for the changes to apply.