Class: NewRelic::Agent::Configuration::ServerSource
- Inherits:
-
DottedHash
- Object
- Hash
- DottedHash
- NewRelic::Agent::Configuration::ServerSource
- Defined in:
- lib/new_relic/agent/configuration/server_source.rb
Instance Method Summary collapse
-
#initialize(hash) ⇒ ServerSource
constructor
A new instance of ServerSource.
Methods inherited from DottedHash
Constructor Details
#initialize(hash) ⇒ ServerSource
Returns a new instance of ServerSource.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/new_relic/agent/configuration/server_source.rb', line 5 def initialize(hash) if hash['agent_config'] if hash['agent_config']['transaction_tracer.transaction_threshold'] =~ /apdex_f/i # when value is "apdex_f" remove the config and defer to default hash['agent_config'].delete('transaction_tracer.transaction_threshold') end super(hash.delete('agent_config')) end string_map = [ ['collect_traces', 'transaction_tracer.enabled'], ['collect_traces', 'slow_sql.enabled'], ['collect_errors', 'error_collector.enabled'] ].each do |pair| hash[pair[1]] = hash[pair[0]] if hash[pair[0]] != nil end super end |