lib/contrast/configuration.rb in contrast-agent-4.12.0 vs lib/contrast/configuration.rb in contrast-agent-4.13.0
- old
+ new
@@ -5,10 +5,11 @@
require 'fileutils'
require 'contrast/config'
require 'contrast/utils/object_share'
require 'contrast/components/scope'
+require 'contrast/utils/exclude_key'
module Contrast
# This is how we read in the local settings for the Agent, both ENV/ CMD line
# and from properties files, in order to determine which settings, if any,
# the user has overridden.
@@ -216,9 +217,11 @@
# the Hash will be returned at the end of the 0 level
def convert_to_hash convert = root, hash = {}
case convert
when Contrast::Config::BaseConfiguration
convert.cs__class::KEYS.each_key do |key|
+ next if Contrast::Utils::ExcludeKey.excludable? key.to_s
+
hash[key] = convert_to_hash(convert.send(key), {})
end
hash
else
convert