@Test public void testDispatch() throws Exception { final Span span = tracer.buildSpan("happy-path").start(); span.finish(); final ArgumentCaptor<com.expedia.open.tracing.Span> spanCapture = ArgumentCaptor.forClass(com.expedia.open.tracing.Span.class); client.send(span); verify(serviceImpl, times(1)).dispatch(spanCapture.capture(), Matchers.<StreamObserver<DispatchResult>>any()); }
@Override public boolean send(Span span) throws ClientException { try (Sample timer = sendTimer.start()) { stub.dispatch(format.format(span), observer); } catch (Exception e) { sendExceptionCounter.increment(); throw new ClientException(e.getMessage(), e); } return true; }
GRPCAgentClient extends BaseGrpcClient<Span> { @Override public boolean send(Span span) throws ClientException { try (Sample timer = sendTimer.start()) { stub.dispatch(format.format(span), observer); } catch (Exception e) { sendExceptionCounter.increment(); throw new ClientException(e.getMessage(), e); } return true; } }
GRPCAgentClient extends BaseGrpcClient<Span> { @Override public boolean send(Span span) throws ClientException { try (Sample timer = sendTimer.start()) { stub.dispatch(format.format(span), observer); } catch (Exception e) { sendExceptionCounter.increment(); throw new ClientException(e.getMessage(), e); } return true; } GRPCAgentClient(Metrics metrics, Format<com.expedia.open.tracing.Span> format, ManagedChannel channel, SpanAgentStub stub, StreamObserver<DispatchResult> observer, long shutdownTimeoutMS); }
GRPCAgentClient extends BaseGrpcClient<Span> { @Override public boolean send(Span span) throws ClientException { try (Sample timer = sendTimer.start()) { stub.dispatch(format.format(span), observer); } catch (Exception e) { sendExceptionCounter.increment(); throw new ClientException(e.getMessage(), e); } return true; } GRPCAgentClient(Metrics metrics, Format<com.expedia.open.tracing.Span> format, ManagedChannel channel, SpanAgentStub stub, StreamObserver<DispatchResult> observer, long shutdownTimeoutMS); @Override boolean send(Span span); }
GRPCAgentClient extends BaseGrpcClient<Span> { @Override public boolean send(Span span) throws ClientException { try (Sample timer = sendTimer.start()) { stub.dispatch(format.format(span), observer); } catch (Exception e) { sendExceptionCounter.increment(); throw new ClientException(e.getMessage(), e); } return true; } GRPCAgentClient(Metrics metrics, Format<com.expedia.open.tracing.Span> format, ManagedChannel channel, SpanAgentStub stub, StreamObserver<DispatchResult> observer, long shutdownTimeoutMS); @Override boolean send(Span span);  }