def METHOD_NAME(
    future,
    span,
    response_hook,
    duration_histogram,
    request_size_histogram,
    response_size_histogram,
):
    status_code = None
    description = None
    exc = future.exception()
    response = future.result()
    if span.is_recording() and exc:
        if isinstance(exc, HTTPError):
            status_code = exc.code
        description = f"{type(exc).__name__}: {exc}"
    else:
        status_code = response.code
    if status_code is not None:
        span.set_attribute(SpanAttributes.HTTP_STATUS_CODE, status_code)
        span.set_status(
            Status(
                status_code=http_status_to_status_code(status_code),
                description=description,
            )
        )
    metric_attributes = _create_metric_attributes(response)
    request_size = int(response.request.headers.get("Content-Length", 0))
    response_size = int(response.headers.get("Content-Length", 0))
    duration_histogram.record(
        response.request_time, attributes=metric_attributes
    )
    request_size_histogram.record(request_size, attributes=metric_attributes)
    response_size_histogram.record(response_size, attributes=metric_attributes)
    if response_hook:
        response_hook(span, future)
    span.end()