1. Go to this page and download the library: Download alan/swoft-opentracing library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App\Http\Middleware;
use Psr\Http\Server\MiddlewareInterface;
use Swoft\Bean\Annotation\Mapping\Bean;
use swoft\opentracing\Middleware\TracingMiddlewareTrait;
/**
* Class TracingMiddleware
* @package App\Http\Middleware
*
* @Bean()
*/
class TracingMiddleware implements MiddlewareInterface
{
use TracingMiddlewareTrait;
}