Fetch the metrics from the stored proc

def do_stored_procedure_check(self, instance, proc):
        """
        Fetch the metrics from the stored proc
        """

        guardSql = instance.get('proc_only_if')
        custom_tags = instance.get("tags", [])

        if (guardSql and self.proc_check_guard(instance, guardSql)) or not guardSql:
            self.open_db_connections(instance, self.DEFAULT_DB_KEY)
            cursor = self.get_cursor(instance, self.DEFAULT_DB_KEY)

            try:
                self.log.debug("Calling Stored Procedure : {}".format(proc))
                if self._get_connector(instance) == 'adodbapi':
                    cursor.callproc(proc)
                else:
                    # pyodbc does not support callproc; use execute instead.
                    # Reference: https://github.com/mkleehammer/pyodbc/wiki/Calling-Stored-Procedures
                    call_proc = '{{CALL {}}}'.format(proc)
                    cursor.execute(call_proc)

                rows = cursor.fetchall()
                self.log.debug("Row count ({}) : {}".format(proc, cursor.rowcount))

                for row in rows:
                    tags = [] if row.tags is None or row.tags == '' else row.tags.split(',')
                    tags.extend(custom_tags)

                    if row.type.lower() in self.proc_type_mapping:
                        self.proc_type_mapping[row.type](row.metric, row.value, tags)
                    else:
                        self.log.warning(
                            '{} is not a recognised type from procedure {}, metric {}'.format(
                                row.type, proc, row.metric
                            )
                        )

            except Exception as e:
                self.log.warning("Could not call procedure {}: {}".format(proc, e))

            self.close_cursor(cursor)
            self.close_db_connections(instance, self.DEFAULT_DB_KEY)
        else:
            self.log.info("Skipping call to {} due to only_if".format(proc))