I configured Elastic APM agent using Elastic manual: Set up the Agent | APM PHP Agent Reference [1.x] | Elastic
I configured PHP 7.4 to use elastic_apm.so and restarted PHP-FPM. It fails on every start/connectoin:
-- A start job for unit php-7.4-fpm.service has finished successfully.
--
-- The job identifier is 420341.
May 15 16:24:02 dev-wordpress-epuff-it-vm [20482]: [Elastic APM PHP Tracer] 2022-05-15 16:24:02.646271+00:00 [PID: 20482] [TID: 20482] [ERROR] [Util] [util_for_PHP.c:50] [loadPhpFile] php_stream_open_for_zend_ex failed. Return value: -1. filename: /root/eapmsrc/apm-agent-php-1.4.2/src/bootstrap_php_part.php
May 15 16:24:02 dev-wordpress-epuff-it-vm [20482]: [Elastic APM PHP Tracer] 2022-05-15 16:24:02.646396+00:00 [PID: 20482] [TID: 20482] [ERROR] [Util] [util_for_PHP.c:95] [loadPhpFile] Exiting...; resultCode: resultFailure (4);
May 15 16:24:02 dev-wordpress-epuff-it-vm [20482]: [Elastic APM PHP Tracer] 2022-05-15 16:24:02.646417+00:00 [PID: 20482] [TID: 20482] [ERROR] [C-to-PHP] [tracer_PHP_part.c:81] [bootstrapTracerPhpPart] Exiting...; resultCode: resultFailure (4);
May 15 16:24:02 dev-wordpress-epuff-it-vm [20482]: [Elastic APM PHP Tracer] 2022-05-15 16:24:02.646434+00:00 [PID: 20482] [TID: 20482] [ERROR] [Lifecycle] [lifecycle.c:472] [elasticApmRequestInit] Exiting...; resultCode: resultFailure (4);
May 15 16:24:02 dev-wordpress-epuff-it-vm [20482]: [Elastic APM PHP Tracer] 2022-05-15 16:24:02.677241+00:00 [PID: 20482] [TID: 20482] [ERROR] [Util] [util_for_PHP.c:142] [callPhpFunction] call_user_function failed. Return value: -1. PHP function name: `\Elastic\Apm\Impl\AutoInstrument\PhpPartFacade::shutdown'. argsCount: 0.
May 15 16:24:02 dev-wordpress-epuff-it-vm [20482]: [Elastic APM PHP Tracer] 2022-05-15 16:24:02.677319+00:00 [PID: 20482] [TID: 20482] [ERROR] [Util] [util_for_PHP.c:154] [callPhpFunction] Exiting...; resultCode: resultFailure (4);
May 15 16:24:02 dev-wordpress-epuff-it-vm [20482]: [Elastic APM PHP Tracer] 2022-05-15 16:24:02.677354+00:00 [PID: 20482] [TID: 20482] [ERROR] [C-to-PHP] [tracer_PHP_part.c:112] [shutdownTracerPhpPart] Exiting...; resultCode: resultFailure (4);
^C