Configuration in Go


Sqreen settings can be adjusted according to your needs. This section lists the possible configuration options you have with the Sqreen Go agent.

Configuration sources

The Sqreen agent reads its configuration from different places. This is the order of precedence:

  • Environment variables
  • A YAML file
  • Default configuration options

The YAML file can be located in:

  • Your application top level directory: sqreen.yaml
  • In a custom place set by SQREEN_CONFIG_FILE environment variable:

export SQREEN_CONFIG_FILE=/custom/path/sqreen.yaml

Configuration variables

You can configure the Sqreen agent using environment variables or a YAML file. The SQREEN_TOKEN is required. The other settings are optional. Here are the settings you can change:

Env variable name Role YAML key name Default value
SQREEN_TOKEN The Sqreen token. This identifies the agent to Sqreen backend servers token Empty
SQREEN_APP_NAME The application name. This identifies the application to Sqreen backend servers app_name Empty
SQREEN_CONFIG_FILE Custom location for the JSON based config Empty
SQREEN_LOG_LEVEL Sqreen logging level log_level warn
SQREEN_PROXY HTTPS proxy address to use proxy Empty
SQREEN_IP_HEADER Specify the header to use to find the real IP address of a client ip_header Empty