    def __init__(self, *, multiproc: bool = True):
        """
        PrometheusClient is BentoML's own prometheus client that extends the official Python client.

        It sets up a multiprocess dir for Prometheus to work in multiprocess mode, which is required
        for BentoML to work in production.

        .. note::

           For Prometheus to behave properly, ``prometheus_client`` must be imported after this client
           is called. This has to do with ``prometheus_client`` relies on ``PROMEHEUS_MULTIPROC_DIR``, which
           will be set by this client.

        For API documentation, refer to https://docs.bentoml.com/en/latest/reference/metrics.html.
        """
        self.multiproc = multiproc
        self._registry = None
        self._imported = False
        self._pid: int | None = None
PrometheusClient is BentoML's own prometheus client that extends the official Python client.

It sets up a multiprocess dir for Prometheus to work in multiprocess mode, which is required
for BentoML to work in production.

.. note::

For Prometheus to behave properly, ``prometheus_client`` must be imported after this client
is called. This has to do with ``prometheus_client`` relies on ``PROMEHEUS_MULTIPROC_DIR``, which
will be set by this client.

For API documentation, refer to https://docs.bentoml.com/en/latest/reference/metrics.html.
src/bentoml/_internal/server/metrics/prometheus.py