Collecting Go Program Profile
5/14/25Less than 1 minutecomponentgoroutineheappprofblock
Feature Overview
pprof is a core tool for Go program performance analysis, especially suitable for diagnosing issues in production environments. When online Go services encounter performance problems, this system supports automatically saving the program's runtime state (profile) for subsequent in-depth analysis and problem localization using the pprof tool.
Collection Methods
Services created by sponge provide a dual profile collection mechanism:
- HTTP Interface Collection: Triggered via API endpoints (disabled by default, enabled through configuration file)
- System Signal Notification: Triggered via operating system signals (enabled by default)
Click to view Example of Configuring and Collecting Go Profile in Services.