Ruby gem configuration options

The following list includes all configuration options with the name of the environment variable and the name of the key in the configuration file.

For more information on how to configure AppSignal with a configuration file or system environment variables, see our Configuration topic.

Available options

active

Config file keyactive
System environment keyAPPSIGNAL_ACTIVE
Requiredyes
TypeBoolean (true / false)
Default valuefalse / detected by system
Available since version0.3.0
0.11.6: Support added for the environment variable option.

Description

Note: When the APPSIGNAL_PUSH_API_KEY environment variable is set, this defaults to true. This can be overridden by setting the APPSIGNAL_ACTIVE system environment variable to false: APPSIGNAL_ACTIVE=false.

Configure AppSignal to be active or not for a given environment. Most commonly used in the file configuration per environment.

APPSIGNAL_APP_ENV

System environment keyAPPSIGNAL_APP_ENV
Requiredyes
TypeString
Default value"" / detected by system
Available since version0.11.8
1.3.0: Support added for Padrino.
1.3.6: Support added for Sinatra.
2.0.4: Standardizes the behavior for all configuration.

Description

The environment of the app to be reported to AppSignal. This config option will be automatically detected in Rails apps. For Rails apps the RAILS_ENV variable is used to detect the environment. For apps using other frameworks or none at all, the RACK_ENV environment variable is used.

To override the automatic detecting, use the APPSIGNAL_APP_ENV environment variable.

export APPSIGNAL_APP_ENV=staging
rackup

This option will be used to load the configuration from the config files in which the AppSignal configuration is stored.

The environment variable option is commonly used on platforms where apps run in the production environment by default, such as Heroku. This setting allows an override to set the environment to staging, for example.

heroku config:set APPSIGNAL_APP_ENV=staging
Note: Changing the name or environment of an existing app will create a new app on AppSignal.com.
Note: This config option has no config file key equivalent. To set the environment on AppSignal initialization, you'll need to initialize the configuration manually.

Custom environments in config file

There is no env key available in the config/appsignal.yml file. If you wish to dynamically set the environment name for an app in the config file it's possible to customize your config file to use the environment to create an environment.

# config/appsignal.yml
<%= ENV["APPSIGNAL_APP_ENV"] %>:
  active: true

If you use another environment variable than APPSIGNAL_APP_ENV make sure that matches the value is any of the auto detected environment variable names (RAILS_ENV and RACK_ENV) or the value given to Appsignal::Config.new.

name

Config file keyname
System environment keyAPPSIGNAL_APP_NAME
Requiredyes
TypeString
Default valuenil (This is unset by default)
Available since version1.0.0

Description

Name of your application as it should be displayed on AppSignal.com. If you use Ruby on Rails the gem will auto-detect the name and you can leave this empty. For other frameworks setting this is mandatory.

Note: Changing the name or environment of an existing app will create a new app on AppSignal.com.

push_api_key

Config file keypush_api_key
System environment keyAPPSIGNAL_PUSH_API_KEY
Requiredyes
TypeString
Default valuenil (This is unset by default)
Available since version0.1.0

Description

The organization-level authentication key to authenticate with our Push API.

Read more about the AppSignal Push API key.

Note: When the APPSIGNAL_PUSH_API_KEY system environment variable is set, the active option will default to true instead of false. This means AppSignal will be consider active for the loaded environment even if active is set to false in the config file. For more information see the active option.

ca_file_path

Config file keyca_file_path
System environment keyAPPSIGNAL_CA_FILE_PATH
Requiredno
TypeString
Default valuePackaged cacert.pem file path.
Available since version1.3.5

Description

Configure the path of the SSL certificate file. By default this points to the AppSignal vendored cacert.pem file in the gem itself.

  • Use this option to point to another certificate file if there's a problem connecting to our API.
  • Note: The specified path cannot contain Operating Specific file system abstractions, such as the homedir symbol ~ for *NIX systems. This will be seen as a malformed path.

debug

Config file keydebug
System environment keyAPPSIGNAL_DEBUG
Requiredno
TypeBoolean (true / false)
Default valuefalse
Available since version1.0.0
Deprecated since version 3.0.16 in favor of the log_level config option.

Description

Warning: This config option is deprecated in Ruby gem 3.0.16. Please use the log_level option instead for Ruby gem 3.0.16 and newer.

