use of io.jaegertracing.internal.reporters.InMemoryReporter in project jaeger-client-java by jaegertracing.
the class MDCScopeManagerTest method setUp.
@Before
public void setUp() {
reporter = new InMemoryReporter();
defaultTracer = createTracer(new MDCScopeManager.Builder().build());
}
use of io.jaegertracing.internal.reporters.InMemoryReporter in project jaeger-client-java by jaegertracing.
the class ActiveSpanTest method testCustomScopeManager.
@Test
public void testCustomScopeManager() {
Span span = mock(Span.class);
Scope scope = mock(Scope.class);
JaegerTracer tracer = new JaegerTracer.Builder("test").withReporter(new InMemoryReporter()).withSampler(new ConstSampler(true)).withScopeManager(new ScopeManager() {
@Override
public Scope activate(Span span) {
return scope;
}
@Override
public Span activeSpan() {
return span;
}
}).build();
assertEquals(span, tracer.scopeManager().activeSpan());
assertEquals(scope, tracer.scopeManager().activate(span));
}
use of io.jaegertracing.internal.reporters.InMemoryReporter 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.reporters.InMemoryReporter 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();
}
use of io.jaegertracing.internal.reporters.InMemoryReporter in project jaeger-client-java by jaegertracing.
the class V2SpanConverterTest method setUp.
@Before
public void setUp() {
final JaegerTracer.Builder tracerBuilder = new JaegerTracer.Builder("test-service-name").withReporter(new InMemoryReporter()).withSampler(new ConstSampler(true)).withZipkinSharedRpcSpan();
tracer = tracerBuilder.build();
tracer128 = tracerBuilder.withTraceId128Bit().build();
}
Aggregations