lib/new_relic/agent/agent.rb in newrelic_rpm-6.4.0.356 vs lib/new_relic/agent/agent.rb in newrelic_rpm-6.5.0.357

- old
+ new

@@ -761,14 +761,23 @@ # be called synchronously from on the main thread. def environment_for_connect Agent.config[:send_environment_info] ? Array(EnvironmentReport.new) : [] end + # Constructs and memoizes an event_harvest_config hash to be used in + # the payload sent during connect (and reconnect) + def event_harvest_config + @event_harvest_config ||= Configuration::EventHarvestConfig.from_config(Agent.config) + end + # Builds the payload to send to the connect service, # connects, then configures the agent using the response from # the connect service def connect_to_server - request_builder = ::NewRelic::Agent::Connect::RequestBuilder.new(@service, Agent.config) + request_builder = ::NewRelic::Agent::Connect::RequestBuilder.new \ + @service, + Agent.config, + event_harvest_config connect_response = @service.connect request_builder.connect_payload response_handler = ::NewRelic::Agent::Connect::ResponseHandler.new(self, Agent.config) response_handler.configure_agent(connect_response)