class_docstr: Mixin for the request handling monitoring
  
  :param metrics_registry: optional metrics registry for prometheus used if we need to expose metrics from the executor or from the data request handler
  :param runtime_name: optional runtime_name that will be registered during monitoring
code: def _update_end_successful_requests_metrics(self, result: "Request"):
      if (
          self._receiving_request_metrics
      ):  # this one should only be observed when the metrics is succesful
          init_time = self._request_init_time.pop(
              result.request_id
          )  # need to pop otherwise it stays in memory forever
          self._receiving_request_metrics.observe(
              time.time() - init_time
          )
      if (
          self._receiving_request_histogram
      ):  # this one should only be observed when the metrics is succesful
          init_time = self._meter_request_init_time.pop(
              result.request_id
          )  # need to pop otherwise it stays in memory forever
          self._receiving_request_histogram.record(
              time.time() - init_time, attributes=self._metric_labels
          )
  
      if self._pending_requests_metrics:
          self._pending_requests_metrics.dec()
      if self._pending_requests_up_down_counter:
          self._pending_requests_up_down_counter.add(
              -1, attributes=self._metric_labels
          )
  
      if self._successful_requests_metrics:
          self._successful_requests_metrics.inc()
      if self._successful_requests_counter:
          self._successful_requests_counter.add(
              1, attributes=self._metric_labels
          )
  
      if self._sent_response_bytes:
          self._sent_response_bytes.observe(result.nbytes)
      if self._sent_response_bytes_histogram:
          self._sent_response_bytes_histogram.record(
              result.nbytes, attributes=self._metric_labels
          )
  
file_path: jina/jina/serve/runtimes/monitoring.py
imports: import time
  from typing import TYPE_CHECKING, Optional, Union
  from jina.importer import ImportExtensions
  from jina.proto import jina_pb2
label_desc: Use image node_id 3 for calling the MonitoringRequestMixin obj's underlying member method code with example usage: obj._update_end_successful_requests_metrics(result) without return types