本文整理汇总了Java中com.github.kristofa.brave.SpanCollector类的典型用法代码示例。如果您正苦于以下问题:Java SpanCollector类的具体用法?Java SpanCollector怎么用?Java SpanCollector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SpanCollector类属于com.github.kristofa.brave包,在下文中一共展示了SpanCollector类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: applySpanCollector
import com.github.kristofa.brave.SpanCollector; //导入依赖的package包/类
private static Brave.Builder applySpanCollector(final Brave.Builder builder, final JsonObject json) {
SpanCollector spanCollector;
switch (json.getString("type")) {
case "logging":
spanCollector = new LoggingSpanCollector();
break;
case "scribe":
spanCollector = ScribeSpanCollectorBuilder.build(json);
break;
case "kafka":
spanCollector = KafkaSpanCollectorBuilder.build(json);
break;
case "empty":
default:
spanCollector = new EmptySpanCollector();
}
logger.debug("Configuring span collector: {}", spanCollector);
return builder.spanCollector(spanCollector);
}
开发者ID:emmanuelidi,项目名称:vertx-zipkin,代码行数:20,代码来源:BraveFactory.java
示例2: spanCollector
import com.github.kristofa.brave.SpanCollector; //导入依赖的package包/类
@Bean
public SpanCollector spanCollector() {
HttpSpanCollector.Config config =
HttpSpanCollector.Config.builder()
.connectTimeout(properties.getConnectTimeout())
.readTimeout(properties.getReadTimeout())
.compressionEnabled(properties.isCompressionEnabled())
.flushInterval(properties.getFlushInterval())
.build();
return HttpSpanCollector.create(
properties.getUrl(), config, new EmptySpanCollectorMetricsHandler());
}
开发者ID:junzixiehui,项目名称:godeye,代码行数:13,代码来源:ZipkinConfig.java
示例3: TracedSession
import com.github.kristofa.brave.SpanCollector; //导入依赖的package包/类
TracedSession(Session target, Brave brave, SpanCollector collector) {
this.target = checkNotNull(target, "target");
this.brave = checkNotNull(brave, "brave");
this.collector = checkNotNull(collector, "collector");
this.version = target.getCluster().getConfiguration().getProtocolOptions().getProtocolVersion();
target.getCluster().register(this);
}
开发者ID:liaominghua,项目名称:zipkin,代码行数:8,代码来源:TracedSession.java
示例4: build
import com.github.kristofa.brave.SpanCollector; //导入依赖的package包/类
public static SpanCollector build(final JsonObject json) {
KafkaSpanCollector.Config.Builder conf = KafkaSpanCollector.Config.builder(json.getString("bootstrapServers", "localhost"))
.flushInterval(json.getInteger("flushInterval", 1))
.topic(json.getString("topic", "zipkin"));
return KafkaSpanCollector.create(conf.build(), new EmptySpanCollectorMetricsHandler());
}
开发者ID:emmanuelidi,项目名称:vertx-zipkin,代码行数:8,代码来源:KafkaSpanCollectorBuilder.java
示例5: spanCollector
import com.github.kristofa.brave.SpanCollector; //导入依赖的package包/类
@Bean
@Scope(value = "singleton")
public SpanCollector spanCollector() {
// For development purposes we use the logging span collector.
return new LoggingSpanCollectorImpl();
//return new ZipkinSpanCollector("localhost", 9410);
}
开发者ID:leigu,项目名称:brave-tracer-example,代码行数:9,代码来源:BraveTracerConfiguration.java
示例6: create
import com.github.kristofa.brave.SpanCollector; //导入依赖的package包/类
public static Session create(Session target, Brave brave, SpanCollector collector) {
return Reflection.newProxy(Session.class, new TracedSession(target, brave, collector));
}
开发者ID:liaominghua,项目名称:zipkin,代码行数:4,代码来源:TracedSession.java
示例7: setSpanCollector
import com.github.kristofa.brave.SpanCollector; //导入依赖的package包/类
public void setSpanCollector(SpanCollector spanCollector) {
this.spanCollector = spanCollector;
}
开发者ID:xiaomin0322,项目名称:dubbo_plus,代码行数:4,代码来源:BraveFactoryBean.java
示例8: build
import com.github.kristofa.brave.SpanCollector; //导入依赖的package包/类
public static SpanCollector build(final JsonObject json) {
return new ScribeSpanCollector(json.getString("host", "localhost"),
json.getInteger("port", 8410),
getParams(json.getJsonObject("params", new JsonObject())));
}
开发者ID:emmanuelidi,项目名称:vertx-zipkin,代码行数:6,代码来源:ScribeSpanCollectorBuilder.java
示例9: getSpanCollector
import com.github.kristofa.brave.SpanCollector; //导入依赖的package包/类
public SpanCollector getSpanCollector() {
return spanCollector;
}
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:ZipkinTracer.java
示例10: setSpanCollector
import com.github.kristofa.brave.SpanCollector; //导入依赖的package包/类
/**
* The collector to use for sending zipkin span events to the zipkin server.
*/
public void setSpanCollector(SpanCollector spanCollector) {
this.spanCollector = spanCollector;
}
开发者ID:HydAu,项目名称:Camel,代码行数:7,代码来源:ZipkinTracer.java
注:本文中的com.github.kristofa.brave.SpanCollector类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论