use of io.jaegertracing.internal.metrics.InMemoryMetricsFactory 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 InMemoryMetricsFactory()));
assertTrue(sampler instanceof ConstSampler);
}
use of io.jaegertracing.internal.metrics.InMemoryMetricsFactory in project jaeger-client-java by jaegertracing.
the class RemoteBaggageRestrictionManagerTest method setUp.
@Before
public void setUp() throws Exception {
metricsFactory = new InMemoryMetricsFactory();
metrics = new Metrics(metricsFactory);
}
use of io.jaegertracing.internal.metrics.InMemoryMetricsFactory in project jaeger-client-java by jaegertracing.
the class RemoteControlledSamplerTest method setUp.
@Before
public void setUp() throws Exception {
metrics = new Metrics(new InMemoryMetricsFactory());
// TODO this starts the timer with mocks not yet configured, causing NPEs; refactor to .build() from tests
undertest = new RemoteControlledSampler.Builder(SERVICE_NAME).withSamplingManager(samplingManager).withInitialSampler(initialSampler).withMetrics(metrics).build();
}
use of io.jaegertracing.internal.metrics.InMemoryMetricsFactory in project jaeger-client-java by jaegertracing.
the class JaegerSpanTest method setUp.
@Before
public void setUp() {
metricsFactory = new InMemoryMetricsFactory();
reporter = new InMemoryReporter();
clock = mock(Clock.class);
metrics = new Metrics(metricsFactory);
final JaegerTracer.Builder tracerBuilder = new JaegerTracer.Builder("SamplerTest").withReporter(reporter).withSampler(new ConstSampler(true)).withMetrics(metrics).withClock(clock).withBaggageRestrictionManager(new DefaultBaggageRestrictionManager()).withExpandExceptionLogs();
tracer = tracerBuilder.build();
tracer128 = tracerBuilder.withTraceId128Bit().build();
jaegerSpan = tracer.buildSpan("some-operation").start();
}
use of io.jaegertracing.internal.metrics.InMemoryMetricsFactory in project jaeger-client-java by jaegertracing.
the class ZipkinV2ReporterTest method setup.
@Before
public void setup() {
sender = URLConnectionSender.newBuilder().encoding(Encoding.JSON).endpoint(zipkinRule.httpUrl() + "/api/v2/spans").build();
zipkinReporter = zipkin2.reporter.AsyncReporter.builder(sender).messageTimeout(0, TimeUnit.MILLISECONDS).build();
reporter = new ZipkinV2Reporter(zipkinReporter);
tracer = new JaegerTracer.Builder("test-sender").withReporter(reporter).withSampler(new ConstSampler(true)).withMetricsFactory(new InMemoryMetricsFactory()).build();
}
Aggregations