-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Labels
Description
In #1257 you introduced a log warning when xdebug is enabled.
But the warning appears even when elastic APM is disabled
$ ELASTIC_APM_ENABLED=false php -r 'var_export(ini_get("ELASTIC_APM_ENABLED"));'
[Elastic APM PHP Tracer] 2025-01-27 16:26:38.484087+00:00 [PID: 205] [TID: 205] [WARNING] [Lifecycle] [lifecycle.cpp:421] [elasticApmRequestInit] Xdebug is loaded, which is not supported by the Elastic APM Agent. This may lead to stability or memory issues
falseI'm using a docker image with xdebug and elastic APM installed. xdebug is enabled in dev but APM disabled. APM is only enabled on prod. So I'm seeing always this log.
I think the code should also check if xdebug.mode is off (or XDEBUG_MODE=off), not only if xdebug extension is loaded.
$ XDEBUG_MODE=off php -r 'var_export(getenv("XDEBUG_MODE"));'
[Elastic APM PHP Tracer] 2025-02-21 10:57:14.251539+00:00 [PID: 139] [TID: 139] [WARNING] [Lifecycle] [lifecycle.cpp:421] [elasticApmRequestInit] Xdebug is loaded, which is not supported by the Elastic APM Agent. This may lead to stability or memory issues
'off'Reactions are currently unavailable