本文整理了Java中com.github.kristofa.brave.Brave.serverRequestInterceptor()
方法的一些代码示例,展示了Brave.serverRequestInterceptor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Brave.serverRequestInterceptor()
方法的具体详情如下:
包路径:com.github.kristofa.brave.Brave
类名称:Brave
方法名:serverRequestInterceptor
暂无
代码示例来源:origin: com.github.kristofa/brave-core-spring
@Bean
@Scope(value = "singleton")
public ServerRequestInterceptor serverRequestInterceptor() {
return brave.serverRequestInterceptor();
}
代码示例来源:origin: xuminwlt/j360-dubbo-app-all
public void setBrave(Brave brave) {
this.brave = brave;
this.serverRequestInterceptor = checkNotNull(brave.serverRequestInterceptor());
this.serverResponseInterceptor = checkNotNull(brave.serverResponseInterceptor());
this.serverSpanThreadBinder = brave.serverSpanThreadBinder();
}
代码示例来源: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: 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: liaokailin/zipkin
@Bean
public BraveServletFilter braveServletFilter(Brave brave){
BraveServletFilter filter = new BraveServletFilter(brave.serverRequestInterceptor(),brave.serverResponseInterceptor(),new DefaultSpanNameProvider());
return filter;
}
代码示例来源:origin: io.thorntail/zipkin-jaxrs
public ServerRequestInterceptor() {
try {
this.brave = BraveLookup.lookup().get();
this.delegate = new BraveContainerRequestFilter(
brave.serverRequestInterceptor(),
new DefaultSpanNameProvider()
);
} catch (NamingException e) {
throw new RuntimeException("Failed to lookup brave", e);
}
}
代码示例来源: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: xuminwlt/j360-dubbo-app-all
protected HttpBraveServletFilter(Builder b,Set paths) { // 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);
this.maybeAddClientHeaderParamFromRequest = MaybeAddClientHeaderParamFromRequest.create(b.brave);
this.serverSpanThreadBinder = b.brave.serverSpanThreadBinder();
this.appliedPaths = paths;
}
代码示例来源: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: blacklau/http-dubbo-zipkin
public DrpcServerInterceptor() {
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);//RpcContext.getContext().getUrl().getParameter("application");
Brave brave = new Brave.Builder(application).reporter(reporter).build();
this.serverRequestInterceptor = brave.serverRequestInterceptor();
this.serverResponseInterceptor = brave.serverResponseInterceptor();
}
内容来源于网络,如有侵权,请联系作者删除!