/** * Sets server received event for current request. This should be done after setting state using one of 3 methods * {@link ServerTracer#setStateCurrentTrace(SpanId, String)} , {@link ServerTracer#setStateNoTracing()} or * {@link ServerTracer#setStateUnknown(String)}. */ public void setServerReceived() { submitStartAnnotation("sr"); }
/** * Sets server received event for current request. This should be done after setting state using one of 3 methods * {@link ServerTracer#setStateCurrentTrace(long, long, Long, String)} , {@link ServerTracer#setStateNoTracing()} or * {@link ServerTracer#setStateUnknown(String)}. */ public void setServerReceived() { submitStartAnnotation(zipkinCoreConstants.SERVER_RECV); }
/** * Like {@link #setServerReceived()}, except you can log the network context of the caller, for * example an IP address from the {@code X-Forwarded-For} header. * * @param client represents the client (peer). Set {@link Endpoint#service_name} to * "unknown" if unknown. */ public void setServerReceived(Endpoint client) { submitAddress("ca", client); submitStartAnnotation("sr"); }
/** * Like {@link #setServerReceived()}, except you can log the network context of the caller, for * example an IP address from the {@code X-Forwarded-For} header. * * @param ipv4 ipv4 of the client as an int. Ex for 1.2.3.4, it would be (1 << 24) | (2 << 16) | (3 << 8) | 4 * @param port port for client-side of the socket, or 0 if unknown * @param clientService lowercase {@link Endpoint#service_name name} of the callee service or * null if unknown */ public void setServerReceived(int ipv4, int port, @Nullable String clientService) { submitAddress(zipkinCoreConstants.CLIENT_ADDR, ipv4, port, clientService); submitStartAnnotation(zipkinCoreConstants.SERVER_RECV); }