code: def __init__(
      self,
      app: ext.ASGIApp,
      namespace: str = "bentoml_api_server",
  ):
      self.app = app
      self.namespace = namespace
      self._is_setup = False
  
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 1 to create a new HTTPTrafficMetricsMiddleware object  with example: obj = HTTPTrafficMetricsMiddleware(app, namespace)