gaoran10 commented on code in PR #19440:
URL: https://github.com/apache/pulsar/pull/19440#discussion_r1101113569


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/data/BrokerLoadData.java:
##########
@@ -187,4 +191,35 @@ public String toString(ServiceConfiguration conf) {
         );
     }
 
+    public List<Metrics> toMetrics(String advertisedBrokerAddress) {
+        var metrics = new ArrayList<Metrics>();
+        var dimensions = new HashMap<String, String>();
+        dimensions.put("metric", "loadBalancing");
+        dimensions.put("broker", advertisedBrokerAddress);

Review Comment:
   The k8s pod name is just an example, I don't want to collect k8s metrics 
from the broker. I wanted to add some extra labels when Prometheus scrapes, 
just like the label `instance`, but it's not ok, because the time series data 
may come from a proxy service, actually most broker metrics all need the broker 
dimension.
   
   <img width="912" alt="figure-1" 
src="https://user-images.githubusercontent.com/15029908/217755435-f1b0a6e1-847c-42dc-9a6e-abd05ad413df.png";>
   
   



-- 
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-unsubscr...@pulsar.apache.org

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

Reply via email to