auxmoney / opentracing-bundle-php-http-httplug-bundle
Symfony Opentracing bundle extension for php-http/HttplugBundle
Installs: 841
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 7
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^8.0
- auxmoney/opentracing-bundle-core: ^v1.0
- opentracing/opentracing: ^1.0.1
- php-http/httplug-bundle: ^1.20
Requires (Dev)
- mtdowling/jmespath.php: ^2.6
- nyholm/psr7: ^1.5
- php-coveralls/php-coveralls: ^2.5
- php-http/curl-client: ^2.2
- phpmd/phpmd: ^2.12
- phpspec/prophecy-phpunit: ^2.0
- phpstan/phpstan: ^1.5
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-latest
- squizlabs/php_codesniffer: ^3.6
- symfony/filesystem: *
- symfony/process: *
- symfony/yaml: *
README
This bundle adds automatic header injection for php-http/httplug-bundle clients to the OpentracingBundle.
Installation
Prerequisites
This bundle is only an additional plugin and should not be installed independently. See OpentracingBundle and HttplugBundle first prior to install this package.
Require dependencies
After you have installed the OpentracingBundle and HttplugBundle:
composer req auxmoney/opentracing-bundle-php-http-httplug-bundle
Enable the bundle
If you are using Symfony Flex, you are all set!
If you are not using it, you need to manually enable the bundle:
# Symfony 3: AppKernel.php $bundles[] = new Auxmoney\OpentracingHttplugBundle\OpentracingHttplugBundle();
# Symfony 4+: bundles.php Auxmoney\OpentracingHttplugBundle\OpentracingHttplugBundle::class => ['all' => true],
Configuration
No configuration is necessary, the provided compiler pass will decorate PluginClientFactory
in order to add the OpentracingPlugin
(where tracing headers injection happens) to all existing Httplug clients.
Usage
When sending a request to other systems, the tracing headers are automatically injected into the requests, thus enabling the full power of distributed tracing.
Development
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.