hangc0276 commented on code in PR #17531:
URL: https://github.com/apache/pulsar/pull/17531#discussion_r979710232


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java:
##########
@@ -1634,6 +1643,29 @@ public static Multimap<String, Metric> 
parseMetrics(String metrics) {
         return parsed;
     }
 
+    @Test
+    public void testRawMetricsProvider() throws IOException {
+        PrometheusMetricsProvider rawMetricsProvider = new 
PrometheusMetricsProvider();
+        rawMetricsProvider.start(new PropertiesConfiguration());
+        
rawMetricsProvider.getStatsLogger("test").getOpStatsLogger("test_metrics")
+            .registerSuccessfulEvent(100, TimeUnit.NANOSECONDS);
+
+        getPulsar().addPrometheusRawMetricsProvider(rawMetricsProvider);

Review Comment:
   Yes, it is a public API for other plugins which run within the Pulsar broker 
to expose metrics to the Pulsar broker metric port. A public plugin repo is 
KOP. 
https://github.com/streamnative/kop/blob/a9f56e9b0435429dd8d977ba948c6772e6fe5b86/kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/KafkaProtocolHandler.java#L280.
 
   I'm developing another plugin, which also needs this public API to expose 
metrics.



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