public int printAndResetStatsInfo(long startTime) {
            int printCnt = 0;
            // get print time (second)
            long printTime = startTime / 1000;
            for (Map.Entry<String, StatsItem> entry : counterMap.entrySet()) {
                if (entry == null || entry.getKey() == null || entry.getValue() == null) {
                    continue;
                }
                LOGGER.info("{}#{}#{}_{}#{}={}", this.statsName, INDEX_RECORD_VER, printTime,
                        RECODE_ID.incrementAndGet(), entry.getKey(), entry.getValue().toString());
                printCnt++;
            }
            counterMap.clear();
            return printCnt;
        }
Add failure statistic

@param key  the statistic key
@param failCnt  the failure count
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/metrics/stats/MonitorIndex.java