本文整理了Java中com.github.kristofa.brave.Brave.clientSpanThreadBinder()
方法的一些代码示例,展示了Brave.clientSpanThreadBinder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Brave.clientSpanThreadBinder()
方法的具体详情如下:
包路径:com.github.kristofa.brave.Brave
类名称:Brave
方法名:clientSpanThreadBinder
[英]Helper object that can be used to propagate client trace state. Typically over different threads.
[中]可用于传播客户端跟踪状态的Helper对象。通常在不同的线程上。
代码示例来源:origin: jgchen/brave-dubbo
public static void setBrave(Brave brave) {
BraveConsumerFilter.brave = brave;
BraveConsumerFilter.clientRequestInterceptor = brave.clientRequestInterceptor();
BraveConsumerFilter.clientResponseInterceptor = brave.clientResponseInterceptor();
BraveConsumerFilter.clientSpanThreadBinder = brave.clientSpanThreadBinder();
}
代码示例来源:origin: blacklau/http-dubbo-zipkin
public DrpcClientInterceptor() {
String sendUrl = ZipkinConfig.getProperty(ZipkinConstants.SEND_ADDRESS);
Sender sender = OkHttpSender.create(sendUrl);
Reporter<zipkin.Span> reporter = AsyncReporter.builder(sender).build();
String application = ZipkinConfig.getProperty(ZipkinConstants.BRAVE_NAME);
Brave brave = new Brave.Builder(application).reporter(reporter).build();
this.clientRequestInterceptor = Util.checkNotNull(brave.clientRequestInterceptor(),null);
this.clientResponseInterceptor = Util.checkNotNull(brave.clientResponseInterceptor(),null);
this.clientSpanThreadBinder = Util.checkNotNull(brave.clientSpanThreadBinder(),null);
}
内容来源于网络,如有侵权,请联系作者删除!