use of com.uber.jaeger.Configuration in project cxf by apache.
the class OpenTracingTracingTest method setUp.
@Before
public void setUp() {
random = new Random();
tracer = new Configuration("tracer", new Configuration.SamplerConfiguration(ConstSampler.TYPE, 1), new Configuration.ReporterConfiguration(new TestSender())).getTracer();
TestSender.clear();
}
use of com.uber.jaeger.Configuration in project cxf by apache.
the class OpenTracingTracingTest method setUp.
@Before
public void setUp() {
TestSender.clear();
tracer = new Configuration("tracer-test-client", new Configuration.SamplerConfiguration(ConstSampler.TYPE, 1), new Configuration.ReporterConfiguration(new TestSender())).getTracer();
openTracingClientProvider = new OpenTracingClientProvider(tracer);
random = new Random();
}
use of com.uber.jaeger.Configuration in project jaeger-client-java by jaegertracing.
the class TracingUtilsTest method getTraceContext.
@Test
public void getTraceContext() {
Tracer tracer = new Configuration("boop").getTracer();
Assert.assertNotNull(tracer);
TracingUtils.setTracer(tracer);
Assert.assertNotNull(TracingUtils.getTraceContext());
}
use of com.uber.jaeger.Configuration in project jaeger-client-java by jaegertracing.
the class TracingUtilsTest method tracedExecutor.
@Test()
public void tracedExecutor() throws Exception {
Tracer tracer = new Configuration("boop").getTracer();
Assert.assertNotNull(tracer);
TracingUtils.setTracer(tracer);
Assert.assertNotNull(TracingUtils.tracedExecutor(Executors.newSingleThreadExecutor()));
}
use of com.uber.jaeger.Configuration in project wildfly-swarm by wildfly-swarm.
the class JaegerInitializer method contextInitialized.
@Override
public void contextInitialized(ServletContextEvent servletContextEvent) {
ServletContext sc = servletContextEvent.getServletContext();
String serviceName = getProperty(sc, JAEGER_SERVICE_NAME);
if (serviceName == null || serviceName.isEmpty()) {
logger.info("No Service Name set. Skipping initialization of the Jaeger Tracer.");
return;
}
Configuration configuration = new Configuration(getProperty(sc, JAEGER_SERVICE_NAME), new Configuration.SamplerConfiguration(getProperty(sc, JAEGER_SAMPLER_TYPE), getPropertyAsNumber(sc, JAEGER_SAMPLER_PARAM), getProperty(sc, JAEGER_SAMPLER_MANAGER_HOST_PORT)), new ReporterConfiguration(getPropertyAsBoolean(sc, JAEGER_REPORTER_LOG_SPANS), getProperty(sc, JAEGER_AGENT_HOST), getPropertyAsInt(sc, JAEGER_AGENT_PORT), getPropertyAsInt(sc, JAEGER_REPORTER_FLUSH_INTERVAL), getPropertyAsInt(sc, JAEGER_REPORTER_MAX_QUEUE_SIZE)));
GlobalTracer.register(configuration.getTracer());
}
Aggregations