funky-eyes commented on code in PR #7882:
URL: https://github.com/apache/incubator-seata/pull/7882#discussion_r2679264895


##########
namingserver/src/main/java/org/apache/seata/namingserver/manager/NamingManager.java:
##########
@@ -472,6 +488,10 @@ public void instanceHeartBeatCheck() {
                                     instance.getTransaction().getHost() + ":"
                                             + 
instance.getTransaction().getPort());
                         }
+
+                        // Immediately refresh cluster node count metrics 
after removing offline
+                        // instances
+                        metricsManager.refreshClusterNodeCountMetrics();

Review Comment:
   Why don't we abstract and publish a dedicated event using Spring's 
publish–subscribe mechanism, and have the Prometheus component subscribe to it 
to collect metrics? This would enable asynchronous processing and better 
decoupling.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to