justinwwhuang commented on code in PR #10315:
URL: https://github.com/apache/inlong/pull/10315#discussion_r1619808506


##########
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/metrics/audit/AuditUtils.java:
##########
@@ -59,12 +57,32 @@ public static void initAudit() {
     }
 
     /**
-     * Add audit data
+     * Add input audit data
+     *
+     * @param event    event to be counted
      */
-    public static void add(int auditID, Event event) {
-        if (!CommonConfigHolder.getInstance().isEnableAudit() || event == 
null) {
+    public static void addInputSuccess(Event event) {
+        if (event == null || 
!CommonConfigHolder.getInstance().isEnableAudit()) {
             return;
         }
+        addAuditData(event,
+                
AuditOperator.getInstance().buildSuccessfulAuditId(AuditIdEnum.DATA_PROXY_INPUT));

Review Comment:
   It is recommended to calculate in advance and not to do it every time it is 
called



-- 
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

Reply via email to