Free Report! Gartner® Hype Cycle™ for Monitoring and Observability.Read more

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

listen_addressstring127.0.0.1The IP address or hostname to bind the profiler to. Setting to will listen to all network interfaces.
tcp_portint1777The TCP port to bind the profiler to.
block_profile_fractionfraction0The 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_fractionfraction0The 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_fileboolfalseIf true, the agent will write the CPU profile to a file on shutdown.
cpu_profile_file_namestring$OIQ_OTEL_COLLECTOR_HOME/observiq-otel-collector.pprofThe file name to write the CPU Profile. The default is observiq-otel-collector.pprof written in the Agent's home directory.


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

observIQ docs - pprof Extension - image 1

Standalone Extension

2kind: Extension
4  name: go-pprof
6  type: pprof
7  parameters:
8    - name: listen_address
9      value:
10    - name: tcp_port
11      value: 1777
12    - name: block_profile_fraction
13      value: 0
14    - name: mutex_profile_fraction
15      value: 0
16    - name: should_write_file
17      value: true
18    - name: cpu_profile_file_name
19      value: $OIQ_OTEL_COLLECTOR_HOME/observiq-otel-collector.pprof

Configuration with Embedded Extension

2kind: Configuration
4  id: linux-metrics
5  name: linux-metrics
6  labels:
7    platform: linux
9  extensions:
10    - id: 01HKTMAPMRJEA1EYA4KC10NX5V
11      type: pprof
12      parameters:
13        - name: listen_address
14          value:
15        - name: tcp_port
16          value: 1777
17        - name: block_profile_fraction
18          value: 0
19        - name: mutex_profile_fraction
20          value: 0
21        - name: should_write_file
22          value: false
23        - name: cpu_profile_file_name
24          value: $OIQ_OTEL_COLLECTOR_HOME/observiq-otel-collector.pprof
25  selector:
26    matchLabels:
27      configuration: linux-metrics