lhotari opened a new pull request, #24065:
URL: https://github.com/apache/pulsar/pull/24065

   ### Motivation
   
   Follow up on #24060 which set an incorrect content type.
   
   Metrics endpoint uses version 1.0.0 of the Prometheus/OpenMetrics text 
format.
   
   This content-type value ensures compatibility with Prometheus 3.x and later 
versions.
   For details, refer to the Prometheus 3.x migration guide:
   https://prometheus.io/docs/prometheus/latest/migration/#scrape-protocols
   
   The difference between version 1.0.0 and 0.0.4 formats is mainly about 
counters.
   The prometheus client_java library >=0.10.0 creates OpenMetrics compatible 
counters which are not compatible with the 0.0.4 format which is currently in 
use in BookKeeper.
   
   For implementation details of Prometheus client_java, see:
   
https://github.com/prometheus/client_java/blob/parent0.16.0/simpleclient/src/main/java/io/prometheus/client/Counter.java#L76-L80
   The library will always append "_total" to the counter name unless the 
counter name already contains "_total" suffix and will have a separate 
"_created" counter to ensure OpenMetrics compatibility. This change was 
introduced in https://github.com/prometheus/client_java/pull/615 in version 
0.10.0.
   Release notes: 
https://github.com/prometheus/client_java/releases/tag/parent-0.10.0
   
   In Pulsar, the Prometheus client_java library was updated to 0.15.0 with 
https://github.com/apache/pulsar/pull/13785 in Pulsar 2.11.0.
   
   ### Modifications
   
   - set version to 1.0.0 in the content type so that scraping will result in 
correct metrics
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->


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