本文整理了Java中com.github.kristofa.brave.Brave
类的一些代码示例,展示了Brave
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Brave
类的具体详情如下:
包路径:com.github.kristofa.brave.Brave
类名称:Brave
暂无
代码示例来源:origin: com.github.kristofa/brave-core-spring
@Bean
@Scope(value = "singleton")
public ServerRequestInterceptor serverRequestInterceptor() {
return brave.serverRequestInterceptor();
}
代码示例来源:origin: com.github.kristofa/brave-core-spring
@Bean
@Scope(value = "singleton")
public ServerResponseInterceptor serverResponseInterceptor() {
return brave.serverResponseInterceptor();
}
代码示例来源:origin: com.github.kristofa/brave-core-spring
@Bean
@Scope(value = "singleton")
public ServerTracer serverTracer() {
return brave.serverTracer();
}
代码示例来源:origin: jgchen/brave-dubbo
public static void setBrave(Brave brave) {
BraveProviderFilter.brave = brave;
BraveProviderFilter.serverRequestInterceptor = brave.serverRequestInterceptor();
BraveProviderFilter.serverResponseInterceptor = brave.serverResponseInterceptor();
BraveProviderFilter.serverSpanThreadBinder = brave.serverSpanThreadBinder();
}
代码示例来源: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: io.zipkin.brave/brave-spring-web-servlet-interceptor
ServletHandlerInterceptor(Builder b) { // intentionally hidden
this.requestInterceptor = b.brave.serverRequestInterceptor();
this.responseInterceptor = b.brave.serverResponseInterceptor();
this.serverThreadBinder = b.brave.serverSpanThreadBinder();
this.spanNameProvider = b.spanNameProvider;
this.serverTracer = b.brave.serverTracer();
this.maybeAddClientAddressFromRequest = MaybeAddClientAddressFromRequest.create(b.brave);
}
代码示例来源:origin: com.github.kristofa/brave-core-spring
@Bean
@Scope(value = "singleton")
public ServerSpanThreadBinder serverSpanThreadBinder() {
return brave.serverSpanThreadBinder();
}
}
代码示例来源:origin: com.github.kristofa/brave-core-spring
@Bean
@Scope(value = "singleton")
public ClientRequestInterceptor clientRequestInterceptor() {
return brave.clientRequestInterceptor();
}
代码示例来源:origin: com.github.kristofa/brave-core-spring
@Bean
@Scope(value = "singleton")
public ClientResponseInterceptor clientResponseInterceptor() {
return brave.clientResponseInterceptor();
}
代码示例来源:origin: com.github.kristofa/brave-core-spring
@Bean
@Scope(value = "singleton")
public ClientTracer clientTracer() {
return brave.clientTracer();
}
代码示例来源: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: liaokailin/zipkin
@Bean
public BraveServletFilter braveServletFilter(Brave brave){
BraveServletFilter filter = new BraveServletFilter(brave.serverRequestInterceptor(),brave.serverResponseInterceptor(),new DefaultSpanNameProvider());
return filter;
}
代码示例来源:origin: hansonwang99/Zipkin_Traces
@Bean
public MySQLStatementInterceptorManagementBean mySQLStatementInterceptorManagementBean() {
return new MySQLStatementInterceptorManagementBean(brave().clientTracer());
}
代码示例来源:origin: io.zipkin.brave/brave-web-servlet-filter
protected BraveServletFilter(Builder b) { // intentionally hidden
this.requestInterceptor = b.brave.serverRequestInterceptor();
this.responseInterceptor = b.brave.serverResponseInterceptor();
this.spanNameProvider = b.spanNameProvider;
this.serverTracer = b.brave.serverTracer();
this.maybeAddClientAddressFromRequest = MaybeAddClientAddressFromRequest.create(b.brave);
}
代码示例来源:origin: io.zipkin/zipkin-java-server
@Override
public void addInterceptors(InterceptorRegistry registry) {
ServerTracer tracer = brave.serverTracer();
ServletHandlerInterceptor traceInterceptor = new ServletHandlerInterceptor(
new ServerRequestInterceptor(tracer), new ServerResponseInterceptor(tracer),
new DefaultSpanNameProvider(), brave.serverSpanThreadBinder());
registry.addInterceptor(new NoPOSTHandlerInterceptorAdapter(traceInterceptor));
}
代码示例来源:origin: wso2/msf4j
/**
* Constructor of the MSF4JTracingInterceptor.
*
* @param microServiceName Name of the Microservice
* @param zipkinUrl Base URL of the Zipkin server
*/
public MSF4JZipkinTracingInterceptor(String microServiceName, String zipkinUrl) {
Brave.Builder builder = new Brave.Builder(microServiceName);
builder.spanCollector(HttpSpanCollector.create(zipkinUrl, new EmptySpanCollectorMetricsHandler()));
Brave brave = builder.build();
reqInterceptor = brave.serverRequestInterceptor();
respInterceptor = brave.serverResponseInterceptor();
}
代码示例来源: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: io.zipkin.brave/brave-core
BraveExecutorService(ExecutorService wrappedExecutor, Brave brave) { // intentionally hidden
this.wrappedExecutor = checkNotNull(wrappedExecutor, "wrappedExecutor");
checkNotNull(brave, "brave");
this.localSpanThreadBinder = brave.localSpanThreadBinder();
this.serverSpanThreadBinder = brave.serverSpanThreadBinder();
}
代码示例来源:origin: io.thorntail/zipkin-jaxrs
@Override
public void stop(StopContext stopContext) {
if (this.brave != null) {
LOG.info("Shutdown Zipkin BTM services");
this.brave.serverTracer().setStateNoTracing();
}
}
代码示例来源:origin: io.thorntail/zipkin-jaxrs
public ServerResponseInterceptor() {
try {
this.brave = BraveLookup.lookup().get();
this.delegate = new BraveContainerResponseFilter(
brave.serverResponseInterceptor()
);
} catch (NamingException e) {
throw new RuntimeException("Failed to lookup brave", e);
}
}
内容来源于网络,如有侵权,请联系作者删除!