Technoboy- commented on a change in pull request #13833:
URL: https://github.com/apache/pulsar/pull/13833#discussion_r792349092



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGenerator.java
##########
@@ -160,6 +169,46 @@ private static void 
generateBrokerBasicMetrics(PulsarService pulsar, SimpleTextO
                 clusterName, Collector.Type.GAUGE, stream);
     }
 
+
+    private static void generateLedgerOffloaderMetrics(PulsarService pulsar, 
SimpleTextOutputStream stream,
+                                                       boolean 
includeTopicMetrics) {
+        List<Metrics> metricList = new LinkedList<>();
+        if (includeTopicMetrics) {
+            
pulsar.getBrokerService().getMultiLayerTopicMap().forEach((namespace, 
bundlesMap) -> {
+                bundlesMap.forEach((bundle, topicsMap) -> {
+                    topicsMap.forEach((topicName, topic) -> {
+                        if (topic instanceof PersistentTopic) {
+                            try {
+                                List<Metrics> metrics =

Review comment:
       I think we should check ledgerOffloader first. and if we do it like 
this, there will be more duplicate checks.




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


Reply via email to