hangc0276 commented on pull request #6814:
URL: https://github.com/apache/pulsar/pull/6814#issuecomment-622652398


   > Just out of curiosity, why do you implement a new StatsProvider? 
BookKeeper already has the prometheus data provider. Why not re-use it?
   
   The reasons of implementing a new prometheus statsProvider as follows:
   1. bookkeeper's prometheus statsProvider will open an individual ip:port to 
provide http service, which can't be integrated into pulsar's now available 
prometheus http service which is just concat metric string into prometheus 
format.
   2. some components of bookkeeper's prometheus statsProvider dependent on are 
package private, which can't be accessed out of 
`org.apache.bookkeeper.stats.prometheus` package, 
       - `PrometheusStatsLogger` has package private constructor
       - `SimpleGauge` has package private `getSample` method
       - `PrometheusTextFormatUtil` has package private `writeGauge`, 
`writeCounter`, `writeOpStat` method
       - `DataSketchesOpStatsLogger` has package private constructor
   
   whether have other new ways to reuse bookkeeper's prometheus statsProvider?


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to