use of com.uber.jaeger.senders.Sender in project jaeger-client-java by jaegertracing.
the class ConfigurationTest method testSenderWithEndpointWithoutAuthData.
@Test
public void testSenderWithEndpointWithoutAuthData() {
System.setProperty(Configuration.JAEGER_ENDPOINT, "https://jaeger-collector:14268/api/traces");
Sender sender = Configuration.SenderConfiguration.fromEnv().getSender();
assertTrue(sender instanceof HttpSender);
}
use of com.uber.jaeger.senders.Sender in project jaeger-client-java by jaegertracing.
the class RemoteReporterTest method testFlushIsCalledOnSender.
@Test
public void testFlushIsCalledOnSender() throws InterruptedException {
CountDownLatch latch = new CountDownLatch(1);
Sender sender = new InMemorySender() {
@Override
public int flush() throws SenderException {
latch.countDown();
return super.flush();
}
};
reporter = new RemoteReporter(sender, flushInterval, maxQueueSize, metrics);
tracer = new Tracer.Builder("test-remote-reporter", reporter, new ConstSampler(true)).withMetrics(metrics).build();
tracer.buildSpan("mySpan").start().finish();
latch.await(1, TimeUnit.SECONDS);
assertEquals("Should have called the custom sender flush", 0, latch.getCount());
}
Aggregations