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/08/30 01:32:25 UTC

[GitHub] [pulsar] codelipenghui commented on a change in pull request #11739: Expose compaction metrics to Prometheus

codelipenghui commented on a change in pull request #11739:
URL: https://github.com/apache/pulsar/pull/11739#discussion_r698108046



##########
File path: pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
##########
@@ -1999,6 +1999,11 @@
             doc = "If true, export managed cursor metrics"
     )
     private boolean exposeManagedCursorMetricsInPrometheus = false;
+    @FieldContext(
+            category = CATEGORY_METRICS,
+            doc = "If true, export compaction metrics"
+    )
+    private boolean exposeCompactionMetricsInPrometheus = false;

Review comment:
       In my opinion, we don't need this new flag to enable or disable the `feature` metrics.
   The existing metrics control flag is based on the different levels:
   
   ```
   # Enable topic level metrics
   exposeTopicLevelMetricsInPrometheus=true
   
   # Enable consumer level metrics. default is false
   exposeConsumerLevelMetricsInPrometheus=false
   
   # Enable producer level metrics. default is false
   exposeProducerLevelMetricsInPrometheus=false
   
   # Enable managed ledger metrics (aggregated by namespace). default is false
   exposeManagedLedgerMetricsInPrometheus=true
   
   # Enable cursor level metrics. default is false
   exposeManagedCursorMetricsInPrometheus=false
   ```
   
   If we introduce a feature-based metrics control, will make the configuration more complex such as enable `feature` metrics on the level.
   
   My suggestion is if users enable the topic level metrics and the topic has been compacted or doing the compaction, we should expose the compaction metrics for the topic level. If users disable the topic level metrics, we should expose the aggregated compaction metrics for the namespace level.




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org