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 locations. 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 location set by SQREEN_CONFIG_FILE environment variable:

export SQREEN_CONFIG_FILE=/custom/path/sqreen.yaml

Configuration variables

Find your organization token by going to Account Settings > Tokens in your Sqreen dashboard, or (https://my.sqreen.com/profile/organization/tokens). Your token is prefixed with org_.

To help Sqreen correctly identify the application when you use an organization token, you also need to set a unique application name.

Those information can be provided using the SQREEN_TOKEN and SQREEN_APP_NAME environment variables.

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

Application tokens depreciated

Appplication tokens are dedicated to an application, and organization tokens are available throughout the organization your account belongs to.

While Sqreen will continue to support application tokens for backward compatibility in the short term, they are now depreciated, and we encourage you to convert your applications to use organization tokens as soon as possible.

Find your organization token by going to Account Settings > Tokens in your Sqreen dashboard, or (https://my.sqreen.com/profile/organization/tokens). Your token is prefixed with org_.

To help Sqreen correctly identify the application when you use an organization token, you also need to set a unique application name.

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 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