TracingInterceptor implements Interceptor { static void parseRouteAddress(Chain chain, Span span) { if (span.isNoop()) return; Connection connection = chain.connection(); if (connection == null) return; InetSocketAddress socketAddress = connection.route().socketAddress(); span.remoteIpAndPort(socketAddress.getHostString(), socketAddress.getPort()); } TracingInterceptor(HttpTracing httpTracing); static Interceptor create(Tracing tracing); static Interceptor create(HttpTracing httpTracing); @Override Response intercept(Chain chain);  }
@Test public void parseRouteAddress_skipsOnNoop() { when(span.isNoop()).thenReturn(true); TracingInterceptor.parseRouteAddress(chain, span); verify(span).isNoop(); verifyNoMoreInteractions(span); }