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:

  1. Environment variables
  2. A sqreen.yaml file
  3. Default configuration options

The sqreen.yaml file can be located in:

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

export SQREEN_CONFIG_FILE=/custom/path/sqreen.yaml

Configuration variables

The SQREEN_TOKEN and SQREEN_APP_NAME are required. The other settings are optional.

Env variable name Role YAML key name Default value
SQREEN_DISABLE Disable Sqreen when not empty. disable Empty
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 Agent 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
SQREEN_IP_HEADER_FORMAT Specify the value format of the configured header SQREEN_IP_HEADER to find the real IP address of a client. For now, it only supports %{+X}o\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid. ip_header_format Empty
SQREEN_STRIP_HTTP_REFERER Disable sending the HTTP header Referer to Sqreen when not empty. strip_http_referer Empty