diff --git a/inlong-audit/audit-proxy/src/main/java/org/apache/inlong/audit/sink/pulsar/PulsarClientService.java b/inlong-audit/audit-proxy/src/main/java/org/apache/inlong/audit/sink/pulsar/PulsarClientService.java index c35617a27bf..2995fa12fc8 100644 --- a/inlong-audit/audit-proxy/src/main/java/org/apache/inlong/audit/sink/pulsar/PulsarClientService.java +++ b/inlong-audit/audit-proxy/src/main/java/org/apache/inlong/audit/sink/pulsar/PulsarClientService.java @@ -19,6 +19,7 @@ import org.apache.inlong.audit.consts.AttributeConstants; import org.apache.inlong.audit.file.ConfigManager; +import org.apache.inlong.audit.metric.MetricsManager; import org.apache.inlong.audit.sink.EventStat; import org.apache.inlong.audit.utils.LogCounter; import org.apache.inlong.common.constant.MQType; @@ -160,6 +161,7 @@ public boolean sendMessage(String topic, Event event, if (producer == null) { logger.error("Get producer is null!"); + MetricsManager.getInstance().addSendFailed(1); return false; }