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 2022/03/14 17:35:37 UTC

[GitHub] [pulsar] cbornet commented on a change in pull request #14681: Add support of PrometheusRawMetricsProvider for the Pulsar-Proxy

cbornet commented on a change in pull request #14681:
URL: https://github.com/apache/pulsar/pull/14681#discussion_r826214827



##########
File path: pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyServiceStarter.java
##########
@@ -240,7 +240,10 @@ public static void addWebServerHandlers(WebServer server,
                                      ProxyConfiguration config,
                                      ProxyService service,
                                      BrokerDiscoveryProvider discoveryProvider) throws Exception {
-        server.addServlet("/metrics", new ServletHolder(MetricsServlet.class),
+        PrometheusMetricsServlet metricsServlet =
+                new PrometheusMetricsServlet(-1L, config.getClusterName());
+        service.getMetricsProviders().forEach(metricsServlet::addRawMetricsProvider);

Review comment:
       I was under the impression that PrometheusRawMetricsProviders would be added during the ProxyService startup and not after. Do we really need to handle the case that they are added later ?




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