Add tracking of failures for metastore API calls