luchunliang commented on code in PR #5882: URL: https://github.com/apache/inlong/pull/5882#discussion_r969594146
########## inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/metrics/audit/AuditUtils.java: ########## @@ -88,7 +89,12 @@ public static void add(int auditID, Event event) { String inlongGroupId = DataProxyMetricItem.getInlongGroupId(headers); String inlongStreamId = DataProxyMetricItem.getInlongStreamId(headers); long logTime = getLogTime(headers); - AuditImp.getInstance().add(auditID, inlongGroupId, inlongStreamId, logTime, 1, event.getBody().length); + long msgCount = 1L; + if (event.getHeaders().containsKey(ConfigConstants.MSG_COUNTER_KEY)) { Review Comment: If event header do not have ConfigConstants.MSG_COUNTER_KEY, handler need to decode the event body to get the message count. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org