Module NewRelic::Agent::Agent::InstanceMethods::StartWorkerThread
In: lib/new_relic/agent/agent.rb

All of this module used to be contained in the start_worker_thread method - this is an artifact of refactoring and can be moved, renamed, etc at will

Methods

Constants

MIN_ALLOWED_REPORT_PERIOD = 1.0   Never allow any data type to be reported more frequently than once per second.
LOG_ONCE_KEYS_RESET_PERIOD = 60.0

Public Instance methods

a wrapper method to handle all the errors that can happen in the connection and worker thread system. This guarantees a no-throw from the background thread.

This is the method that is run in a new thread in order to background the harvesting and sending of data during the normal operation of the agent.

Takes connection options that determine how we should connect to the server, and loops endlessly - typically we never return from this method unless we‘re shutting down the agent

when a disconnect is requested, stop the current thread, which is the worker thread that gathers data and talks to the server.

Handles the case where the server tells us to restart - this clears the data, clears connection attempts, and waits a while to reconnect.

Handles an unknown error in the worker thread by logging it and disconnecting the agent, since we are now in an unknown state.

[Validate]