scout_apm_python icon indicating copy to clipboard operation
scout_apm_python copied to clipboard

Push core agent startup into CoreAgentSocketThread

Open adamchainz opened this issue 5 years ago • 0 comments

Currently we download and start the core agent at application startup, blocking its deployment, and carrying the risk that exceptions there will stop the application entirely. We've had some reports of this in the wild too.

#480 has added a little logic around retrying, timeouts, and not dying on the first exception.

We should move the core agent startup, and the gathering of application metadata, into CoreAgentSocketThread, so that we don't block application startup. We still have to be careful not to start any threads until post-fork, which we rely on based on the first real request coming through.

adamchainz avatar Feb 17 '20 16:02 adamchainz