Enable debug logging, this is usually only needed on request from support. With this option enabled AppSignal will log a lot more information about decisions that are made during metrics collection and when data is sent to AppSignal.com servers.

Enabling debug logging could have a slight impact on the disk usage and IO, especially on high-traffic sites. CPU overhead is minimal with the debug option enabled.

This option sets the severity level of AppSignal's internal logger. This configuration option does not affect the logging feature.

dns_servers

Config file keydns_servers
System environment keyAPPSIGNAL_DNS_SERVERS
Requiredno
TypeArray<String>
Default value[]
Available since version2.2.0.beta.1
2.11.0: Support added for the system environment option.

Description

Configure DNS servers for the AppSignal agent to use.

# config/appsignal.yml
default: &defaults
  dns_servers:
  - 8.8.8.8
  - 8.8.4.4
# In the host environment
export APPSIGNAL_DNS_SERVERS="8.8.8.8,8.8.4.4"

If you're affected by our DNS timeouts, try setting a DNS server manually using this option that doesn't use more than 4 dots in the server name.

  • Acceptable values: 8.8.8.8, my.custom.local.server.
  • Not acceptable values: foo, my.awesome.custom.local.dns.server.

If the DNS server cannot be reached the agent will fall back on the host's DNS configuration and output a message in the appsignal.log file: A problem occurred while setting DNS servers.

enable_allocation_tracking

Config file keyenable_allocation_tracking
System environment keyAPPSIGNAL_ENABLE_ALLOCATION_TRACKING
Requiredno
TypeBoolean (true / false)
Default valuetrue
Available since version1.0.0

Description

Set this option to false to disable tracking of the number of allocated objects in Ruby.

enable_frontend_error_catching

Config file keyenable_frontend_error_catching
System environment keyAPPSIGNAL_ENABLE_FRONTEND_ERROR_CATCHING
Requiredno
TypeBoolean (true / false)
Default valuefalse
Available since version1.0.0
3.0.0: Removed from the gem. See our upgrade guide for more information.

Description

Enable the experimental front-end error catching system. This will add a route to your app on /appsignal_error_catcher that can be used to catch JavaScript error and send them to AppSignal. You can configure this route with frontend_error_catching_path.

enable_host_metrics

Config file keyenable_host_metrics
System environment keyAPPSIGNAL_ENABLE_HOST_METRICS
Requiredno
TypeBoolean (true / false)
Default valuetrue / detected by system
Available since version1.2.0

Description

Set this option to false to disable host metrics collection.

On Heroku and Dokku host metrics are disabled by default. This is done because these systems will report inaccurate metrics from within the containers. Host metrics collection on these systems cannot be enabled. For Heroku, use the Heroku log drain instead.

enable_minutely_probes

Config file keyenable_minutely_probes
System environment keyAPPSIGNAL_ENABLE_MINUTELY_PROBES
Requiredno
TypeBoolean (true / false)
Default valuetrue
Available since version1.3.0
2.9.0: Default value was changed to true.

Description

Enables the minutely probes system.

enable_statsd

Config file keyenable_statsd
System environment keyAPPSIGNAL_ENABLE_STATSD
Requiredno
TypeBoolean (true / false)
Default valuetrue
Available since version3.0.14

Description

Enables the StatsD server in the AppSignal agent.

endpoint

Config file keyendpoint
System environment keyAPPSIGNAL_PUSH_API_ENDPOINT
Requiredno
TypeString
Default valuehttps://push.appsignal.com
Available since version0.1.0
1.0.0: Support for system environment variable added.

Description

Configure the endpoint to send data to AppSignal. This setting will not have to be changed.

files_world_accessible

Config file keyfiles_world_accessible
System environment keyAPPSIGNAL_FILES_WORLD_ACCESSIBLE
Requiredno
TypeBoolean (true / false)
Default valuetrue
Available since version2.3.6

Description

If this is set to true the AppSignal working directory that is created is accessible for all users (Unix permissions 0666). This is often necessary because processes for the same app run under a different user. Set to false to disable this behaviour (Unix permissions 0644).

filter_parameters

Config file keyfilter_parameters
System environment keyAPPSIGNAL_FILTER_PARAMETERS
Requiredno
TypeArray<String>
Default value[]
Available since version1.3.0
2.3.0: This config option is also used for argument filtering in background job integrations.

Description

