After reading the documentation for the PHP APM Agent 3 times, I still don't understand how it works. Initial situation: one has written a web page in PHP and uses for example the monolog handler.
(1) Is the workflow as follows: First you install the agent. Then you have to configure monolog so that all logs are written to the syslogs and then the installed agent reads the syslogs and sends them to APM?
(2) What if you have several websites on one webserver and want to log them separately (e.g. separate log levels)? Do they all have to log to the same syslog file?
(3) How can I send additional information e.g. UserContext (Id, email, ...)?
You can just install the agent and that is it. I recommend you to try Elastic APM on your PHP application by following setup and configuration steps.
The way Elastic APM PHP agent works has nothing to do with Monolog and/or syslog. The agent can monitor an application regardless whether the application uses or doesn't use Monolog and/or syslog. I'm not sure what made you think that the agent's implementation somehow relies on Monolog and/or syslog (please let us know). Maybe what confused you is the fact that the agent can be configured to write its own logs to syslog. But agent's logs are optional and they are used only for troubleshooting issues with the agent itself. You can completely disable agent's logs and it should not affect its functionality.