Class: Appsignal::Config::ConfigDSL
Overview
Configuration DSL for use in configuration blocks.
This class provides a Domain Specific Language for configuring AppSignal within the ‘Appsignal.configure` block. It provides getter and setter methods for all configuration options.
String Configuration Options collapse
-
#activejob_report_errors ⇒ String
Error reporting mode for ActiveJob (“all”, “discard” or “none”).
-
#bind_address ⇒ String
The host to the agent binds to for its HTTP server.
-
#ca_file_path ⇒ String
Path to the CA certificate file.
-
#endpoint ⇒ String
Push API endpoint URL.
-
#host_role ⇒ String
Role of the host for grouping in metrics.
-
#hostname ⇒ String
Override for the detected hostname.
-
#http_proxy ⇒ String
HTTP proxy URL.
-
#log ⇒ String
Log destination (“file” or “stdout”).
-
#log_level ⇒ String
AppSignal internal logger log level (“error”, “warn”, “info”, “debug”, “trace”).
-
#log_path ⇒ String
Path to the log directory.
-
#logging_endpoint ⇒ String
Endpoint for log transmission.
-
#name ⇒ String
The application name.
-
#nginx_port ⇒ String
Port for Nginx metrics collection.
-
#push_api_key ⇒ String
AppSignal Push API key.
-
#revision ⇒ String
Application revision identifier.
-
#sidekiq_report_errors ⇒ String
Error reporting mode for Sidekiq (“all”, “discard” or “none”).
-
#statsd_port ⇒ String
Port for StatsD metrics.
-
#working_directory_path ⇒ String
Override for the agent working directory.
Boolean Configuration Options collapse
-
#active ⇒ Boolean
Activate AppSignal for the loaded environment.
-
#enable_active_support_event_log_reporter ⇒ Boolean
Configure whether ActiveSupport::EventReporter integration is enabled.
-
#enable_allocation_tracking ⇒ Boolean
Configure whether allocation tracking is enabled.
-
#enable_at_exit_reporter ⇒ Boolean
Configure whether the at_exit reporter is enabled.
-
#enable_gvl_global_timer ⇒ Boolean
Configure whether the GVL global timer instrumentationis enabled.
-
#enable_gvl_waiting_threads ⇒ Boolean
Configure whether GVL waiting threads instrumentation is enabled.
-
#enable_host_metrics ⇒ Boolean
Configure whether host metrics collection is enabled.
-
#enable_minutely_probes ⇒ Boolean
Configure whether minutely probes are enabled.
-
#enable_nginx_metrics ⇒ Boolean
Configure whether the agent’s NGINX metrics endpoint is enabled.
-
#enable_rails_error_reporter ⇒ Boolean
Configure whether Rails error reporter integration is enabled.
-
#enable_rake_performance_instrumentation ⇒ Boolean
Configure whether Rake performance instrumentation is enabled.
-
#enable_statsd ⇒ Boolean
Configure whether the StatsD metrics endpoint on the agent is enabled.
-
#files_world_accessible ⇒ Boolean
Configure whether files created by AppSignal should be world accessible.
-
#instrument_http_rb ⇒ Boolean
Configure whether to instrument requests made with the http.rb gem.
-
#instrument_net_http ⇒ Boolean
Configure whether to instrument requests made with Net::HTTP.
-
#instrument_ownership ⇒ Boolean
Configure whether to instrument the Ownership gem.
-
#instrument_redis ⇒ Boolean
Configure whether to instrument Redis queries.
-
#instrument_sequel ⇒ Boolean
Configure whether to instrument Sequel queries.
-
#ownership_set_namespace ⇒ Boolean
Configure whether the Ownership gem instrumentation should set namespace.
-
#running_in_container ⇒ Boolean
Configure whether the application is running in a container.
-
#send_environment_metadata ⇒ Boolean
Configure whether to send environment metadata.
-
#send_params ⇒ Boolean
Configure whether to send request parameters.
-
#send_session_data ⇒ Boolean
Configure whether to send request session data.
Array Configuration Options collapse
-
#dns_servers ⇒ Array<String>
Custom DNS servers to use.
-
#filter_metadata ⇒ Array<String>
Metadata keys to filter from trace data.
-
#filter_parameters ⇒ Array<String>
Keys of parameter to filter.
-
#filter_session_data ⇒ Array<String>
Request session data keys to filter.
-
#ignore_actions ⇒ Array<String>
Ignore traces by action names.
-
#ignore_errors ⇒ Array<String>
List of errors to not report.
-
#ignore_logs ⇒ Array<String>
Ignore log messages by substrings.
-
#ignore_namespaces ⇒ Array<String>
Ignore traces by namespaces.
-
#request_headers ⇒ Array<String>
HTTP request headers to include in error reports.
Float Configuration Options collapse
-
#cpu_count ⇒ Float
CPU count override for metrics collection.
Instance Method Summary collapse
-
#activate_if_environment(*envs) ⇒ Boolean
Activates AppSignal if the current environment matches any of the given environments.
-
#app_path ⇒ String
Returns the application’s root path.
-
#env ⇒ String
Returns the current environment name.
-
#env?(given_env) ⇒ TrueClass, FalseClass
Returns true if the given environment name matches the loaded environment name.
Instance Attribute Details
#active ⇒ Boolean
Returns Activate AppSignal for the loaded environment.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#activejob_report_errors ⇒ String
Returns Error reporting mode for ActiveJob (“all”, “discard” or “none”).
|
|
# File 'lib/appsignal/config.rb', line 737
|
#bind_address ⇒ String
Returns The host to the agent binds to for its HTTP server.
|
|
# File 'lib/appsignal/config.rb', line 737
|
#ca_file_path ⇒ String
Returns Path to the CA certificate file.
|
|
# File 'lib/appsignal/config.rb', line 737
|
#cpu_count ⇒ Float
Returns CPU count override for metrics collection.
|
|
# File 'lib/appsignal/config.rb', line 880
|
#dns_servers ⇒ Array<String>
Returns Custom DNS servers to use.
|
|
# File 'lib/appsignal/config.rb', line 848
|
#enable_active_support_event_log_reporter ⇒ Boolean
Returns Configure whether ActiveSupport::EventReporter integration is enabled.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#enable_allocation_tracking ⇒ Boolean
Returns Configure whether allocation tracking is enabled.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#enable_at_exit_reporter ⇒ Boolean
Returns Configure whether the at_exit reporter is enabled.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#enable_gvl_global_timer ⇒ Boolean
Returns Configure whether the GVL global timer instrumentationis enabled.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#enable_gvl_waiting_threads ⇒ Boolean
Returns Configure whether GVL waiting threads instrumentation is enabled.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#enable_host_metrics ⇒ Boolean
Returns Configure whether host metrics collection is enabled.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#enable_minutely_probes ⇒ Boolean
Returns Configure whether minutely probes are enabled.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#enable_nginx_metrics ⇒ Boolean
Returns Configure whether the agent’s NGINX metrics endpoint is enabled.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#enable_rails_error_reporter ⇒ Boolean
Returns Configure whether Rails error reporter integration is enabled.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#enable_rake_performance_instrumentation ⇒ Boolean
Returns Configure whether Rake performance instrumentation is enabled.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#enable_statsd ⇒ Boolean
Returns Configure whether the StatsD metrics endpoint on the agent is enabled.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#endpoint ⇒ String
Returns Push API endpoint URL.
|
|
# File 'lib/appsignal/config.rb', line 737
|
#files_world_accessible ⇒ Boolean
Returns Configure whether files created by AppSignal should be world accessible.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#filter_metadata ⇒ Array<String>
Returns Metadata keys to filter from trace data.
|
|
# File 'lib/appsignal/config.rb', line 848
|
#filter_parameters ⇒ Array<String>
Returns Keys of parameter to filter.
|
|
# File 'lib/appsignal/config.rb', line 848
|
#filter_session_data ⇒ Array<String>
Returns Request session data keys to filter.
|
|
# File 'lib/appsignal/config.rb', line 848
|
#host_role ⇒ String
Returns Role of the host for grouping in metrics.
|
|
# File 'lib/appsignal/config.rb', line 737
|
#hostname ⇒ String
Returns Override for the detected hostname.
|
|
# File 'lib/appsignal/config.rb', line 737
|
#http_proxy ⇒ String
Returns HTTP proxy URL.
|
|
# File 'lib/appsignal/config.rb', line 737
|
#ignore_actions ⇒ Array<String>
Returns Ignore traces by action names.
|
|
# File 'lib/appsignal/config.rb', line 848
|
#ignore_errors ⇒ Array<String>
Returns List of errors to not report.
|
|
# File 'lib/appsignal/config.rb', line 848
|
#ignore_logs ⇒ Array<String>
Returns Ignore log messages by substrings.
|
|
# File 'lib/appsignal/config.rb', line 848
|
#ignore_namespaces ⇒ Array<String>
Returns Ignore traces by namespaces.
|
|
# File 'lib/appsignal/config.rb', line 848
|
#instrument_http_rb ⇒ Boolean
Returns Configure whether to instrument requests made with the http.rb gem.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#instrument_net_http ⇒ Boolean
Returns Configure whether to instrument requests made with Net::HTTP.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#instrument_ownership ⇒ Boolean
Returns Configure whether to instrument the Ownership gem.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#instrument_redis ⇒ Boolean
Returns Configure whether to instrument Redis queries.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#instrument_sequel ⇒ Boolean
Returns Configure whether to instrument Sequel queries.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#log ⇒ String
Returns Log destination (“file” or “stdout”).
|
|
# File 'lib/appsignal/config.rb', line 737
|
#log_level ⇒ String
Returns AppSignal internal logger log level (“error”, “warn”, “info”, “debug”, “trace”).
|
|
# File 'lib/appsignal/config.rb', line 737
|
#log_path ⇒ String
Returns Path to the log directory.
|
|
# File 'lib/appsignal/config.rb', line 737
|
#logging_endpoint ⇒ String
Returns Endpoint for log transmission.
|
|
# File 'lib/appsignal/config.rb', line 737
|
#name ⇒ String
Returns The application name.
|
|
# File 'lib/appsignal/config.rb', line 737
|
#nginx_port ⇒ String
Returns Port for Nginx metrics collection.
|
|
# File 'lib/appsignal/config.rb', line 737
|
#ownership_set_namespace ⇒ Boolean
Returns Configure whether the Ownership gem instrumentation should set namespace.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#push_api_key ⇒ String
Returns AppSignal Push API key.
|
|
# File 'lib/appsignal/config.rb', line 737
|
#request_headers ⇒ Array<String>
Returns HTTP request headers to include in error reports.
|
|
# File 'lib/appsignal/config.rb', line 848
|
#revision ⇒ String
Returns Application revision identifier.
|
|
# File 'lib/appsignal/config.rb', line 737
|
#running_in_container ⇒ Boolean
Returns Configure whether the application is running in a container.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#send_environment_metadata ⇒ Boolean
Returns Configure whether to send environment metadata.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#send_params ⇒ Boolean
Returns Configure whether to send request parameters.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#send_session_data ⇒ Boolean
Returns Configure whether to send request session data.
|
|
# File 'lib/appsignal/config.rb', line 788
|
#sidekiq_report_errors ⇒ String
Returns Error reporting mode for Sidekiq (“all”, “discard” or “none”).
|
|
# File 'lib/appsignal/config.rb', line 737
|
#statsd_port ⇒ String
Returns Port for StatsD metrics.
|
|
# File 'lib/appsignal/config.rb', line 737
|
#working_directory_path ⇒ String
Returns Override for the agent working directory.
|
|
# File 'lib/appsignal/config.rb', line 737
|
Instance Method Details
#activate_if_environment(*envs) ⇒ Boolean
Activates AppSignal if the current environment matches any of the given environments.
731 732 733 |
# File 'lib/appsignal/config.rb', line 731 def activate_if_environment(*envs) self.active = envs.map(&:to_s).include?(env) end |
#app_path ⇒ String
Returns the application’s root path.
704 705 706 |
# File 'lib/appsignal/config.rb', line 704 def app_path @config.root_path end |
#env ⇒ String
Returns the current environment name.
711 712 713 |
# File 'lib/appsignal/config.rb', line 711 def env @config.env end |
#env?(given_env) ⇒ TrueClass, FalseClass
Returns true if the given environment name matches the loaded environment name.
720 721 722 |
# File 'lib/appsignal/config.rb', line 720 def env?(given_env) env == given_env.to_s end |