use of com.uber.jaeger.metrics.StatsFactoryImpl in project cxf by apache.
the class Client method main.
public static void main(final String[] args) throws Exception {
final Metrics metrics = new Metrics(new StatsFactoryImpl(new NullStatsReporter()));
final Tracer.Builder builder = new Tracer.Builder("cxf-client", new RemoteReporter(new HttpSender("http://localhost:14268/api/traces"), 1000, 100, metrics), new ConstSampler(true));
final OpenTracingClientProvider provider = new OpenTracingClientProvider(builder.build());
final javax.ws.rs.client.Client client = ClientBuilder.newClient().register(provider);
final Response response = client.target("http://localhost:8084/catalog").request().accept(MediaType.APPLICATION_JSON).get();
LOG.info("Response: {}", response.readEntity(String.class));
response.close();
// Allow Tracer to flush
Thread.sleep(1000);
}
use of com.uber.jaeger.metrics.StatsFactoryImpl in project cxf by apache.
the class Server method tracer.
@Bean
Tracer tracer() {
final Metrics metrics = new Metrics(new StatsFactoryImpl(new NullStatsReporter()));
final Tracer.Builder builder = new Tracer.Builder("camel-server", new RemoteReporter(new HttpSender("http://localhost:14268/api/traces"), 1000, 100, metrics), new ConstSampler(true)).registerExtractor(Builtin.TEXT_MAP, new TextMapCodec(true));
return builder.build();
}
use of com.uber.jaeger.metrics.StatsFactoryImpl in project jaeger-client-java by jaegertracing.
the class ConfigurationTest method testRateLimitingSampler.
@Test
public void testRateLimitingSampler() {
SamplerConfiguration samplerConfiguration = new SamplerConfiguration().withType(RateLimitingSampler.TYPE);
Sampler sampler = samplerConfiguration.createSampler("name", new Metrics(new StatsFactoryImpl(new NullStatsReporter())));
assertTrue(sampler instanceof RateLimitingSampler);
}
use of com.uber.jaeger.metrics.StatsFactoryImpl in project jaeger-client-java by jaegertracing.
the class ConfigurationTest method testConstSampler.
@Test
public void testConstSampler() {
SamplerConfiguration samplerConfiguration = new SamplerConfiguration().withType(ConstSampler.TYPE);
Sampler sampler = samplerConfiguration.createSampler("name", new Metrics(new StatsFactoryImpl(new NullStatsReporter())));
assertTrue(sampler instanceof ConstSampler);
}
use of com.uber.jaeger.metrics.StatsFactoryImpl in project jaeger-client-java by jaegertracing.
the class ConfigurationTest method testProbabilisticSampler.
@Test
public void testProbabilisticSampler() {
SamplerConfiguration samplerConfiguration = new SamplerConfiguration().withType(ProbabilisticSampler.TYPE);
Sampler sampler = samplerConfiguration.createSampler("name", new Metrics(new StatsFactoryImpl(new NullStatsReporter())));
assertTrue(sampler instanceof ProbabilisticSampler);
}
Aggregations