List of parameter keys that should be ignored using AppSignal filtering. Their values will be replaced with [FILTERED] when transmitted to AppSignal. You can configure this with a list of keys in the configuration file.

# config/appsignal.yml
default: &defaults
  filter_parameters:
    - password
    - email
    - api_token
    - token

Read more about parameter filtering.

filter_session_data

Config file keyfilter_session_data
System environment keyAPPSIGNAL_FILTER_SESSION_DATA
Requiredno
TypeArray<String>
Default value[]
Available since version2.6.0
An upgrade to version 2.6.1 or higher is recommended.

Description

List of session data keys that should be ignored using AppSignal filtering. Their values will be replaced with [FILTERED] when transmitted to AppSignal. You can configure this with a list of keys in the configuration file.

# config/appsignal.yml
default: &defaults
  filter_session_data:
    - name
    - email
    - api_token
    - token

Read more about session data filtering.

hostname

Config file keyhostname
System environment keyAPPSIGNAL_HOSTNAME
Requiredno
TypeString
Default valuedetected from system
Available since version1.3.6

Description

This overrides the server's hostname. Useful for when you're unable to set a custom hostname or when a nondescript id is generated for you on hosting services.

http_proxy

Config file keyhttp_proxy
System environment keyAPPSIGNAL_HTTP_PROXY
Requiredno
TypeString
Default valuenil (This is unset by default)
Available since version0.11.13

Description

If you require the agent to connect to the Internet via a proxy set the complete proxy URL in this configuration key.

ignore_actions

Config file keyignore_actions
System environment keyAPPSIGNAL_IGNORE_ACTIONS
Requiredno
TypeArray<String>
Default value[]
Available since version0.10.0

Description

List of actions that will be ignored, everything that happens including exceptions will not be transmitted to AppSignal.

Read more about ignoring actions.

ignore_errors

Config file keyignore_errors
System environment keyAPPSIGNAL_IGNORE_ERRORS
Requiredno
TypeArray<String>
Default value[]
Available since version0.1.0

Description

List of error classes that will be ignored. Any exception raised with this error class will not be transmitted to AppSignal. Read more about ignoring errors.

ignore_namespaces

Config file keyignore_namespaces
System environment keyAPPSIGNAL_IGNORE_NAMESPACES
Requiredno
TypeArray<String>
Default value[]
Available since version2.3.0

Description

List of namespaces that will be ignored. Any error raised or slow request that occurs in this namespace will not be send to AppSignal. Read more about namespaces.

instrument_http_rb

Config file keyinstrument_http_rb
System environment keyAPPSIGNAL_INSTRUMENT_HTTP_RB
Requiredno
TypeBoolean (true / false)
Default valuetrue
Available since version3.2.0

Description

Enable or disable the instrumentation for the http.rb Ruby gem. Enabled by default.

instrument_net_http

Config file keyinstrument_net_http
System environment keyAPPSIGNAL_INSTRUMENT_NET_HTTP
Requiredno
TypeBoolean (true / false)
Default valuetrue
Available since version0.9.0

Description

Whether to add instrumentation for net/http calls, can be true or false.

instrument_redis

Config file keyinstrument_redis
System environment keyAPPSIGNAL_INSTRUMENT_REDIS
Requiredno
TypeBoolean (true / false)
Default valuetrue
Available since version1.0.0

Description

Whether to enable the instrumentation for Redis queries using the Redis gem, can be true or false.

instrument_sequel

Config file keyinstrument_sequel
System environment keyAPPSIGNAL_INSTRUMENT_SEQUEL
Requiredno
TypeBoolean (true / false)
Default valuetrue
Available since version1.0.0

Description

Whether to add instrumentation for sequel queries using the Sequel gem, can be true or false.

log

Config file keylog
System environment keyAPPSIGNAL_LOG
Requiredno
TypeString
Default valuefile
Available since version2.0.0

Description

This option configures what logger that AppSignal's internal logging functionality will use and does not affect the logging feature.


Note: At this time only the AppSignal integration supports the "stdout" log output feature. The AppSignal agent, which is used by the integration, does not support "stdout" log output. It will always write to the "appsignal.log" file.

Select which logger the AppSignal integration will use. Accepted values are file and stdout. See also the log_path configuration.

  • file (default)
    • Write all AppSignal logs to the file system.
  • stdout (default on Heroku)
    • Print AppSignal logs in the parent process' STDOUT instead of to a file. Useful with hosting solutions such as container systems and Heroku.

