Config sources
1. Gem defaults
The AppSignal gem starts with loading its default configuration, setting paths and enabling certain features. The agent defaults can be found in the gem source asAppsignal::Config::DEFAULT_CONFIG.
This source is listed as default in the diagnose output.
2. System detected settings
The gem detects what kind of system it’s running on and configures itself accordingly. For example, when it’s running inside a container based system (such as Docker and Heroku) it sets the configuration option:running_in_container to true.
This source is listed as system in the diagnose output.
3. Initial configuration given to Config initializer
When manually creating a Appsignal::Config class you can pass in the
initial configuration you want to apply. This is a hash of any of the
options described below.
initial in the diagnose output.
4. appsignal.yml config file
A way to configure your application is using the appsignal.yml file.
When you use the appsignal install command the gem will create one for you.
The path of this configuration file is {project_root}/config/appsignal.yml.
This step will override all given options from the defaults, system
detected and initializer configuration.
Read the appsignal.yml config file documentation for more information on how this configuration method works.
This source is listed as file in the diagnose output.
5. Environment variables
AppSignal will look for its configuration in environment variables. When found these will override all given configuration options from previous steps.env in the diagnose output.
6. appsignal.rb config file
A way to configure your application is using the appsignal.rb file.
The path of this configuration file is {project_root}/config/appsignal.rb.
This load path cannot be customized.
This step will override all given options from the defaults, system detected and environment variables.
If both an appsignal.yml config file and a appsignal.rb config file are present, only the appsignal.rb config file is loaded.
Read the appsignal.rb config file documentation for more information on how this configuration method works.
This source is listed as dsl in the diagnose output.
7. Appsignal.configure helper
Lastly, the Ruby gem can be configured using theAppsignal.configure helper in the application.
When called, any config options configured using this helper will overwrite all given configuration options from previous sources.
If a config/appsignal.rb config file is also present in the project, it will not be loaded if the Appsignal.configure helper is called first in your application.
Read the Appsignal.configure helper documentation for more information on how this configuration method works.
This source is listed as dsl in the diagnose output.