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

There should be a way to enable the extension at runtime

Open MattBred opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. Yes - https://github.com/elastic/apm-agent-php/issues/627

Describe the solution you'd like I would like to be able to set elastic_apm.enabled = false in the INI config, and then during runtime, enable it with a global elastic_apm_enable() type function.

Describe alternatives you've considered I've tried using all the built in public API methods - none resolve the issue I mentioned above.

Additional context I'm running a backend PHP daemon that forks itself to run worker jobs. I'd like to disable APM for the main daemon, and only enable it for individual jobs.

Currently my workaround is to use dl() on each job but that is a deprecated method with a bad performance impact.

MattBred avatar Feb 18 '22 01:02 MattBred

Having a similar issue and this would also solve it for us

Rudolph-B avatar May 19 '22 11:05 Rudolph-B