code: def setup_prometheus(self, registry=None):
          
          kwargs = {}
          if registry:
              kwargs["registry"] = registry
          self.metrics = PrometheusMetrics(self.app, **kwargs)
          try:
              version = pkg_resources.require(self.app.name)[0].version
          except pkg_resources.DistributionNotFound:
              version = "unknown"
          self.metrics.info(
              "app_info", "Application info", version=version, appname=self.app.name
          )
          self.app.logger.info("Prometheus is enabled.")
docs: Setup Prometheus.