def METHOD_NAME(self, global_config: dict):
    # checking the status of prometheus
    try:
        logging.debug("checking prometheus connections")
        prometheus_params = PrometheusParams(**global_config)
        prometheus_connection = get_prometheus_connect(prometheus_params=prometheus_params)
        prometheus_connection.check_prometheus_connection(params={})
        self.status.prometheus = True
        if self.__check_prometheus_flags:
            prometheus_flags = get_prometheus_flags(prom=prometheus_connection)
            if prometheus_flags:
                self.status.prometheus_retention_time = prometheus_flags.get("retentionTime", "")
        self.__check_prometheus_flags = False
    except Exception as e:
        if (
            isinstance(e, NoPrometheusUrlFound)
            or isinstance(e, PrometheusNotFound)
            or isinstance(e, VictoriaMetricsNotFound)
        ):
            self.status.prometheus = False
        self.status.prometheus_retention_time = ""
        if time.time() - self.__last_prometheus_error_log_time > self.__prometheus_error_log_period_sec:
            self.__last_prometheus_error_log_time = time.time()
            prometheus_connection_error = isinstance(e, NoPrometheusUrlFound) or isinstance(
                e, PrometheusFlagsConnectionError
            )
            msg = f"{e}" if prometheus_connection_error else f"Failed to connect to prometheus. {e}"
            logging.error(msg, exc_info=not prometheus_connection_error)