michaeljmarshall commented on code in PR #16888:
URL: https://github.com/apache/pulsar/pull/16888#discussion_r960239598


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java:
##########
@@ -263,7 +264,14 @@ public void addServlet(String path, ServletHolder 
servletHolder, boolean require
             });
         }
         filterInitializer.addFilters(context, requiresAuthentication);
-        handlers.add(context);
+        // Enable compress on /metrics endpoint
+        if (path.equals("/metrics") && 
pulsar.getConfiguration().isCompressOutputMetricsInPrometheus()) {

Review Comment:
   Great point @asafm.



##########
conf/broker.conf:
##########
@@ -1380,6 +1380,9 @@ metricsServletTimeoutMs=30000
 # Enable or disable broker bundles metrics. The default value is false.
 exposeBundlesMetricsInPrometheus=false
 
+# Enable or disable compress output metrics in prometheus. The default value 
is false.
+compressOutputMetricsInPrometheus=false

Review Comment:
   Can we make it configurable which type of compression to use instead of 
making this a boolean?



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