use of com.uber.jaeger.metrics.NoopMetricsFactory 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