murong00 commented on a change in pull request #9814:
URL: https://github.com/apache/pulsar/pull/9814#discussion_r588098784
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGenerator.java
##########
@@ -130,9 +130,11 @@ private static void
generateBrokerBasicMetrics(PulsarService pulsar, SimpleTextO
parseMetricsToPrometheusMetrics(new
ManagedLedgerMetrics(pulsar).generate(),
clusterName, Collector.Type.GAUGE, stream);
- // generate managedCursor metrics
- parseMetricsToPrometheusMetrics(new
ManagedCursorMetrics(pulsar).generate(),
- clusterName, Collector.Type.GAUGE, stream);
+ if(includeManagedCursorMetrics){
Review comment:
Why not use
`pulsar.getConfiguration().isExposeManagedCursorMetricsInPrometheus()
` here? please note the code style `if (...) {}`.
----------------------------------------------------------------
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]