opentelemetry-php icon indicating copy to clipboard operation
opentelemetry-php copied to clipboard

[opentelemetry-php-instrumentation] PHP8.2 support registering hooks after a function was already executed

Open Nevay opened this issue 1 year ago • 3 comments

PHP ^8.2 allows manipulation of observers at runtime https://github.com/php/php-src/pull/9062.

Should allow us to remove the limitation that hooks must be registered before a function is first executed. https://github.com/open-telemetry/opentelemetry-php-instrumentation?tab=readme-ov-file#caveats

Hooks must be registered before a function is first executed. You may encounter race conditions where the composer autoloader runs code that uses functions you wish to hook prior to the hooks being registered.

Nevay avatar May 08 '24 17:05 Nevay

ref: #1278 The feature is available in PHP from 8.2.0

brettmc avatar May 09 '24 00:05 brettmc

Any update on this? I would love to have it...

hostaway-greg avatar Mar 02 '25 20:03 hostaway-greg

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 26 '25 05:04 stale[bot]

This issue has been automatically closed because it has not had recent activity, but it can be reopened. Thank you for your contributions.

stale[bot] avatar Jul 19 '25 06:07 stale[bot]