本文整理了Java中com.smoketurner.dropwizard.zipkin.client.ZipkinClientConfiguration
类的一些代码示例,展示了ZipkinClientConfiguration
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipkinClientConfiguration
类的具体详情如下:
包路径:com.smoketurner.dropwizard.zipkin.client.ZipkinClientConfiguration
类名称:ZipkinClientConfiguration
暂无
代码示例来源:origin: smoketurner/dropwizard-zipkin
/**
* Build a new Jersey Client that is instrumented for Zipkin
*
* @param configuration Configuration to use for the client
* @return new Jersey Client
*/
public Client build(final ZipkinClientConfiguration configuration) {
final Client client =
new JerseyClientBuilder(environment)
.using(configuration)
.build(configuration.getServiceName());
return build(client);
}
代码示例来源:origin: smoketurner/dropwizard-zipkin
@Override
public void run(HelloWorldConfiguration configuration, Environment environment) throws Exception {
final Optional<HttpTracing> tracing = configuration.getZipkinFactory().build(environment);
final Client client;
if (tracing.isPresent()) {
client =
new ZipkinClientBuilder(environment, tracing.get())
.build(configuration.getZipkinClient());
} else {
final ZipkinClientConfiguration clientConfig = configuration.getZipkinClient();
client =
new JerseyClientBuilder(environment)
.using(clientConfig)
.build(clientConfig.getServiceName());
}
// Register resources
final HelloWorldResource resource = new HelloWorldResource(client);
environment.jersey().register(resource);
}
}
内容来源于网络,如有侵权,请联系作者删除!