How to enable the metrics in rest proxy

I’ve gone through Confluent Rest Proxy monitoring and configuraiton, but I’m still no idea how to expose the metric in rest proxy.

The confluentinc/cp-kafka-connect image is deployed to k8s cluster. And it routes incoming traffic to Confluent cloud kafka. All I want is:

  1. Expose the metrics through rest proxy api endpoints (like the springboot actuator/prometheus endpoint), this enables Prometheus scraping metrics from the endpoint. I totally don’t understand Rest Proxy monitoring page. Would you please show me the api link for how to access the metrics?
  2. metric.reporters

A list of classes to use as metrics reporters. Implementing the MetricReporter interface allows plugging in classes that will be notified of new metric creation. The JmxReporter is always included to register JMX statistics.

Where can I find the implementation of MetricReporter? I googled it but none of them relates to Confluent MetricReporter.

Thank you in advance

If you’re looking for a smooth way to expose metrics for Prometheus, consider exploring the JmxReporter that comes with Confluent; it can help register those metrics. You might find it helpful to check GitHub for some implementations of MetricReporter, even if they’re not directly related to Confluent—sometimes, seeing how others have approached it can spark some ideas! I recently started using 4G proxy for my mobile projects, and they’ve been incredibly reliable! It’s been a lifesaver when working with different networks.

Hi @Dllipwest ,

Thank you for replying. I’ve found the jmxReporter github and a details instruction for how to enable rest proxy metric

I can successfully enable the metrics for rest proxy deployed to k8s cluster.