Class: Contrast::Config::RubyConfiguration

Inherits:
BaseConfiguration show all
Defined in:
lib/contrast/config/ruby_configuration.rb

Overview

Common Configuration settings. Those in this section pertain to the specific settings that apply to Ruby

Constant Summary collapse

DISABLED_RAKE_TASK_LIST =

These commands being detected will result the agent disabling instrumentation, generally any command that doesn’t result in the application listening on a port can be added here, this normally includes tasks that are ran pre-startup(like migrations) or to show information about the application(such as routes)

%w[
  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 graphql:install graphql:object
  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 webpacker:compile contrast:service:start contrast:service:status contrast:service:stop
].cs__freeze
DEFAULT_UNINSTRUMENTED_NAMESPACES =
%w[FactoryGirl FactoryBot].cs__freeze
KEYS =
{
    disabled_agent_rake_tasks: Contrast::Config::DefaultValue.new(DISABLED_RAKE_TASK_LIST),
    exceptions: Contrast::Config::ExceptionConfiguration,
    # controls whether or not we patch interpolation, either by rewrite or by funchook
    interpolate: Contrast::Config::DefaultValue.new(Contrast::Utils::ObjectShare::TRUE),
    # controls whether or not we patch the rb_yield block to track split propagation
    propagate_yield: Contrast::Config::DefaultValue.new(Contrast::Utils::ObjectShare::TRUE),
    # control whether or not we run file scanning rules on require
    require_scan: Contrast::Config::DefaultValue.new(Contrast::Utils::ObjectShare::TRUE),
    # controls whether or not we track frozen Strings by replacing them
    track_frozen_sources: Contrast::Config::DefaultValue.new(Contrast::Utils::ObjectShare::TRUE),
    uninstrument_namespace: Contrast::Config::DefaultValue.new(DEFAULT_UNINSTRUMENTED_NAMESPACES)
}.cs__freeze

Constants inherited from BaseConfiguration

BaseConfiguration::BOOLEANS, BaseConfiguration::EMPTY_VALUE

Instance Attribute Summary

Attributes inherited from BaseConfiguration

#map

Instance Method Summary collapse

Methods inherited from BaseConfiguration

#assign_value_to_path_array, #nil?

Constructor Details

#initialize(hsh) ⇒ RubyConfiguration

Returns a new instance of RubyConfiguration.



39
40
41
# File 'lib/contrast/config/ruby_configuration.rb', line 39

def initialize hsh
  super(hsh, KEYS)
end