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'                 => [],
  '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,
  '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' => [],
  '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)


324
325
326
# File 'lib/scout_apm/config.rb', line 324

def any_keys_found?
  false
end

#has_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


319
320
321
# File 'lib/scout_apm/config.rb', line 319

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

#nameObject



328
329
330
# File 'lib/scout_apm/config.rb', line 328

def name
  "defaults"
end

#value(key) ⇒ Object



315
316
317
# File 'lib/scout_apm/config.rb', line 315

def value(key)
  DEFAULTS[key]
end