English | 中文
Customized tracing component based on openzipkin by Yupao
composer require yupao/tracing
rm -f {$project_dir}/config/autoload/opentracing.php
php bin/hyperf.php vendor:publish yupao/tracing
# config/autoload/aspects.php
return [
Yupao\Tracing\Hyperf\Aspect\JsonRpcAspect::class,
];
# config/autoload/middlewares.php
return [
'http' => [
Yupao\Tracing\Hyperf\Middleware\TraceMiddleware::class
],
];
If you are using a customized HTTP header for tracing. In the project configuration .env file,
set CUSTOMIZED_TRACE_ID_NAME
to that name.
# edit .env
CUSTOMIZED_TRACE_ID_NAME=x-request-id