Module: OneApm::Configuration

Defined in:
lib/one_apm/configuration.rb,
lib/one_apm/configuration/yaml_source.rb,
lib/one_apm/configuration/manual_source.rb,
lib/one_apm/configuration/server_source.rb,
lib/one_apm/configuration/default_source.rb,
lib/one_apm/configuration/environment_source.rb,
lib/one_apm/configuration/high_security_source.rb

Defined Under Namespace

Classes: Boolean, DefaultSource, EnvironmentSource, HighSecuritySource, Manager, ManualSource, ServerSource, YamlSource

Constant Summary collapse

OA_MASK_DEFAULTS =
{
  :'thread_profiler' =>         Proc.new { !OneApm::Agent::Threading::BacktraceService.is_supported? },
  :'thread_profiler.enabled' => Proc.new { !OneApm::Agent::Threading::BacktraceService.is_supported? }
}
OA_AUTOSTART_BLACKLISTED_RAKE_TASKS =
[
  'about',
  'assets:clean',
  'assets:clobber',
  'assets:environment',
  'assets:precompile',
  'assets:precompile:all',
  'db:create',
  'db:drop',
  'db:fixtures:load',
  'db:migrate',
  'db:migrate:status',
  'db:rollback',
  'db:schema:cache:clear',
  'db:schema:cache:dump',
  'db:schema:dump',
  'db:schema:load',
  'db:seed',
  'db:setup',
  'db:structure:dump',
  'db:version',
  'doc:app',
  'log:clear',
  'middleware',
  'notes',
  'notes:custom',
  'rails:template',
  'rails:update',
  'routes',
  'secret',
  'spec',
  'spec:features',
  'spec:requests',
  'spec:controllers',
  'spec:helpers',
  'spec:models',
  'spec:views',
  'spec:routing',
  'spec:rcov',
  'stats',
  'test',
  'test:all',
  'test:all:db',
  'test:recent',
  'test:single',
  'test:uncommitted',
  'time:zones:all',
  'tmp:clear',
  'tmp:create'
].join(',').freeze
DEFAULTS =
{
  :license_key => {
    :default      => '',
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Your OneApm license key.'
  },
  :agent_enabled => {
    :default      => DefaultSource.agent_enabled,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable the agent.'
  },
  :enabled => {
    :default      => true,
    :public       => false,
    :type         => Boolean,
    :aliases      => [:enable],
    :notified     => false,
    :description  => 'Enable or disable the agent.'
  },
  :app_name => {
    :default      => DefaultSource.app_name,
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Naming your application.'
  },
  :monitor_mode => {
    :default      => value_of(:enabled),
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable the transmission of data to the OneApm collector.'
  },
  :log_level => {
    :default      => 'info',
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Log level for agent logging: error, warn, info or debug.'
  },
  :high_security => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable high security mode, a suite of security features designed to protect data in an enterprise setting.'
  },
  :ssl => {
    :default      => true,
    :allow_nil    => true,
    :public       => true,
    :type         => Boolean,
    :notified     => true,
    :description  => 'Enable or disable SSL for transmissions to the OneApm collector). Defaults to true'
  },
  :proxy_host => {
    :default      => nil,
    :allow_nil    => true,
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Defines a host for communicating with OneApm via a proxy server.'
  },
  :proxy_port => {
    :default      => nil,
    :allow_nil    => true,
    :public       => true,
    :type         => Fixnum,
    :notified     => true,
    :description  => 'Defines a port for communicating with OneApm via a proxy server.'
  },
  :proxy_user => {
    :default      => nil,
    :allow_nil    => true,
    :public       => true,
    :type         => String,
    :local_only   => true,
    :notified     => true,
    :description  => 'Defines a user for communicating with OneApm via a proxy server.'
  },
  :proxy_pass => {
    :default      => nil,
    :allow_nil    => true,
    :public       => true,
    :type         => String,
    :local_only   => true,
    :notified     => true,
    :description  => 'Defines a password for communicating with OneApm via a proxy server.'
  },
  :capture_params => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => true,
    :description  => 'Enable or disable the capture of HTTP request parameters to be attached to transaction traces and traced errors.'
  },
  :config_path => {
    :default      => DefaultSource.config_path,
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Path to <b>oneapm.yml</b>. When omitted the agent will check (in order) <b>config/oneapm.yml</b>.'
  },
  :config_search_paths => {
    :default      => DefaultSource.config_search_paths,
    :public       => false,
    :type         => Array,
    :notified     => false,
    :description  => "An array of candidate locations for the agent's configuration file."
  },
  :dispatcher => {
    :default      => DefaultSource.dispatcher,
    :public       => false,
    :type         => Symbol,
    :notified     => false,
    :description  => 'Autodetected application component that reports metrics to OneApm.'
  },
  :framework => {
    :default      => DefaultSource.framework,
    :public       => false,
    :type         => Symbol,
    :notified     => false,
    :description  => 'Autodetected application framework used to enable framework-specific functionality.'
  },
  :'autostart.blacklisted_constants' => {
    :default      => 'Rails::Console',
    :public       => true,
    :type         => String,
    :notified     => false,
    :description  => 'Defines a comma-delimited list of constants. When these constants are present, the agent will not start automatically (e.g. \'Rails::Console, UninstrumentedBackgroundJob\').'
  },
  :'autostart.blacklisted_executables' => {
    :default      => 'irb,rspec',
    :public       => true,
    :type         => String,
    :notified     => false,
    :description  => 'Defines a comma-delimited list of executables that should not be instrumented by the agent (e.g. \'rake,my_ruby_script.rb\').'
  },
  :'autostart.blacklisted_rake_tasks' => {
    :default      => OA_AUTOSTART_BLACKLISTED_RAKE_TASKS,
    :public       => true,
    :type         => String,
    :notified     => false,
    :description  => 'Defines a comma-delimited list of rake tasks that should not be instrumented by the agent (e.g. \'assets:precompile,db:migrate\').'
  },
  :apdex_t => {
    :default      => 0.5,
    :public       => true,
    :type         => Float,
    :deprecated   => true,
    :notified     => true,
    :description  => 'Apdex score, Apdex T is the threshold at which OneApm will begin alerting. By default the agent will send alerts when the Apdex score drops below 0.5, or when more than half of users are experiencing degraded application performance.'
  },
  :'strip_exception_messages.enabled' => {
    :default      => value_of(:high_security),
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Defines whether the agent should strip messages from all exceptions that are not specified in the whitelist. Enabled automatically in high security mode.'
  },
  :'strip_exception_messages.whitelist' => {
    :default      => '',
    :public       => true,
    :type         => String,
    :notified     => false,
    :description  => 'Defines a comma-delimited list of exceptions from which the agent will not strip messages when strip_exception_messages is enabled (such as \'ImportantException, PreserveMessageException\').'
  },
  :host => {
    :default      => 'appcollector.oneapm.com',
    :public       => false,
    :type         => String,
    :notified     => false,
    :description  => "URI for the OneApm data collection service."
  },
  :port => {
    :default      => DefaultSource.port,
    :public       => false,
    :type         => Fixnum,
    :notified     => false,
    :description  => 'Port for the OneApm data collection service.'
  },
  :sync_startup => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable synchronous connection to the OneApm data collection service during application startup.'
  },
  :send_data_on_exit => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable the exit handler that sends data to the OneApm collector) before shutting down.'
  },
  :post_size_limit => {
    :default      => 2 * 1024 * 1024, # 2MB
    :public       => false,
    :type         => Fixnum,
    :notified     => false,
    :description  => 'Maximum number of bytes to send to the OneApm data collection service.'
  },
  :timeout => {
    :default      => 2 * 60, # 2 minutes
    :public       => true,
    :type         => Fixnum,
    :notified     => false,
    :description  => 'Maximum number of seconds to attempt to contact the OneApm collector).'
  },
  :force_send => {
    :default      => false,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable the forced sending of data to the OneApm data collection service when shutting down.'
  },
  :send_environment_info => {
    :default      => true,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable transmission of application environment information to the OneApm data collection service.'
  },
  :developer_mode => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => true,
    :description  => "developer mode for profiling in development, should be disable in production"
  },
  :'resque.use_harvest_lock' => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable synchronizing Resque job forking with OneApm\'s harvest thread. The default is false. This helps prevent Resque jobs from deadlocking, but prevents OneApm from starting new jobs during harvest.'
  },
  :data_report_period => {
    :default      => 60,
    :public       => false,
    :type         => Fixnum,
    :notified     => false,
    :description  => 'Number of seconds betwixt connections to the OneApm data collection service. Note that transaction events have a separate report period, specified by data_report_periods.analytic_event_data.'
  },
  :'data_report_periods.analytic_event_data' => {
    :default      => 60,
    :public       => false,
    :type         => Fixnum,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Number of seconds between connections to the OneApm data collection service for sending transaction event data.'
  },
  :update_rule_period => {
      :default      => 60,
      :public       => false,
      :type         => Fixnum,
      :notified     => false,
      :description  => 'Number of seconds fetch btm config from the OneApm service.'
  },
  :keep_retrying => {
    :default      => true,
    :public       => false,
    :type         => Boolean,
    :deprecated   => true,
    :notified     => false,
    :description  => 'Enable or disable retrying failed connections to the OneApm data collection service.'
  },
  :force_reconnect => {
    :default      => false,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Force a new connection to the server before running the worker loop. Creates a separate agent run and is recorded as a separate instance by the OneApm data collection service.'
  },
  :report_instance_busy => {
    :default      => true,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable transmission of metrics recording the percentage of time application instances spend servicing requests (duty cycle metrics).'
  },
  :log_file_name => {
    :default      => 'oneapm_agent.log',
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Defines a name for the log file.'
  },
  :log_file_path => {
    :default      => 'log/',
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Defines a path to the agent log file, excluding the filename.'
  },
  :'audit_log.enabled' => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => true,
    :description  => 'Enable or disable the audit log, a log of communications with the OneApm collector).'
  },
  :'audit_log.path' => {
    :default      => DefaultSource.audit_log_path,
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Specifies a path to the audit log file (including the filename).'
  },
  :disable_samplers => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable the collection of sampler metrics. Sampler metrics are metrics that are not event-based (such as CPU time or memory usage).'
  },
  :disable_resque => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable Resque instrumentation.'
  },
  :disable_sidekiq => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable Sidekiq instrumentation.'
  },
  :disable_dj => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable Delayed::Job instrumentation.'
  },
  :disable_sinatra => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable Sinatra instrumentation.'
  },
  :disable_sinatra_auto_middleware => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable agent middleware for Sinatra. This middleware is responsible for Sinatra advanced feature support; for example, cross application tracing, page load timing (sometimes referred to as real user monitoring or RUM), and error collection.'
  },
  :disable_view_instrumentation => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable view instrumentation.'
  },
  :disable_backtrace_cleanup => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Defines whether the agent will remove oneapm_rpm from backtraces.'
  },
  :disable_harvest_thread => {
    :default      => false,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable the harvest thread.'
  },
  :disable_activerecord => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable active record instrumentation.'
  },
  :disable_activejob => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Enable or disable ActiveJob instrumentation.'
  },
  :disable_memcache => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable memcache instrumentation.'
  },
  :disable_redis => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable redis instrumentation.'
  },
  :disable_gc_profiler => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable the use of GC::Profiler to measure time spent in garbage collection'
  },
  :'sidekiq.capture_params' => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable the capture of job arguments for transaction traces and traced errors in Sidekiq.'
  },
  :'resque.capture_params' => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable the capture of job arguments for transaction traces and traced errors in Resque.'
  },
  :capture_memcache_keys => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable the capture of memcache keys from transaction traces.'
  },
  :'transaction_tracer.enabled' => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => true,
    :description  => 'Enable or disable transaction traces.'
  },
  :'transaction_tracer.transaction_threshold' => {
    :default      => DefaultSource.transaction_tracer_transaction_threshold,
    :public       => true,
    :type         => Float,
    :notified     => true,
    :description  => 'The agent will collect traces for transactions that exceed this time threshold (in seconds). Specify a float value or apdex_f.'
  },
  :'transaction_tracer.record_sql' => {
    :default      => 'obfuscated',
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Obfuscation level for SQL queries reported in transaction trace segments. Valid options are obfuscated, raw, none.'
  },
  :'transaction_tracer.capture_attributes' => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => true,
    :description  => 'Enable or disable collection of custom attributes on transaction traces.'
  },
  :'transaction_tracer.explain_threshold' => {
    :default      => 0.5,
    :public       => true,
    :type         => Float,
    :notified     => true,
    :description  => 'Threshold (in seconds) above which the agent will collect explain plans. Relevant only when explain_enabled is true.'
  },
  :'transaction_tracer.explain_enabled' => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => true,
    :description  => 'Enable or disable the collection of explain plans in transaction traces. This setting will also apply to explain plans in Slow SQL traces if slow_sql.explain_enabled is not set separately.'
  },
  :'transaction_tracer.stack_trace_threshold' => {
    :default      => 0.5,
    :public       => true,
    :type         => Float,
    :notified     => true,
    :description  => 'Stack traces will be included in transaction trace segments when their duration exceeds this threshold.'
  },
  :'transaction_tracer.limit_segments' => {
    :default      => 4000,
    :public       => true,
    :type         => Fixnum,
    :notified     => true,
    :description  => 'Maximum number of transaction trace segments to record in a single transaction trace.'
  },
  :disable_sequel_instrumentation => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable Sequel instrumentation.'
  },
  :disable_mongo => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Defines whether the agent will install instrumentation for the Mongo gem.'
  },
  :disable_mongo_moped => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Defines whether the agent will install instrumentation for the Mongoid Moped gem.'
  },
  :'slow_sql.enabled' => {
    :default      => value_of(:'transaction_tracer.enabled'),
    :public       => true,
    :type         => Boolean,
    :notified     => true,
    :description  => 'Enable or disable collection of slow SQL queries.'
  },
  :'slow_sql.explain_threshold' => {
    :default      => value_of(:'transaction_tracer.explain_threshold'),
    :public       => true,
    :type         => Float,
    :notified     => true,
    :description  => 'Defines a duration threshold, over which the agent will collect explain plans in slow SQL queries.'
  },
  :'slow_sql.explain_enabled' => {
    :default      => value_of(:'transaction_tracer.explain_enabled'),
    :public       => true,
    :type         => Boolean,
    :notified     => true,
    :description  => 'Enable or disable the collection of explain plans in slow SQL queries. If this setting is omitted, the transaction_tracer.explain_enabled setting will be applied as the default setting for explain plans in Slow SQL as well.'
  },
  :'slow_sql.record_sql' => {
    :default      => value_of(:'transaction_tracer.record_sql'),
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Defines an obfuscation level for slow SQL queries. Valid options are obfuscated, raw, none).'
  },
  :'mongo.capture_queries' => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable capturing Mongo queries in transaction traces.'
  },
  :'mongo.obfuscate_queries' => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable obfuscation of Mongo queries in transaction traces.'
  },
  :'error_collector.enabled' => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => true,
    :description  => 'Enable or disable recording of traced errors and error count metrics.'
  },
  :'error_collector.capture_attributes' => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable collection of custom attributes on errors.'
  },
  :'error_collector.ignore_errors' => {
    :default      => 'ActionController::RoutingError,Sinatra::NotFound',
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Specifies a comma-delimited list of error classes that the agent should ignore.'
  },
  :'rum.enabled' => {
    :default      => true,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable page load timing (sometimes referred to as real user monitoring or RUM).'
  },
  :browser_key => {
    :default      => '',
    :public       => false,
    :type         => String,
    :notified     => false,
    :description  => 'Real user monitoring license key for the browser timing header.'
  },
  :beacon => {
    :default      => '',
    :public       => false,
    :type         => String,
    :notified     => false,
    :description  => 'Beacon for real user monitoring.'
  },
  :error_beacon => {
    :default      => '',
    :public       => false,
    :type         => String,
    :notified     => false,
    :description  => 'Error beacon for real user monitoring.'
  },
  :application_id => {
    :default      => '',
    :public       => false,
    :type         => String,
    :notified     => false,
    :description  => 'Application ID for real user monitoring.'
  },
  :js_agent_file => {
    :default      => '',
    :public       => false,
    :type         => String,
    :notified     => false,
    :description  => 'Javascript agent file for real user monitoring.'
  },
  :'browser_monitoring.auto_instrument' => {
    :default      => value_of(:'rum.enabled'),
    :public       => true,
    :type         => Boolean,
    :notified     => true,
    :description  => 'Enable or disable automatic insertion of the JavaScript header into outgoing responses for page load timing (sometimes referred to as real user monitoring or RUM).'
  },
  :'browser_monitoring.capture_attributes' => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Forward custom attributes to Browser for collection by OneApm Insights.'
  },
  :'browser_monitoring.loader' => {
    :default      => DefaultSource.browser_monitoring_loader,
    :public       => private,
    :type         => String,
    :notified     => false,
    :description  => 'Type of JavaScript agent loader to use for browser monitoring instrumentation.'
  },
  :'browser_monitoring.loader_version' => {
    :default      => '',
    :public       => private,
    :type         => String,
    :notified     => false,
    :description  => 'Version of JavaScript agent loader (returned from the OneApm collector).)'
  },
  :'browser_monitoring.debug' => {
    :default      => false,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable debugging version of JavaScript agent loader for browser monitoring instrumentation.'
  },
  :'browser_monitoring.ssl_for_http' => {
    :default      => nil,
    :allow_nil    => true,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable HTTPS instrumentation by JavaScript agent on HTTP pages.'
  },
  :'browser_monitoring.whitelist_ips' => {
    :default      => '',
    :allow_nil    => true,
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Filter IPs which can be inerted JavaScript agent on HTTP pages.'
  },
  :'browser_monitoring.is_js_text' => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable insert js agent as text'
  },
  :'browser_monitoring.position' => {
    :default      => '',
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'position of page which is inerted JavaScript agent.'
  },
  :js_agent_loader => {
    :default      => '',
    :public       => false,
    :type         => String,
    :notified     => false,
    :description  => 'JavaScript agent loader content.'
  },
  :js_errors_beta => {
    :default      => false,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable beta JavaScript error reporting.'
  },
  :trusted_account_ids => {
    :default      => [],
    :public       => false,
    :type         => Array,
    :notified     => false,
    :description  => 'List of trusted OneApm account IDs for the purposes of cross-application tracing. Inbound requests from applications including cross-application headers that do not come from an account in this list will be ignored.'
  },
  :"cross_application_tracer.enabled" => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable cross application tracing.'
  },
  :encoding_key => {
    :default      => '',
    :public       => false,
    :type         => String,
    :notified     => false,
    :description  => 'Encoding key for cross-application tracing.'
  },
  :cross_process_id => {
    :default      => '',
    :public       => false,
    :type         => String,
    :notified     => false,
    :description  => 'Cross process ID for cross-application tracing.'
  },
  :'thread_profiler.enabled' => {
    :default      => DefaultSource.thread_profiler_enabled,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable the thread profiler.'
  },
  :'xray_session.enabled' => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable X-Ray sessions.'
  },
  :'xray_session.allow_traces' => {
    :default      => true,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable X-Ray sessions recording transaction traces.'
  },
  :'xray_session.allow_profiles' => {
    :default      => true,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable X-Ray sessions taking thread profiles.'
  },
  :'xray_session.max_samples' => {
    :default      => 10,
    :public       => false,
    :type         => Fixnum,
    :notified     => false,
    :description  => 'Maximum number of transaction traces to buffer for active X-Ray sessions'
  },
  :'xray_session.max_profile_overhead' => {
    :default      => 0.05,
    :public       => false,
    :type         => Float,
    :notified     => false,
    :description  => 'Maximum overhead percentage for thread profiling before agent reduces polling frequency'
  },
  :marshaller => {
    :default      => DefaultSource.marshaller,
    :public       => true,
    :type         => String,
    :notified     => false,
    :description  => 'Specifies a marshaller for transmitting data to the OneApm collector) (e.g json, pruby).'
  },
  :'analytics_events.enabled' => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable analytics event sampling.'
  },
  :'analytics_events.max_samples_stored' => {
    :default      => 1200,
    :public       => true,
    :type         => Fixnum,
    :notified     => false,
    :description  => 'Defines the maximum number of request events reported from a single harvest.'
  },
  :'analytics_events.capture_attributes' => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Include custom attributes in analytics event data.'
  },
  :restart_thread_in_children => {
    :default      => true,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Controls whether to check on running a transaction whether to respawn the harvest thread.'
  },
  :normalize_json_string_encodings => {
    :default      => DefaultSource.normalize_json_string_encodings,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Controls whether to normalize string encodings prior to serializing data for the collector to JSON.'
  },
  :disable_vm_sampler => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Defines whether the agent will sample performance measurements from the Ruby VM.'
  },
  :disable_memory_sampler => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Defines whether the agent will sample the memory usage of the host process.'
  },
  :disable_cpu_sampler => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Defines whether the agent will sample the CPU usage of the host process.'
  },
  :disable_delayed_job_sampler => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Defines whether the agent will measure the depth of Delayed Job queues.'
  },
  :disable_curb => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Defines whether the agent will install instrumentation for the curb gem.'
  },
  :disable_excon => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Defines whether the agent will install instrumentation for the excon gem.'
  },
  :disable_httpclient => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Defines whether the agent will install instrumentation for the httpclient gem.'
  },
  :disable_net_http => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Defines whether the agent will install instrumentation for Net::HTTP.'
  },
  :disable_rack => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Defines whether the agent will hook into Rack::Builder\'s to_app method to find gems to instrument during application startup.'
  },
  :disable_typhoeus => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :dynamic_name => true,
    :notified     => false,
    :description  => 'Defines whether the agent will install instrumentation for the typhoeus gem.'
  },
  :disable_rack_middleware => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Defines whether the agent will wrap third-party middlewares in instrumentation (regardless of whether they are installed via Rack::Builder or Rails).'
  },
  :labels => {
    :default      => '',
    :public       => true,
    :type         => String,
    :notified     => false,
    :description  => 'A dictionary of label names and values that will be applied to the data sent from this agent. May also be expressed as a semi-colon delimited string of colon-separated pairs (e.g. "Server:One;Data Center:Primary".'
  },
  :aggressive_keepalive => {
    :default      => true,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => 'If true, attempt to keep the TCP connection to the collector alive between harvests.'
  },
  :keep_alive_timeout => {
    :default      => 60,
    :public       => false,
    :type         => Fixnum,
    :notified     => false,
    :description  => 'Timeout for keep alive on TCP connection to collector if supported by Ruby version. Only used in conjunction when aggressive_keepalive is enabled.'
  },
  :ca_bundle_path => {
    :default      => nil,
    :allow_nil    => true,
    :public       => true,
    :type         => String,
    :notified     => false,
    :description  => "Manual override for the path to your local CA bundle. This CA bundle will be used to validate the SSL certificate presented by OneApm's data collection service."
  },
  :collect_utilization => {
    :default      => false,
    :public       => false,
    :type         => Boolean,
    :notified     => false,
    :description  => "Controls whether to collect processor and instance sizing data and send it to OneApm"
  },
  :'rules.ignore_url_regexes' => {
    :default      => [],
    :public       => true,
    :type         => Array,
    :transform    => DefaultSource.rules_ignore,
    :notified     => false,
    :description  => 'A list of patterns that will cause a transaction to be ignored if any of them match the URI.'
  },
  :'synthetics.traces_limit' => {
    :default      => 20,
    :public       => false,
    :type         => Fixnum,
    :notified     => false,
    :description  => 'Maximum number of synthetics transaction traces to hold for a given harvest'
  },
  :'synthetics.events_limit' => {
    :default      => 200,
    :public       => false,
    :type         => Fixnum,
    :notified     => false,
    :description  => 'Maximum number of synthetics transaction events to hold for a given harvest'
  },
  :'custom_insights_events.enabled' => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable custom Insights event recording.'
  },
  :'custom_insights_events.max_samples_stored' => {
    :default      => 1000,
    :public       => true,
    :type         => Fixnum,
    :notified     => false,
    :description  => 'Maximum number of custom Insights events buffered in memory at a time.',
    :dynamic_name => true
  },
  :disable_grape => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Disables installation of Grape instrumentation.'
  },
  :event_machine_standalone => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'enable standalone mode of event_machine'
  },
  :'redis.ignore_commands' => {
    :default      => [],
    :allow_nil    => true,
    :public       => true,
    :type         => Array,
    :notified     => true,
    :description  => 'A list of redis commands that will be ignore.'
  },
   :disable_rails_middleware => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => true,
    :description  => 'Defines whether the agent will wrap middlewares which are installed Rails.'
  },
   :agent_restart_file_name => {
    :default      => 'oneapm_restart.txt',
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Defines name of the agent restart file.'
  },
  :agent_restart_file_path => {
    :default      => 'tmp/',
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Defines a path to the agent restart file, excluding the filename.'
  },
  :disable_rabbitmq => {
    :default      => false,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or disable rabbitmq instrumentation.'
  },
  :'notified.enable' => {
    :default      => true,
    :public       => true,
    :type         => Boolean,
    :notified     => false,
    :description  => 'Enable or Disable custom notified angent config data to OneAPM server.'
  },
  :tier_name => {
    :default      => 'Tier Name',
    :public       => true,
    :type         => String,
    :notified     => true,
    :description  => 'Semicolon-delimited list of Tier Names.'
  },
  :cross_sampler_count => {
    :default      => 5,
    :public       => true,
    :type         => Fixnum,
    :notified     => true,
    :description  => 'Cross Application traces limit per minute.'
  }
}.freeze

Class Method Summary collapse

Class Method Details

.value_of(key) ⇒ Object



6
7
8
9
10
# File 'lib/one_apm/configuration/default_source.rb', line 6

def self.value_of(key)
  Proc.new do
    OneApm::Manager.config[key]
  end
end