luoxiaojun / yii2-zipkin
Zipkin in Yii2
dev-master
2020-10-17 02:43 UTC
Requires
- guzzlehttp/guzzle: ^6.3
- openzipkin/zipkin: 1.3.2
- psr/http-message: ^1.0
Requires (Dev)
- mockery/mockery: ~1.2
- phpunit/phpunit: ~7.5
This package is auto-updated.
Last update: 2024-10-17 10:56:17 UTC
README
Description
Zipkin in Yii2
Usage
- Add zipkin to components
'zipkin' => [ 'class' => TracerAlias::class, 'serviceName' => 'yii2', 'endpointUrl' => 'http://127.0.0.1:9411/api/v2/spans', 'sampleRate' => 1, 'apiPrefix' => '/' ],
- Add zipkin sampler
- For single controller
//Add Lxj\Yii2\Zipkin\Filter to behaviors mathod. public function behaviors() { return [ 'zipkin' => [ 'class' => Filter::class, ], ]; }
- For module
//Define your module extended 'Lxj\Yii2\Zipkin\Module' class MyModule extends Lxj\Yii2\Zipkin\Module
- For single controller
- Demo is here.