Search in sources :

Example 1 with TracerResolver

use of io.opentracing.contrib.tracerresolver.TracerResolver in project jaeger-client-java by jaegertracing.

the class JaegerTracerResolverTest method canFindTracerResolver.

@Test
public void canFindTracerResolver() {
    System.setProperty(Configuration.JAEGER_SERVICE_NAME, "canFindTracerResolver");
    TracerResolver tracerResolver = ServiceLoader.load(TracerResolver.class).iterator().next();
    assertNotNull(tracerResolver);
    assertTrue(tracerResolver instanceof JaegerTracerResolver);
    JaegerTracer tracer = ((JaegerTracerResolver) tracerResolver).resolve();
    assertNotNull(tracer);
}
Also used : TracerResolver(io.opentracing.contrib.tracerresolver.TracerResolver) JaegerTracer(io.jaegertracing.internal.JaegerTracer) Test(org.junit.Test)

Aggregations

JaegerTracer (io.jaegertracing.internal.JaegerTracer)1 TracerResolver (io.opentracing.contrib.tracerresolver.TracerResolver)1 Test (org.junit.Test)1