本文整理了Java中com.github.kristofa.brave.Brave.clientTracer()
方法的一些代码示例,展示了Brave.clientTracer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Brave.clientTracer()
方法的具体详情如下:
包路径:com.github.kristofa.brave.Brave
类名称:Brave
方法名:clientTracer
[英]Client Tracer.
It is advised that you use ClientRequestInterceptor and ClientResponseInterceptor instead. Those api's build upon ClientTracer and have a higher level api.
[中]客户跟踪程序。
建议您使用ClientRequestInterceptor和ClientResponseInterceptor。这些api建立在ClientTracer之上,具有更高级别的api。
代码示例来源:origin: com.github.kristofa/brave-core-spring
@Bean
@Scope(value = "singleton")
public ClientTracer clientTracer() {
return brave.clientTracer();
}
代码示例来源:origin: hansonwang99/Zipkin_Traces
@Bean
public MySQLStatementInterceptorManagementBean mySQLStatementInterceptorManagementBean() {
return new MySQLStatementInterceptorManagementBean(brave().clientTracer());
}
代码示例来源:origin: io.zipkin/zipkin-java-server
@Override
public void executeEnd(ExecuteContext ctx) {
if (ctx.type() == ExecuteType.READ) { // Don't log writes (so as to not loop on collector)
brave.clientTracer().setClientReceived();
}
}
}
代码示例来源:origin: io.zipkin/zipkin-java-server
@Override
public void renderEnd(ExecuteContext ctx) {
if (ctx.type() == ExecuteType.READ) { // Don't log writes (so as to not loop on collector)
brave.clientTracer().startNewSpan("query");
brave.clientTracer().setCurrentClientServiceName("zipkin-query");
String[] batchSQL = ctx.batchSQL();
if (!StringUtils.isBlank(ctx.sql())) {
brave.clientTracer().submitBinaryAnnotation("jdbc.query", ctx.sql());
} else if (batchSQL.length > 0 && batchSQL[batchSQL.length - 1] != null) {
brave.clientTracer().submitBinaryAnnotation("jdbc.query", StringUtils.join(batchSQL, '\n'));
}
brave.clientTracer().setClientSent(jdbcEndpoint.ipv4, jdbcEndpoint.port, jdbcEndpoint.serviceName);
}
}
内容来源于网络,如有侵权,请联系作者删除!