Go Performance Profiler
Go Performance Profiler Extension
The Go Performance Profiler Extension can be used to enable the Go Performance Profiler, also known as pprof, for an Agent. It configures an HTTP server that exposes runtime profiling data in the format expected by the pprof visualization tool.
Configuration Table
Parameter | Type | Default | Description |
---|---|---|---|
listen_address | string | 127.0.0.1 | The IP address or hostname to bind the profiler to. Setting to 0.0.0.0 will listen to all network interfaces. |
tcp_port | int | 1777 | The TCP port to bind the profiler to. |
block_profile_fraction | fraction | 0 | The fraction of blocking events that are profiled, must be a number between 0 and 1. A value of zero will profile no blocking events. |
mutex_profile_fraction | fraction | 0 | The fraction of mutex contention events that are profiled, must be a number between 0 and 1. A value of zero will profile no mutex contention events |
should_write_file | bool | false | If true, the agent will write the CPU profile to a file on shutdown. |
cpu_profile_file_name | string | $OIQ_OTEL_COLLECTOR_HOME/observiq-otel-collector.pprof | The file name to write the CPU Profile. The default is observiq-otel-collector.pprof written in the Agent's home directory. |
note
The CPU profile file is only written once the Agent has been stopped and the should_write_file
parameter is set to true.
Example Configuration
Web Interface
Standalone Extension
Configuration with Embedded Extension