public void stopServerTracer() { if (enabled) { serverTracer.setServerSend(); } } public void startClientTracer(String clientContext)
/** * Interface method implementation. Interprets the response for transport errors and submits suitable annotation to the server tracer and also marks receipt * of the response on it. * @see com.flipkart.phantom.task.spi.interceptor.ResponseInterceptor#process(java.lang.Object, com.google.common.base.Optional) */ public void process(S response, Optional<RuntimeException> transportError) { if (transportError.isPresent()) { this.serverTracer.submitAnnotation(FAILURE_ANNOTATION); } this.serverTracer.setServerSend(); }
@Override public void afterCompletion(final HttpServletRequest request, final HttpServletResponse response, final Object handler, final Exception ex) { final ServerSpan span = (ServerSpan) request.getAttribute(HTTP_SERVER_SPAN_ATTRIBUTE); if (span != null) { serverThreadBinder.setCurrentSpan(span); } try { serverTracer.setServerSend(); } finally { serverTracer.clearCurrentSpan(); } }
public void handle(ServerResponseAdapter adapter) { // We can submit this in any case. When server state is not set or // we should not trace this request nothing will happen. LOGGER.fine("Sending server send."); try { for(KeyValueAnnotation annotation : adapter.responseAnnotations()) { serverTracer.submitBinaryAnnotation(annotation.getKey(), annotation.getValue()); } serverTracer.setServerSend(); } finally { serverTracer.clearCurrentSpan(); } } }
public void handle(ServerResponseAdapter adapter) { // We can submit this in any case. When server state is not set or // we should not trace this request nothing will happen. LOGGER.fine("Sending server send."); try { for(KeyValueAnnotation annotation : adapter.responseAnnotations()) { serverTracer.submitBinaryAnnotation(annotation.getKey(), annotation.getValue()); } serverTracer.setServerSend(); } finally { serverTracer.clearCurrentSpan(); } } }