Configuration for Go

You can adjust Sqreen settings 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 locations. This is the order of precedence:

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

You can store the sqreen.yaml file in:

  • Your application top level directory
  • In a custom location set by SQREEN_CONFIG_FILE environment variable:
export SQREEN_CONFIG_FILE=/custom/path/sqreen.yaml

Configuration variables


You can provide this information using the SQREEN_TOKEN and SQREEN_APP_NAME environment variables.

When using the application token, only the SQREEN_TOKEN is required.



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 as displayed within the Sqreen dashboard app_name Empty
SQREEN_CONFIG_FILE Custom location for the JSON based config Empty
SQREEN_LOG_LEVEL Agent logging level log_level info
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

Configuring multiple environments


# Include the environment into the app_name
app_name: "Your Service Name (development)"
token: "Your Token"