xuesongxs commented on code in PR #16888:
URL: https://github.com/apache/pulsar/pull/16888#discussion_r938382885
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/WebService.java:
##########
@@ -263,6 +264,14 @@ public void addServlet(String path, ServletHolder
servletHolder, boolean require
});
}
filterInitializer.addFilters(context, requiresAuthentication);
+ // Enable compress on /metrics endpoint
+ if (path.equals("/metrics") &&
pulsar.getConfiguration().isEnableCompressMetricsData()) {
+ GzipHandler gzipHandler = new GzipHandler();
+ gzipHandler.setHandler(context);
+ handlers.add(gzipHandler);
+ } else {
+ handlers.add(context);
+ }
handlers.add(context);
Review Comment:
> Yes, the code was copied without deletion.
--
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]