You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/10 07:01:53 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #10885: Provide a flag to disable managed ledger metrics

merlimat commented on a change in pull request #10885:
URL: https://github.com/apache/pulsar/pull/10885#discussion_r648904030



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGenerator.java
##########
@@ -131,14 +131,19 @@ private static void generateBrokerBasicMetrics(PulsarService pulsar, SimpleTextO
         parseMetricsToPrometheusMetrics(new ManagedLedgerCacheMetrics(pulsar).generate(),
                 clusterName, Collector.Type.GAUGE, stream);
 
-        // generate managedLedger metrics
-        parseMetricsToPrometheusMetrics(new ManagedLedgerMetrics(pulsar).generate(),
+        // if Topic-level metrics is disabled, we shouldn't expose managed ledger metrics
+        if (pulsar.getConfiguration().isExposeTopicLevelMetricsInPrometheus()) {

Review comment:
       Yes, I reviewed that and forgot about it. I only found out after making the same change and getting conflicts with master. :( 




-- 
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:
users@infra.apache.org