Configuration

There are 3 ways to configure pyroscope. Configuration precedence is evaluated in the following order:

  • command line arguments
  • environment variables
  • config files

Command Line Arguments

This is the easiest way to configure pyroscope. For the list of command line arguments and default values, run pyroscope server -help:

_ __ _ _ _ __ ___ ___ ___ ___ _ __ ___
| '_ \| | | | '__/ _ \/ __|/ __/ _ \| '_ \ / _ \
| |_) | |_| | | | (_) \__ \ (_| (_) | |_) | __/
| .__/ \__, |_| \___/|___/\___\___/| .__/ \___|
| | __/ | | |
|_| |___/ |_|
USAGE
pyroscope server [flags]
FLAGS DEFAULT VALUES
-api-bind-addr :4040
-config /etc/pyroscope/server.yml
location of config file
-log-level info
debug|info|warn|error

Environment variables

Environment variables MUST have PYROSCOPE_ prefix and be in UPPER_SNAKE_CASE format, for example:

PYROSCOPE_API_BIND_ADDR=:9999 pyroscope server

Config files

Config files are stored in YAML format, for example:

---
api_bind_addr: :9999

By default, pyroscope subcommands will look for their config files in these locations:

  • pyroscope server -> /etc/pyroscope/server.yml
  • pyroscope exec -> /etc/pyroscope/exec.yml

You can override config file location with -config <path> argument, for example:

pyroscope server -config /tmp/pyroscope-server.yml

or an environment variable, for example:

PYROSCOPE_CONFIG=/tmp/pyroscope-server.yml pyroscope server