Class: ScoutApm::Config::ConfigDefaults

Inherits:
Object
  • Object
show all
Defined in:
lib/scout_apm/config.rb

Constant Summary collapse

DEFAULTS =
{
  'compress_payload'                     => true,
  'detailed_middleware'                  => false,
  'dev_trace'                            => false,
  'direct_host'                          => 'https://apm.scoutapp.com',
  'disabled_instruments'                 => [],
  'enable_background_jobs'               => true,
  'host'                                 => 'https://checkin.scoutapp.com',
  'ignore'                               => [],
  'ignore_endpoints'                     => [],
  'ignore_jobs'                          => [],
  'log_level'                            => 'info',
  'max_traces'                           => 10,
  'profile'                              => true, # for scoutprof
  'report_format'                        => 'json',
  'scm_subdirectory'                     => '',
  'uri_reporting'                        => 'full_path',
  'remote_agent_host'                    => '127.0.0.1',
  'remote_agent_port'                    => 7721, # picked at random
  'database_metric_limit'                => 5000, # The hard limit on db metrics
  'database_metric_report_limit'         => 1000,
  'external_service_metric_limit'        => 5000, # The hard limit on external service metrics
  'external_service_metric_report_limit' => 1000,
  'instrument_http_url_length'           => 300,
  'sample_rate'                          => 100,
  'sample_endpoints'                     => [],
  'sample_jobs'                          => [],
  'endpoint_sample_rate'                 => 100,
  'job_sample_rate'                      => 100,
  'start_resque_server_instrument'       => true, # still only starts if Resque is detected
  'collect_remote_ip'                    => true,
  'record_queue_time'                    => true,
  'timeline_traces'                      => true,
  'auto_instruments'                     => false,
  'auto_instruments_ignore'              => [],
  'use_prepend'                          => false,
  'alias_method_instruments'             => [],
  'prepend_instruments'                  => [],
  'ssl_cert_file'                        => File.join( File.dirname(__FILE__), *%w[.. .. data cacert.pem] ),
  'errors_enabled'                       => false,
  'errors_ignored_exceptions'            => %w(ActiveRecord::RecordNotFound ActionController::RoutingError),
  'errors_filtered_params'               => %w(password s3-key),
  'errors_host'                          => 'https://errors.scoutapm.com',
}.freeze

Instance Method Summary collapse

Instance Method Details

#any_keys_found?Boolean

Defaults are here, but not counted as user specified.

Returns:

  • (Boolean)


367
368
369
# File 'lib/scout_apm/config.rb', line 367

def any_keys_found?
  false
end

#has_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


362
363
364
# File 'lib/scout_apm/config.rb', line 362

def has_key?(key)
  DEFAULTS.has_key?(key)
end

#nameObject



371
372
373
# File 'lib/scout_apm/config.rb', line 371

def name
  "defaults"
end

#value(key) ⇒ Object



358
359
360
# File 'lib/scout_apm/config.rb', line 358

def value(key)
  DEFAULTS[key]
end