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 06:55:25 UTC

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

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



##########
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:
       @merlimat The generated Strings are already cached. I fixed that in #9735 .




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