code: public void handleEnd(
        HttpRequestContext context,
        @Nullable Q request,
        @Nullable P response,
        @Nullable Throwable error) {
      checkNotNull(context, "context");
      int httpCode = extractor.getStatusCode(response);
      recordStats(context, request, httpCode);
      spanEnd(context.span, httpCode, error);
    }
docs: Close an HTTP span and records stats specific to the request.
  
  <p>This method will set status of the span and end it. Additionally it will record measurements
  associated with the request.
  
  @param context the {@link HttpRequestContext} returned from {@link
  HttpClientHandler#handleStart(Span, Object, Object)}
  @param request the HTTP request entity.
  @param response the HTTP response entity. {@code null} means invalid response.
  @param error the error occurs when processing the response.
  @since 0.19