use of com.uber.jaeger.reporters.Reporter in project jaeger-client-java by jaegertracing.
the class TracerTest method testClose.
@Test
public void testClose() {
Reporter reporter = mock(Reporter.class);
Sampler sampler = mock(Sampler.class);
tracer = new Tracer.Builder("bonda", reporter, sampler).build();
tracer.close();
verify(reporter).close();
verify(sampler).close();
}
use of com.uber.jaeger.reporters.Reporter in project jaeger-client-java by jaegertracing.
the class Configuration method getTracerBuilder.
public Tracer.Builder getTracerBuilder() {
if (reporterConfig == null) {
reporterConfig = new ReporterConfiguration();
}
if (samplerConfig == null) {
samplerConfig = new SamplerConfiguration();
}
if (codecConfig == null) {
codecConfig = new CodecConfiguration(Collections.<Format<?>, List<Codec<TextMap>>>emptyMap());
}
if (metricsFactory == null) {
metricsFactory = new NoopMetricsFactory();
}
Metrics metrics = new Metrics(metricsFactory);
Reporter reporter = reporterConfig.getReporter(metrics);
Sampler sampler = samplerConfig.createSampler(serviceName, metrics);
Tracer.Builder builder = new Tracer.Builder(serviceName).withSampler(sampler).withReporter(reporter).withMetrics(metrics).withTags(tracerTags);
codecConfig.apply(builder);
return builder;
}
Aggregations