log_level

Config file keylog_level
System environment keyAPPSIGNAL_LOG_LEVEL
Requiredno
TypeString
Default valueinfo
Available since version3.0.16

Description

This option sets the severity level of AppSignal's internal logger and does not affect the logging feature.

Set the severity level of AppSignal's internal logger. If it is configured to "info" it will log all error, warning and info messages, but not log the debug messages.

Setting it to the levels "debug" or "trace" is usually only needed on request from support. Setting the level to "debug"/"trace" could have a slight impact on the disk usage and IO, especially on high-traffic sites. CPU overhead is minimal with the debug option enabled.

Accepted values:

  • error
  • warning
  • info
  • debug
  • trace

log_path

Config file keylog_path
System environment keyAPPSIGNAL_LOG_PATH
Requiredno
TypeString
Default value./log
Available since version1.0.0

Description

This option configures the location of AppSignal's internal logging file and does not affect the logging feature.


Note: The specified path cannot contain Operating Specific file system abstractions, such as the homedir symbol ~ for *NIX systems. This will be seen as a malformed path.

Override the location of the path (directory) where the appsignal.log file can be written to.

request_headers

Config file keyrequest_headers
System environment keyAPPSIGNAL_REQUEST_HEADERS
Requiredno
TypeArray<String>
Default value["HTTP_ACCEPT", "HTTP_ACCEPT_CHARSET", "HTTP_ACCEPT_ENCODING", "HTTP_ACCEPT_LANGUAGE", "HTTP_CACHE_CONTROL", "HTTP_CONNECTION", "CONTENT_LENGTH", "PATH_INFO", "HTTP_RANGE", "REQUEST_METHOD", "REQUEST_URI", "SERVER_NAME", "SERVER_PORT", "SERVER_PROTOCOL"]
Available since version2.6.0
Upgrade to 2.6.1 or higher is recommend.

Description

The request_headers config option contains a list of HTTP request headers which are read and stored by the AppSignal Ruby gem.

This request_headers config option is an allowlist, which means that it will only take headers as specified by this config option. If this config option is unset it will use the AppSignal default.

Following list is the AppSignal gem default.

# config/appsignal.yml
default: &defaults
  request_headers:
    - HTTP_ACCEPT
    - HTTP_ACCEPT_CHARSET
    - HTTP_ACCEPT_ENCODING
    - HTTP_ACCEPT_LANGUAGE
    - HTTP_CACHE_CONTROL
    - HTTP_CONNECTION
    - CONTENT_LENGTH
    - PATH_INFO
    - HTTP_RANGE
    - REQUEST_METHOD
    - REQUEST_URI
    - SERVER_NAME
    - SERVER_PORT
    - SERVER_PROTOCOL

Note that AppSignal reads the headers from your app and they may not match 1 to 1 with what is being sent in the browser/client. In Rack apps (Rails, Sinatra, etc) all custom headers are prefixed with the HTTP_ string, all header names are uppercased and dashes (-) are replaced with underscores (_).

For example, the X-Hub-Signature header can be access by your app and AppSignal with the HTTP_X_HUB_SIGNATURE name.

To configure AppSignal to not store any HTTP request headers on AppSignal transactions, configure the option with an empty array.

# config/appsignal.yml
default: &defaults
  request_headers: []

revision

Config file keyrevision
System environment keyAPP_REVISION
Requiredno
TypeString
Default valuenil (This is unset by default)
Available since version2.6.0
An upgrade to 2.6.1 or higher is recommended when using this option.
2.9.13: Auto detection for Heroku deploys with the Dyno Metadata labs feature enabled.
2.9.14: Do not use this release if you depend on the Heroku dyno metadata detection.

Description

Set the app revision for the currently running version of your app. Used to create deploy markers and tag all incoming data to a certain deploy for the host.

When using Heroku with the Heroku Labs: Dyno Metadata enabled it will automatically set the revision config option to to the HEROKU_SLUG_COMMIT system environment variable. This will automatically report new deploys when the Heroku app gets deployed. The revision can still be overwritten by setting the revision config option yourself.

Read more about deploy markers on the deploy markers.

running_in_container

Config file keyrunning_in_container
System environment keyAPPSIGNAL_RUNNING_IN_CONTAINER
Requiredno
TypeBoolean (true / false)
Default valuedetected by Ruby gem
Available since version1.0.0
Automatically detected since version 2.0

