use of io.jaegertracing.internal.reporters.InMemoryReporter in project jaeger-client-java by jaegertracing.
the class RemovedFrom032Test method setUp.
@Before
public void setUp() {
reporter = new InMemoryReporter();
tracer = new JaegerTracer.Builder("TracerTestService").withReporter(reporter).withSampler(new ConstSampler(true)).build();
}
use of io.jaegertracing.internal.reporters.InMemoryReporter in project jaeger-client-java by jaegertracing.
the class TraceContextCodecTest method testDebugIdWithoutTraceHeader.
@Test
public void testDebugIdWithoutTraceHeader() {
Map<String, String> extractCarrier = new HashMap<>();
TextMapAdapter textMap = new TextMapAdapter(extractCarrier);
textMap.put(Constants.DEBUG_ID_HEADER_KEY, EXAMPLE_DEBUG_ID);
JaegerSpanContext spanContext = traceContextCodec.extract(textMap);
JaegerTracer tracer = new JaegerTracer.Builder("service").withReporter(new InMemoryReporter()).build();
JaegerSpan child = tracer.buildSpan("span").asChildOf(spanContext).start();
assertTrue(child.context().isDebug());
child.finish();
tracer.close();
}
use of io.jaegertracing.internal.reporters.InMemoryReporter in project jaeger-client-java by jaegertracing.
the class ActiveSpanTest method setUp.
@Before
public void setUp() {
reporter = new InMemoryReporter();
tracer = new JaegerTracer.Builder("TracerTestService").withReporter(reporter).withSampler(new ConstSampler(true)).build();
}
use of io.jaegertracing.internal.reporters.InMemoryReporter 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.reporters.InMemoryReporter in project jaeger-client-java by jaegertracing.
the class NoopMetricsFactoryTest method canBeUsedWithMetrics.
@Test
public void canBeUsedWithMetrics() {
NoopMetricsFactory metricsFactory = new NoopMetricsFactory();
JaegerTracer tracer = new JaegerTracer.Builder("metricsFactoryTest").withReporter(new InMemoryReporter()).withSampler(new ConstSampler(true)).withMetrics(new Metrics(metricsFactory)).build();
tracer.buildSpan("theoperation").start();
}
Aggregations