elastic / elastic/apm-agent-php

There should be a way to enable the extension at runtime

Open
#628 1 comment 0 reactions 0 assignees View on GitHub
agent-php enhancement priority: medium triaged
Dominant language
PHP
Stars
268
Forks
86
PR merge metrics
No merged PRs in 30d

Description

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.