本文整理汇总了Java中com.uber.jaeger.reporters.RemoteReporter类的典型用法代码示例。如果您正苦于以下问题:Java RemoteReporter类的具体用法?Java RemoteReporter怎么用?Java RemoteReporter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RemoteReporter类属于com.uber.jaeger.reporters包,在下文中一共展示了RemoteReporter类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: jaegerTracer
import com.uber.jaeger.reporters.RemoteReporter; //导入依赖的package包/类
private Tracer jaegerTracer(String url) {
Sender sender = new UdpSender(url, 0, 0);
return new com.uber.jaeger.Tracer.Builder(SERVICE_NAME,
new RemoteReporter(sender, 100, 50,
new Metrics(new StatsFactoryImpl(new NullStatsReporter()))),
new ProbabilisticSampler(1.0))
.build();
}
示例2: createJaeger
import com.uber.jaeger.reporters.RemoteReporter; //导入依赖的package包/类
public static Tuple<Tracer, Flushable> createJaeger(String serviceName, String collectorUrl) {
HttpSender sender = new HttpSender(collectorUrl + "/api/traces", 65000);
RemoteReporter reporter = new RemoteReporter(sender, 1, 100000,
new Metrics(new StatsFactoryImpl(new NullStatsReporter())));
return new Tuple<>(new Builder(serviceName, reporter, new ConstSampler(true)).build(),
() -> {
try {
sender.flush();
} catch (SenderException ex) {
throw new IllegalStateException("Failed to send", ex);
}
});
}
示例3: createJaegerTracer
import com.uber.jaeger.reporters.RemoteReporter; //导入依赖的package包/类
protected com.uber.jaeger.Tracer createJaegerTracer(String serviceName) {
return new com.uber.jaeger.Tracer.Builder(serviceName,
new RemoteReporter(new HttpSender(collectorUrl + "api/traces", 65000), 1, 100,
new Metrics(new StatsFactoryImpl(new NullStatsReporter()))), new ConstSampler(true))
.build();
}