code: def _setup(
      self,
      metrics_client: PrometheusClient = Provide[
          BentoMLContainer.metrics_client
      ],
      duration_buckets: tuple[float, ...] = Provide[
          BentoMLContainer.duration_buckets
      ],
  ):
      self.metrics_client = metrics_client
  
      self.metrics_request_duration = metrics_client.Histogram(
          namespace=self.namespace,
          name="request_duration_seconds",
          documentation="API HTTP request duration in seconds",
          labelnames=[
              "endpoint",
              "service_name",
              "service_version",
              "http_response_code",
          ],
          buckets=duration_buckets,
      )
      self.metrics_request_total = metrics_client.Counter(
          namespace=self.namespace,
          name="request_total",
          documentation="Total number of HTTP requests",
          labelnames=[
              "endpoint",
              "service_name",
              "service_version",
              "http_response_code",
          ],
      )
      self.metrics_request_in_progress = metrics_client.Gauge(
          namespace=self.namespace,
          name="request_in_progress",
          documentation="Total number of HTTP requests in progress now",
          labelnames=["endpoint", "service_name", "service_version"],
          multiprocess_mode="livesum",
      )
      self._is_setup = True
  
file_path: BentoML/src/bentoml/_internal/server/http/instruments.py
imports: from __future__ import annotations
  import contextvars
  import logging
  from timeit import default_timer
  from typing import TYPE_CHECKING
  from simple_di import Provide
  from simple_di import inject
  from ...configuration.containers import BentoMLContainer
  from ...context import component_context
label_desc: Use image node_id 2 for calling the HTTPTrafficMetricsMiddleware obj's underlying member method code with example usage: obj._setup(metrics_client, duration_buckets) without return types