GithubHelp home page GithubHelp logo

brave-dubbox's Introduction

使用步骤

1、maven添加该项目jar包(自己打包安装到本地仓库)

        <dependency>
            <groupId>io.zipkin.brave</groupId>
            <artifactId>brave-dubbox</artifactId>
            <version>2.0.0-SNAPSHOT</version>
        </dependency>

2、spring中配置

  • 打印日志方式(建议)
        <bean id="brave" class="com.github.lmg.brave.dubbox.factory.BraveFactoryBean">
            <property name="serviceName" value="liaomengge"/>
            <property name="zipkinHost" value=""/>
            <property name="rate" value="1.0"/>
        </bean>
  • http方式(不建议在生产上使用)
        <bean id="brave" class="com.github.lmg.brave.dubbox.factory.BraveFactoryBean">
            <property name="serviceName" value="liaomengge"/>
            <property name="zipkinHost" value="http://localhost:9411"/>
            <property name="rate" value="1.0"/>
        </bean>

支持模式

1、 dubbox客户端 -> dubbox服务端

直接使用dubbox进行调用

2、 非dubbox客户端(restTemplate) -> dubbox服务端

在客户端,通过Spring RestTemplate走http调用服务

3、 非dubbox客户端(httpClient) -> dubbox服务端

在客户端,通过HttpCient走http(同步)调用服务

4、 非dubbox客户端(okhttp3) -> dubbox服务端

在客户端,通过OkHttp3走http调用服务

3、服务端日志调用

为了方便服务端trace log记录,降低服务端对brave的依赖,故新增TraceLogUtil类,能进行业务日志追踪,其中引入AppId方便快速查询是哪个调用方(可以自己扩展)

###最近发现openzipkin已经换做另一种处理方案了,之后会更新为最新的处理方案~~

参考文档:

http://www.tuicool.com/articles/f2qAZnZ

brave-dubbox's People

Stargazers

Jerry-Liao avatar  avatar

Watchers

 avatar Jerry-Liao avatar  avatar

Forkers

paulzhu8597

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.