use of io.jaegertracing.spi.Reporter in project jaeger-client-java by jaegertracing.
the class Configuration method getTracerBuilder.
public JaegerTracer.Builder getTracerBuilder() {
if (reporterConfig == null) {
reporterConfig = new ReporterConfiguration();
}
if (samplerConfig == null) {
samplerConfig = new SamplerConfiguration();
}
if (codecConfig == null) {
codecConfig = new CodecConfiguration();
}
if (metricsFactory == null) {
metricsFactory = loadMetricsFactory();
}
Metrics metrics = new Metrics(metricsFactory);
Reporter reporter = reporterConfig.getReporter(metrics);
Sampler sampler = samplerConfig.createSampler(serviceName, metrics);
JaegerTracer.Builder builder = createTracerBuilder(serviceName).withSampler(sampler).withReporter(reporter).withMetrics(metrics).withTags(tracerTags);
if (useTraceId128Bit) {
builder = builder.withTraceId128Bit();
}
codecConfig.apply(builder);
return builder;
}
use of io.jaegertracing.spi.Reporter in project jaeger-client-java by jaegertracing.
the class JaegerTracerTest method testClose.
@Test
public void testClose() {
Reporter reporter = mock(Reporter.class);
Sampler sampler = mock(Sampler.class);
tracer = new JaegerTracer.Builder("bonda").withReporter(reporter).withSampler(sampler).build();
tracer.close();
verify(reporter).close();
verify(sampler).close();
}
Aggregations