Identifying CPU hots spots with line-of-code precision is critical when it comes to troubleshooting performance issues, identifying performance bottlenecks or improving response for a better customer experience.

Go’s pprof toolset has powerful tools for CPU profiling and visualizing different aspects of profiles. It is very useful in the development stage. However, profiling CPU usage in production environments has different requirements:

We need to be able to see CPU profiling information continuously to have a historical baseline for optimization or troubleshooting.

Production environments increasingly become container-based and automatically orchestrated, e.g. when using Kubernetes, which implies that it might not be easy to locate and connect to a production machine to initiate the profiler remotely.

If the application has crashed, we need information before the fact.

Using Instana’s AutoProfile™ for automatic CPU profiling

Instana’s always-on AutoProfile is designed for profiling and monitoring production environments. It completely automates the collection of CPU profiles.

If yo’re not already an Instana user, sign up for a free two week trial.

See the Instana Profiling documentation for detailed setup instructions.

After restarting/deploying the application, the profiles will be available in the Dashboard in a historically comparable form.

Similar profile history is automatically available for:

Metrics from Go runtime are also available in the Dashboard.