Symfony Opentracing bundle extension for amqplib/RabbitMq
This bundle is only an additional plugin and should not be installed independently. See its documentation for more information on installing the OpentracingBundle first.
After you have installed the OpentracingBundle:
- require the dependencies:
composer req auxmoney/opentracing-bundle-amqplib-rabbitmq
If you are using Symfony Flex, you are all set!
If you are not using it, you need to manually enable the bundle:
- add bundle to your application:
# Symfony 3: AppKernel.php $bundles = new Auxmoney\OpentracingAmqplibRabbitMqBundle\OpentracingAmqplibRabbitMqBundle();
# Symfony 4+: bundles.php Auxmoney\OpentracingAmqplibRabbitMqBundle\OpentracingAmqplibRabbitMqBundle::class => ['all' => true],
No configuration is necessary, the bundle extension will automatically decorate configured consumers and producers.
Whenever a message is produced or consumed, a span is automatically added to the existing trace. The tracing headers are automatically propagated to the consumer with message headers.
Be sure to run
composer run-script quality
every time before you push code changes. The tools run by this script are also run in the CI pipeline.