Please provide us a full output from phpinfo(). It might be html, pdf or screenshoots. Please keep in mind that it may contain sensitive data, like session data, keys, passwords, environment variables. Please remove this kind of data before publishing it.
Please provide us a full output from phpinfo(). It might be html, pdf or screenshoots. Please keep in mind that it may contain sensitive data, like session data, keys, passwords, environment variables. Please remove this kind of data before publishing it. Attached
Adding to this, I tried to force Laravel to find ElasticApm compiled classes, so I copied it to laravel folder, renaming namespace to make it be found.
Actually it dit found classes after this, but the transactions data was not complete,
it just register the name of transaction:
While in my container it shows every request:
(development) - I want that in production it logs as much as this
I'm not sure how to answer this one
I thought about checking if /opt-apm-agent-php/ path is accessible from PHP.
If open_basedir is configured in php.ini to some other location then PHP will not be able to access agent files.
Could you attach content of /opt/apm-agent-php/apm-agent-log.txt log file when you was trying to reproduce bug from first post?
Please add this line to php.ini - it was my mistake, I forgot about it: elastic_apm.log_level_file=TRACE
If you noticed, I'm getting the ElasticApm class from App\Elastic\Apm, not from Elastic\Apm as documentation says.. thats because I've copied the classes and changed namespace to force my app in prod to find the files..
At first I thought that was the reason for incomplete data, but I did the same in dev and worked nicely..
The platform I'm using in prod is Plesk and yes, I've checked all the configs I could use to make it work (php.ini, environment variables), but did not make it collect HTTP data
I'm not a fan of long replies, but this is the only place I found some help, thanks @Pawel_Filipczak
I posted a link to official php documentation about open_basedir. If this feature is enabled PHP is unable to access files outside /var/www/vhosts/udv.org.br/ filesystem node. It can only go deeper.
That is why agent started to operate if you copied files into you application path, beacuse it is inside a fs node /var/www/vhosts/udv.org.br/ and because of auto-loading you got additional namespace node App\
To solve the issue you should modify open_basedir ini entry and add :/opt/apm-agent-php/ at the end.
Regarding differences between dev and prod. In my opinion there are differences in deployment. Try to fetch phpinfo from both and compare it (take a look at open_basedir).