@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof KeyValueAnnotation) { KeyValueAnnotation that = (KeyValueAnnotation) o; return (this.key.equals(that.getKey())) && (this.value.equals(that.getValue())); } return false; }
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(); } } }
/** * Handle a client response. * * @param adapter Adapter that hides implementation details. */ public void handle(ClientResponseAdapter adapter) { try { for (KeyValueAnnotation annotation : adapter.responseAnnotations()) { clientTracer.submitBinaryAnnotation(annotation.getKey(), annotation.getValue()); } } finally { clientTracer.setClientReceived(); } } }
/** * Handle a client response. * * @param adapter Adapter that hides implementation details. */ public void handle(ClientResponseAdapter adapter) { try { for (KeyValueAnnotation annotation : adapter.responseAnnotations()) { clientTracer.submitBinaryAnnotation(annotation.getKey(), annotation.getValue()); } } finally { clientTracer.setClientReceived(); } } }
for(KeyValueAnnotation annotation : adapter.requestAnnotations()) serverTracer.submitBinaryAnnotation(annotation.getKey(), annotation.getValue());
for(KeyValueAnnotation annotation : adapter.requestAnnotations()) serverTracer.submitBinaryAnnotation(annotation.getKey(), annotation.getValue());
/** * Handles outgoing request. * * @param adapter The adapter deals with implementation specific details. */ public void handle(ClientRequestAdapter adapter) { SpanId spanId = clientTracer.startNewSpan(adapter.getSpanName()); if (spanId == null) { // We will not trace this request. adapter.addSpanIdToRequest(null); } else { adapter.addSpanIdToRequest(spanId); for (KeyValueAnnotation annotation : adapter.requestAnnotations()) { clientTracer.submitBinaryAnnotation(annotation.getKey(), annotation.getValue()); } recordClientSentAnnotations(adapter.serverAddress()); } }
/** * Handles outgoing request. * * @param adapter The adapter deals with implementation specific details. */ public void handle(ClientRequestAdapter adapter) { SpanId context = clientTracer.startNewSpan(adapter.getSpanName()); if (context == null) { // We will not trace this request. adapter.addSpanIdToRequest(null); } else { adapter.addSpanIdToRequest(context); for (KeyValueAnnotation annotation : adapter.requestAnnotations()) { clientTracer.submitBinaryAnnotation(annotation.getKey(), annotation.getValue()); } recordClientSentAnnotations(adapter.serverAddress()); } }