Search in sources :

Example 1 with ZipkinV2Reporter

use of io.jaegertracing.zipkin.ZipkinV2Reporter 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();
}
Also used : InMemoryMetricsFactory(io.jaegertracing.internal.metrics.InMemoryMetricsFactory) ZipkinV2Reporter(io.jaegertracing.zipkin.ZipkinV2Reporter) ConstSampler(io.jaegertracing.internal.samplers.ConstSampler) JaegerTracer(io.jaegertracing.internal.JaegerTracer) Before(org.junit.Before)

Aggregations

JaegerTracer (io.jaegertracing.internal.JaegerTracer)1 InMemoryMetricsFactory (io.jaegertracing.internal.metrics.InMemoryMetricsFactory)1 ConstSampler (io.jaegertracing.internal.samplers.ConstSampler)1 ZipkinV2Reporter (io.jaegertracing.zipkin.ZipkinV2Reporter)1 Before (org.junit.Before)1