DataDog / dd-trace-php

Datadog PHP Clients
https://docs.datadoghq.com/tracing/setup/php
Other
503 stars 156 forks source link

[Feature] pecl-amqp integration #2324

Open redpanda opened 1 year ago

redpanda commented 1 year ago

Describe the feature you'd like

As a developer, I'd like to have traces for application that use the pecl-amqp extension.

Is your feature request related to a problem?

Some PHP applications that uses the php-amqplib library are natively instrumented (thanks to this request), but it is not the case on other applications that uses pecl-amqp extension.

Describe alternatives you've considered

I considered to implement an custom instrumentation for pecl-amqp extension, but I would like to know if this feature could be integrated in the dd-trace-php package.

About the feature considered, I'm seeing something similar to the native php-amqlib instrumentation, we could instrumented the following methods:

AMQPExchange

AMQPQueue

AMQPConnection

Additional context

Thank you in advance for considering the request feature and let me know if we can give a hand to develop the feature. 👍

bwoebi commented 1 year ago

Hey @redpanda,

Would be certainly nice to have. It's right now not on top of the priority list, but we wouldn't object to a PR :-)

About the to be instrumented methods, it should basically mirror what the php-amqplib integration also instruments. So at a first glance, the list of to be instrumented methods looks correct.

It would need a comprehensive testsuite as well though, like https://github.com/DataDog/dd-trace-php/blob/master/tests/Integrations/AMQP/AMQPTest.php.