Module: NewRelic::Agent::Configuration::EventHarvestConfig
- Extended by:
- EventHarvestConfig
- Included in:
- EventHarvestConfig
- Defined in:
- lib/new_relic/agent/configuration/event_harvest_config.rb
Constant Summary collapse
- EVENT_HARVEST_CONFIG_KEY_MAPPING =
{ :analytic_event_data => :'transaction_events.max_samples_stored', :custom_event_data => :'custom_insights_events.max_samples_stored', :error_event_data => :'error_collector.max_event_samples_stored', :log_event_data => :'application_logging.forwarding.max_samples_stored' }
- EVENT_HARVEST_EVENT_REPORT_PERIOD_KEY_MAPPING =
not including span_event_data here because spans are handled separately in transform_span_event_harvest_config
{ :analytic_event_data => :'transaction_event_data', :custom_event_data => :'custom_event_data', :error_event_data => :'error_event_data', :log_event_data => :'log_event_data' }
Instance Method Summary collapse
Instance Method Details
#from_config(config) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/new_relic/agent/configuration/event_harvest_config.rb', line 26 def from_config(config) {:harvest_limits => EVENT_HARVEST_CONFIG_KEY_MAPPING.merge( :span_event_data => :'span_events.max_samples_stored' ).inject({}) do |connect_payload, (connect_payload_key, config_key)| connect_payload[connect_payload_key] = config[config_key] connect_payload end} end |
#to_config_hash(connect_reply) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/new_relic/agent/configuration/event_harvest_config.rb', line 36 def to_config_hash(connect_reply) event_harvest_interval = connect_reply['event_harvest_config']['report_period_ms'] / 1000 config_hash = transform_event_harvest_config_keys(connect_reply, event_harvest_interval) config_hash[:event_report_period] = event_harvest_interval config_hash = transform_span_event_harvest_config(config_hash, connect_reply) config_hash end |