242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
# File 'lib/new_relic/agent/configuration/manager.rb', line 242
def flattened
config_stack.reverse.inject({}) do |flat, layer|
thawed_layer = layer.to_hash.dup
thawed_layer.each do |k, v|
begin
thawed_layer[k] = instance_eval(&v) if v.respond_to?(:call)
rescue => e
NewRelic::Agent.logger.debug("#{e.class.name} : #{e.message} - when accessing config key #{k}")
thawed_layer[k] = nil
end
thawed_layer.delete(:config)
end
flat.merge(thawed_layer.to_hash)
end
end
|