Search in sources :

Example 6 with SenderException

use of com.uber.jaeger.exceptions.SenderException in project jaeger-client-java by jaegertracing.

the class UdpSenderTest method testAppendSpanTooLarge.

@Test(expected = SenderException.class)
public void testAppendSpanTooLarge() throws Exception {
    Span jaegerSpan = (Span) tracer.buildSpan("raza").startManual();
    String msg = "";
    for (int i = 0; i < 10001; i++) {
        msg += ".";
        jaegerSpan.log(msg);
    }
    try {
        sender.append(jaegerSpan);
    } catch (SenderException e) {
        assertEquals(e.getDroppedSpanCount(), 1);
        throw e;
    }
}
Also used : SenderException(com.uber.jaeger.exceptions.SenderException) Span(com.uber.jaeger.Span) Test(org.junit.Test)

Aggregations

SenderException (com.uber.jaeger.exceptions.SenderException)6 Endpoint (com.twitter.zipkin.thriftjava.Endpoint)2 Span (com.uber.jaeger.Span)2 Test (org.junit.Test)2 Process (com.uber.jaeger.thriftjava.Process)1 TException (org.apache.thrift.TException)1 AwaitableCallback (zipkin.reporter.internal.AwaitableCallback)1