heesung-sn commented on code in PR #23035:
URL: https://github.com/apache/pulsar/pull/23035#discussion_r1680204634


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -3691,16 +3708,22 @@ public boolean isBrokerPayloadProcessorEnabled() {
         return !brokerEntryPayloadProcessors.isEmpty();
     }
 
-    public void pausedConnections(int numberOfConnections) {
-        pausedConnections.add(numberOfConnections);
+    public void recordConnectionPaused() {
+        rateLimitedConnectionsCounter.add(1, 
ConnectionRateLimitOperationName.PAUSED.attributes);
+    }
+
+    public void recordConnectionResumed() {
+        rateLimitedConnectionsCounter.add(1, 
ConnectionRateLimitOperationName.RESUMED.attributes);
     }
 
-    public void resumedConnections(int numberOfConnections) {
-        pausedConnections.add(-numberOfConnections);
+    public void recordConnectionThrottled() {
+        rateLimitedConnectionsCounter.add(1, 
ConnectionRateLimitOperationName.THROTTLED.attributes);
+        throttledConnectionsGauge.inc();

Review Comment:
   wouldn't this increase too much, bigger than the total connections?



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

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

Reply via email to