michaeljmarshall commented on issue #10857:
URL: https://github.com/apache/pulsar/issues/10857#issuecomment-862080194


   I wonder if perhaps part of the problem here is that the 
`pulsar_topics_count` metric actually represents the number of topics loaded, 
not the total number of topics. I'd need to double check the implementation to 
be sure, but that could lead to the confusion seen here. If my understanding is 
correct, I see two options available:
   
   1. Introduce a new gauge metric that reports the total number of topics (not 
just the loaded ones). Then, only report this metric from the lead broker.
   2. Introduce the same metric as in 1, but instead of reporting it from the 
lead broker, report it from each bundle.
   
   In each solution, it'd be important to decrement the gauge as bundles are 
moved among brokers to ensure that topics are not double counted. I am pretty 
sure that a bundle doesn't have to be loaded if none of its topics are loaded, 
so that could lead to similar problems raised in this issue. Either way, the 
existing metric has a bit of a misleading name.


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

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


Reply via email to