Skip to content

esd-projects/tracing-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tracing-plugin

opentracing jaeger

链路追踪插件,提供链路追踪功能,结合jaegerUI或者zipkin提供链路追踪视图

添加相应插件,其中RequestTracingPlugin为追踪请求的主要插件,DBTracingPlugin负责Redis,mysql的链路,HttpClientTracingPlugin负责saber,guzzle的链路, MethodTracingPlugin负责相关方法的链路。MethodTracingPlugin性能损耗最高,酌情使用。

class Application extends GoApplication
{
    public function configure()
    {
        $this->addPlug(new RequestTracingPlugin());
        $this->addPlug(new DBTracingPlugin());
        $this->addPlug(new MethodTracingPlugin());
        $this->addPlug(new HttpClientTracingPlugin());
        parent::configure();
    }
}

另外通过saber实现的微服务调用也被支持。