scout-apm-php icon indicating copy to clipboard operation
scout-apm-php copied to clipboard

Consider using symfony/process to launch core agent

Open asgrim opened this issue 6 years ago • 2 comments

The core-agent is launched with a basic exec at the moment. If we don't mind depending on another a third party library, we could use the very powerful symfony/process component to manage this. We can gather output, check the PID status etc. to ensure the agent has launched much better.

asgrim avatar Sep 02 '19 11:09 asgrim

Right now, the core agent is intended to be a launch & daemonize sequence, so it's not attached to the running php/python process at all.

The design is that we don't want a single php process as the owners of the core agent process, where they take it down during an app server restart, or any individual worker restarting. Also a rarer, but supported, case is to have both a PHP & a Python app on the same server, both being served by the same core agent.

cschneid avatar Sep 03 '19 15:09 cschneid

The main thing this would help with is if "my" PID launched the agent, that we'll be able to verify if we launched it or not (right now, we launch it and shrug it off). It's a nice to have, but would make that part of the process launching a bit cleaner :)

asgrim avatar Sep 03 '19 15:09 asgrim