vendor/plugins/newrelic_rpm/lib/newrelic/agent/agent.rb
# Connect to the server, and run the worker loop forever
Connect to the server, and run the worker loop forever
Connect to the server and run the worker loop forever
def run_worker_loop
      until @connected
        should_retry = connect
        return unless should_retry
      end
      report_period = invoke_remote :get_data_report_period, @agent_id
      log! "Reporting performance data every #{report_period} seconds"        
      @worker_loop.add_task(report_period) do 
        harvest_and_send_timeslice_data
      end
      if @should_send_samples && @use_transaction_sampler
        @worker_loop.add_task(report_period) do 
          harvest_and_send_slowest_sample
        end
      end
      if @should_send_errors
        @worker_loop.add_task(report_period) do 
          harvest_and_send_errors
        end
      end
      @worker_loop.run
    end
def run_worker_loop until @connected should_retry = connect return unless should_retry end report_period = invoke_remote :get_data_report_period , @agent_id log! "Reporting performance data every #{report_period} seconds" @worker_loop . add_task ( report_period ) do harvest_and_send_timeslice_data end if @should_send_samples && @use_transaction_sampler @worker_loop . add_task ( report_period ) do harvest_and_send_slowest_sample end end if @should_send_errors @worker_loop . add_task ( report_period ) do harvest_and_send_errors end end @worker_loop . run end
Connect to the server, and run the worker loop forever
Connect to the server and run the worker loop forever
# determine the reporting period (server based) # note if the agent attempts to report more frequently than the specified # report data, then it will be ignored.