本文整理了Java中com.github.kristofa.brave.Brave.clientRequestInterceptor()
方法的一些代码示例,展示了Brave.clientRequestInterceptor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Brave.clientRequestInterceptor()
方法的具体详情如下:
包路径:com.github.kristofa.brave.Brave
类名称:Brave
方法名:clientRequestInterceptor
暂无
代码示例来源:origin: com.github.kristofa/brave-core-spring
@Bean
@Scope(value = "singleton")
public ClientRequestInterceptor clientRequestInterceptor() {
return brave.clientRequestInterceptor();
}
代码示例来源:origin: xuminwlt/j360-dubbo-app-all
public void setBrave(Brave brave) {
this.brave = brave;
this.clientRequestInterceptor = checkNotNull(brave.clientRequestInterceptor());
this.clientResponseInterceptor = checkNotNull(brave.clientResponseInterceptor());
}
代码示例来源: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: liaokailin/zipkin
@Bean
public OkHttpClient okHttpClient(Brave brave){
OkHttpClient client = new OkHttpClient.Builder()
.addInterceptor(new BraveOkHttpRequestResponseInterceptor(brave.clientRequestInterceptor(), brave.clientResponseInterceptor(), new DefaultSpanNameProvider()))
.build();
return client;
}
}
代码示例来源:origin: io.thorntail/zipkin-jaxrs
public ClientRequestInterceptor() {
this.brave = new BraveFactory().create();
this.delegate = new BraveClientRequestFilter(
new DefaultSpanNameProvider(),
brave.clientRequestInterceptor()
);
}
代码示例来源:origin: wso2/msf4j
/**
* Constructor of FeginZipkinTracingClient.
*
* @param client
* @param instanceName
* @param zipkinUrl URL of the receiver of DAS server.
*/
public FeginZipkinTracingClient(Client client, String instanceName, String zipkinUrl) {
this.clientDelegate = client;
Brave.Builder builder = new Brave.Builder(instanceName);
builder.spanCollector(HttpSpanCollector.create(zipkinUrl, new EmptySpanCollectorMetricsHandler()));
Brave brave = builder.build();
requestInterceptor = brave.clientRequestInterceptor();
responseInterceptor = brave.clientResponseInterceptor();
}
代码示例来源: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);
}
内容来源于网络,如有侵权,请联系作者删除!