def METHOD_NAME(self, instance):
    harbor_url = instance["url"]
    tags = instance.get("tags", [])
    try:
        api = HarborAPI(harbor_url, self.http)
        self._check_health(api, tags)
        self._check_registries_health(api, tags)
        self._submit_project_metrics(api, tags)
        self._submit_disk_metrics(api, tags)
        self._submit_read_only_status(api, tags)
    except Exception:
        self.log.exception("An error occurred when collecting Harbor metrics")
        self.service_check(CAN_CONNECT, AgentCheck.CRITICAL)
        raise
    else:
        self.service_check(CAN_CONNECT, AgentCheck.OK)