private void update(HttpLogEntry entry, Throwable t) { boolean canRetry = (t instanceof ConnectException || t instanceof ReadTimeoutException); entry.mark("received-error").withException(t).withCanRetry(canRetry); }
throw e; } finally { entry.withCanRetry(canRetry); HttpLogEntry.logClientRequest(entry);
throw e; } finally { entry.withCanRetry(canRetry); HttpLogEntry.logClientRequest(entry);
private static void update(HttpLogEntry entry, HttpClientResponse<ByteBuf> res) { int code = res.getStatus().code(); boolean canRetry = (code == 429 || code >= 500); entry.mark("received-response") .withStatusCode(code) .withStatusReason(res.getStatus().reasonPhrase()) .withResponseContentLength(res.getHeaders().getContentLength(-1)) .withCanRetry(canRetry); for (Map.Entry<String, String> h : res.getHeaders().entries()) { entry.withResponseHeader(h.getKey(), h.getValue()); } }