hangc0276 commented on PR #17531: URL: https://github.com/apache/pulsar/pull/17531#issuecomment-1255143322
> For future readers of this PR: > > **Why is this PR needed?** Pulsar uses Bookkeeper Client, which has metrics. The way to get those metrics is to implement the BK Metric library API, which Pulsar has already done through `PrometheusMetricsProvider`, `PrometheusStatsLogger`, etc. The problem with that implementation was that the API itself supported having labels per metric, but the implementation ignored the labels provided to it. > > This PR aims to fix and add support for the labels given to it via the API methods. The impact is that now Pulsar `/metrics` endpoint, which exposes the Pulsar metrics in Prometheus format, will contain the Bookkeeper client metrics _with_ labels (which were previously stripped). @asafm Thanks for your explanation. Another purpose of this Pr is to support plugin metrics integrate with Pulsar broker's metrics through the interface. https://github.com/apache/pulsar/blob/63d4cf20e7b9c9bd24d3fcd5ba7397f0d185ce57/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java#L904-L914 https://github.com/apache/pulsar/blob/63d4cf20e7b9c9bd24d3fcd5ba7397f0d185ce57/pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java#L1673-L1682 -- 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]
