You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/09/13 12:59:37 UTC

[GitHub] [inlong] luchunliang commented on a diff in pull request #5882: [INLONG-5880][DataProxy] Add data reporting time process logic

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-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org