Description

AppSignal expects to be running on the same machine between different deploys. Set this key to true if you use a container based deployment system such as Docker.

Newer versions of the AppSignal integration automatically detect its container environment, so no manual configuration is necessary. If you're having trouble with the automatic detection, please contact support.

This option is set to true automatically on Heroku.

send_environment_metadata

Config file keysend_environment_metadata
System environment keyAPPSIGNAL_SEND_ENVIRONMENT_METADATA
Requiredno
TypeBoolean (true / false)
Default valuetrue
Available since version2.11.0

Description

Send environment metadata about the app.

For more information please read about environment metadata.

send_params

Config file keysend_params
System environment keyAPPSIGNAL_SEND_PARAMS
Requiredno
TypeBoolean (true / false)
Default valuetrue
Available since version0.9.0
1.3.0: Support added for the system environment option.

Description

Whether to skip sending request parameters to AppSignal.

For more information please read about send_params in filtering request parameters.

send_session_data

Config file keysend_session_data
System environment keyAPPSIGNAL_SEND_SESSION_DATA
Requiredno
TypeBoolean (true / false)
Default valuetrue
Available since version3.0.20

Description

Set this option to false to not send any session data with exception traces and performance issue samples.

skip_session_data

Config file keyskip_session_data
System environment keyAPPSIGNAL_SKIP_SESSION_DATA
Requiredno
TypeBoolean (true / false)
Default valuefalse
Available since version0.11.0
3.0.20: Deprecated in favor of send_session_data.

Description

Warning: This config option is deprecated in Ruby gem 3.0.20. Please use the send_session_data option instead for newer versions of the Ruby gem.

transaction_debug_mode

Config file keytransaction_debug_mode
System environment keyAPPSIGNAL_TRANSACTION_DEBUG_MODE
Requiredno
TypeBoolean (true / false)
Default valuefalse
Available since version2.9.18
Deprecated since version 3.0.16 in favor of the log_level config option.

Description

Warning: This config option is deprecated in Ruby gem 3.0.16. Please use the log_level option instead for Ruby gem 3.0.16 and newer.

Enable transaction debug mode. This enables very detailed logging of transactions and events which is useful when developing integrations or when events aren not tracked as expected. The log is only written if the general debug option is on as well.

This option sets the severity level of AppSignal's internal logger and does not affect the logging feature.

working_dir_path

Config file keyworking_dir_path
System environment keyAPPSIGNAL_WORKING_DIR_PATH
Requiredno
TypeString
Default valuedetected by agent

Description

Warning: This config option is deprecated in Ruby gem 2.7.0. Please use the working_directory_path option instead for Ruby gem 2.7.0 and newer.
Override the location where AppSignal for Ruby creates a working directory. See working_directory_path for the behavior it is applicable. This config option appends /appsignal to the specified path, where working_directory_path does not.
Note: The specified path cannot contain Operating Specific file system abstractions, such as the homedir symbol ~ for *NIX systems. This will be seen as a malformed path.

working_directory_path

Config file keyworking_directory_path
System environment keyAPPSIGNAL_WORKING_DIRECTORY_PATH
Requiredno
TypeString
Default valuedetected by agent
Available since version2.7.0
2.10.12: Support added for the system environment option.
Please use the working_dir_path option on versions older than 2.7.0.

Description

Override the location where AppSignal for Ruby can store temporary files. Use this option if the default location is not suitable. See our how AppSignal operates page for more information about the purpose of this working directory.

If you are running multiple applications using AppSignal on the same server, use this configuration option to select different working directories for every AppSignal instance, otherwise the two instances could conflict with one another. For more information on this scenario see our running multiple applications on one host documentation.

# config/appsignal.yml
default: &defaults
  working_directory_path: "/tmp/project_1/"
Note: The specified path cannot contain Operating Specific file system abstractions, such as the homedir symbol ~ for *NIX systems. This will be seen as a malformed path.

Need more help?

Contact us and speak directly with the engineers working on AppSignal. They will help you get set up, tweak your code and make sure you get the most out of using AppSignal.

Contact us

Start a trial - 30 days free

AppSignal is a great way to monitor your Ruby, Elixir & Node.js applications. Works great with Rails, Phoenix, Express and other frameworks, with support for background jobs too. Let's improve your apps together.

Start a trial