lib/new_relic/agent/agent.rb in newrelic_rpm-8.6.0 vs lib/new_relic/agent/agent.rb in newrelic_rpm-8.7.0

- old
+ new

@@ -7,10 +7,11 @@ require 'net/http' require 'logger' require 'zlib' require 'stringio' require 'new_relic/constants' +require 'new_relic/traced_thread' require 'new_relic/coerce' require 'new_relic/agent/autostart' require 'new_relic/agent/harvester' require 'new_relic/agent/hostname' require 'new_relic/agent/new_relic_service' @@ -457,10 +458,11 @@ # If we're using a dispatcher that forks before serving # requests, we need to wait until the children are forked # before connecting, otherwise the parent process sends useless data def using_forking_dispatcher? + # TODO: MAJOR VERSION - remove :rainbows if [:puma, :passenger, :rainbows, :unicorn].include? Agent.config[:dispatcher] ::NewRelic::Agent.logger.info "Deferring startup of agent reporting thread because #{Agent.config[:dispatcher]} may fork." true else false @@ -606,11 +608,11 @@ def interval_for event_type interval = Agent.config[:"event_report_period.#{event_type}"] :"#{interval}_second_harvest" end - ANALYTIC_EVENT_DATA = "analytic_event_data".freeze + TRANSACTION_EVENT_DATA = "transaction_event_data".freeze CUSTOM_EVENT_DATA = "custom_event_data".freeze ERROR_EVENT_DATA = "error_event_data".freeze SPAN_EVENT_DATA = "span_event_data".freeze LOG_EVENT_DATA = "log_event_data".freeze @@ -621,11 +623,11 @@ @event_loop = create_event_loop @event_loop.on(data_harvest) do transmit_data end - @event_loop.on(interval_for ANALYTIC_EVENT_DATA) do + @event_loop.on(interval_for TRANSACTION_EVENT_DATA) do transmit_analytic_event_data end @event_loop.on(interval_for CUSTOM_EVENT_DATA) do transmit_custom_event_data end @@ -636,9 +638,10 @@ transmit_span_event_data end @event_loop.on(interval_for LOG_EVENT_DATA) do transmit_log_event_data end + @event_loop.on(:reset_log_once_keys) do ::NewRelic::Agent.logger.clear_already_logged end @event_loop.fire_every(Agent.config[:data_report_period], data_harvest) @event_loop.fire_every(Agent.config[:event_report_period], event_harvest)