Profiling
The agent exposes pprof endpoints for profiling. The following endpoints are available and require basic authentication to access them:
/debug/pprof/
/debug/pprof/cmdline
/debug/pprof/profile
/debug/pprof/symbol
/debug/pprof/trace
To enable profiling, set the pprof
configuration option in the agent configuration file. The agent will then expose the pprof endpoints protected by basic authentication.
See Configuration for more information on how to configure the agent.
There are some helper scripts available in the agent repository to interact with the pprof endpoints. The scripts are located in the /apps/agent/scripts directory.
These scripts are specific to our setup on fly.io and serve as an example. They should work for any setup with minor modifications.
After running, your browser should open automatically and the pprof web interface allows you to analyze the profile data.
Profiling the cpu
Profiling memory
Was this page helpful?