From d50ed3b36f4b1d9b2067b9b454e1b779358eb009 Mon Sep 17 00:00:00 2001 From: doleyzi <43397300+doleyzi@users.noreply.github.com> Date: Wed, 23 Oct 2024 18:32:00 +0800 Subject: [PATCH] [INLONG-11396][Audit] Add monitoring of pulsar producer creation failure for Audit Proxy (#11399) --- .../apache/inlong/audit/sink/pulsar/PulsarClientService.java | 2 ++ 1 file changed, 2 insertions(+) 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; }