use of io.jaegertracing.internal.metrics.InMemoryMetricsFactory 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 InMemoryMetricsFactory()));
assertTrue(sampler instanceof ProbabilisticSampler);
}
use of io.jaegertracing.internal.metrics.InMemoryMetricsFactory in project jaeger-client-java by jaegertracing.
the class ConfigurationTest method testMetrics.
@Test
public void testMetrics() {
InMemoryMetricsFactory inMemoryMetricsFactory = new InMemoryMetricsFactory();
Configuration configuration = new Configuration("foo").withMetricsFactory(inMemoryMetricsFactory);
assertEquals(inMemoryMetricsFactory, configuration.getMetricsFactory());
}
use of io.jaegertracing.internal.metrics.InMemoryMetricsFactory 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 InMemoryMetricsFactory()));
assertTrue(sampler instanceof RateLimitingSampler);
}
use of io.jaegertracing.internal.metrics.InMemoryMetricsFactory in project jaeger-client-java by jaegertracing.
the class UdpSenderTest method setUp.
@Before
public void setUp() throws Exception {
server = startServer();
reporter = new InMemoryReporter();
final JaegerTracer.Builder tracerBuilder = new JaegerTracer.Builder(SERVICE_NAME).withReporter(reporter).withSampler(new ConstSampler(true)).withMetricsFactory(new InMemoryMetricsFactory()).withTag("foo", "bar");
tracer = tracerBuilder.build();
tracer128 = tracerBuilder.withTraceId128Bit().build();
sender = new UdpSender(destHost, destPort, maxPacketSize);
}
use of io.jaegertracing.internal.metrics.InMemoryMetricsFactory in project jaeger-client-java by jaegertracing.
the class ZipkinSenderTest method setUp.
@Before
public void setUp() {
reporter = new InMemoryReporter();
final JaegerTracer.Builder tracerBuilder = new JaegerTracer.Builder("test-sender").withReporter(reporter).withSampler(new ConstSampler(true)).withMetricsFactory(new InMemoryMetricsFactory());
tracer = tracerBuilder.build();
tracer128 = tracerBuilder.withTraceId128Bit().build();
sender = newSender(messageMaxBytes);
converter = new ThriftSpanConverter();
}
Aggregations