class_docstr: An async interceptor for Prometheus metrics.
class_docstr_tok: ["An","async","interceptor","for","Prometheus","metrics","."]
code: def __init__(self, *, namespace: str = "bentoml_api_server"):
      self._is_setup = False
      self.namespace = namespace
  
file_path: BentoML/src/bentoml/grpc/interceptors/prometheus.py
imports: from __future__ import annotations
  import contextvars
  import functools
  import logging
  import typing
  from timeit import default_timer
  from typing import TYPE_CHECKING
  from simple_di import Provide
  from simple_di import inject
  from bentoml._internal.configuration.containers import BentoMLContainer
  from bentoml._internal.context import component_context
  from bentoml.grpc.utils import import_generated_stubs
  from bentoml.grpc.utils import import_grpc
  from bentoml.grpc.utils import to_http_status
  from bentoml.grpc.utils import wrap_rpc_handler
label_desc: Use image node_id 1 to create a new PrometheusServerInterceptor object from inherited base classes: aio with example: obj = PrometheusServerInterceptor()