lib/elastic_apm/config.rb in elastic-apm-0.6.2 vs lib/elastic_apm/config.rb in elastic-apm-0.7.0

- old
+ new

@@ -1,8 +1,9 @@ # frozen_string_literal: true require 'logger' +require 'yaml' module ElasticAPM # rubocop:disable Metrics/ClassLength # @api private class Config @@ -34,11 +35,11 @@ source_lines_error_app_frames: 5, source_lines_span_app_frames: 5, source_lines_error_library_frames: 0, source_lines_span_library_frames: 0, - disabled_injectors: %w[json], + disabled_spies: %w[json], current_user_id_method: :id, current_user_email_method: :email, current_user_username_method: :username, @@ -72,11 +73,11 @@ 'ELASTIC_APM_TRANSACTION_SAMPLE_RATE' => [:float, 'transaction_sample_rate'], 'ELASTIC_APM_VERIFY_SERVER_CERT' => [:bool, 'verify_server_cert'], 'ELASTIC_APM_TRANSACTION_MAX_SPANS' => [:int, 'transaction_max_spans'], - 'ELASTIC_APM_DISABLED_INJECTORS' => [:list, 'disabled_injectors'] + 'ELASTIC_APM_DISABLED_SPIES' => [:list, 'disabled_spies'] }.freeze def initialize(options = {}) set_defaults @@ -121,11 +122,11 @@ attr_accessor :source_lines_error_app_frames attr_accessor :source_lines_span_app_frames attr_accessor :source_lines_error_library_frames attr_accessor :source_lines_span_library_frames - attr_accessor :disabled_injectors + attr_accessor :disabled_spies attr_accessor :view_paths attr_accessor :root_path attr_accessor :current_user_method @@ -168,11 +169,11 @@ def logger=(logger) @logger = logger || build_logger(log_path, log_level) end # rubocop:disable Metrics/MethodLength - def available_injectors + def available_spies %w[ action_dispatch delayed_job elasticsearch json @@ -185,11 +186,11 @@ tilt ] end # rubocop:enable Metrics/MethodLength - def enabled_injectors - available_injectors - disabled_injectors + def enabled_spies + available_spies - disabled_spies end private def assign(options)