class AssetGroupStatsCollector implements Constants {

    public void uploadAssetGroupTagCompliance(List<String> assetGroups) throws Exception {
        log.info("    Start Collecing tag compliance");
        List<Map<String, Object>> docs = new ArrayList<>();
        for (String ag : assetGroups) {
            try {
                Map<String, Object> doc = AssetGroupUtil.fetchTaggingSummary(COMP_API_URL, ag, getToken());
                if (!doc.isEmpty()) {
                    doc.put("ag", ag);
                    doc.put("date", CURR_DATE);
                    doc.put("@id", Util.getUniqueID(ag + CURR_DATE));
                    docs.add(doc);
                }
            } catch (Exception e) {
                log.error("Exception in uploadAssetGroupTagCompliance" , e);
                Map<String,String> errorMap = new HashMap<>();
                errorMap.put(ERROR, "Exception in uploadAssetGroupTagCompliance for Asset Group"+ag);
                errorMap.put(ERROR_TYPE, WARN);
                errorMap.put(EXCEPTION, e.getMessage());
                synchronized(errorList){
                    errorList.add(errorMap);
                }
            }
        }
        ESManager.uploadData(AG_STATS, "tagcompliance", docs, "@id", false);
        log.info("    End Collecing tag compliance");
    }

}