You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "lhotari (via GitHub)" <gi...@apache.org> on 2026/08/17 15:34:35 UTC

[PR] [improve][monitor] Upgrade Dropwizard Metrics to 4.2.39 and HdrHistogram to 2.2.2 [pulsar]

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

   ### Motivation
   
   Dropwizard Metrics is two minor lines behind (4.1.12.1, released in 2020) and HdrHistogram is behind
   as well. Neither has any relationship to the Prometheus simpleclient, so they can be updated
   independently of any Prometheus client_java migration.
   
   ### Modifications
   
   `gradle/libs.versions.toml`:
   
   | library | from | to |
   |---|---|---|
   | dropwizard metrics | 4.1.12.1 | 4.2.39 |
   | HdrHistogram | 2.1.9 | 2.2.2 |
   
   Plus the corresponding jar names in the server distribution `LICENSE.bin.txt`.
   
   Dropwizard Metrics 4.2.0 was an additive release — support for Jersey 3.x, Jetty 10/11, the
   `jakarta.servlet` namespace and Caffeine 3.x — with no documented API removals. Pulsar uses
   `metrics-core`, `metrics-graphite` and `metrics-jvm`.
   
   ### Note on the Prometheus client
   
   `prometheus` (simpleclient) 0.16.0 and `prometheus-jmx` 0.16.1 are deliberately **not** touched here.
   simpleclient 0.16.0 is the final release of that line, and moving off it is a code migration rather
   than a version bump:
   
   - 64 Java files across 12 modules import `io.prometheus.client`;
   - `org.apache.bookkeeper.stats:prometheus-metrics-provider:4.18.0` has hard compile dependencies on
     `simpleclient`, `simpleclient_hotspot` and `simpleclient_servlet`, and ships in the server
     distribution;
   - `PrometheusMetricsGeneratorUtils` scrapes `CollectorRegistry.defaultRegistry`, the shared registry
     that BookKeeper and ZooKeeper publish into.
   
   `prometheus-jmx` 1.6.0 is specifically coupled to that migration: it depends on
   `prometheus-metrics-core` 1.7.0 rather than simpleclient, and in 1.x `io.prometheus.jmx.JmxCollector`
   becomes a collector on the new registry. `RuntimeUtils.registerDefaultCollectors()` registers it into
   `FunctionCollectorRegistry`, which extends the simpleclient `CollectorRegistry`, so that bump
   requires migrating the `pulsar-functions` instance metrics stack first.
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   Verified locally with `./gradlew sanityCheck` and `./gradlew checkBinaryLicense`.
   
   ### Does this pull request potentially affect one of the following parts:
   
   - [x] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   


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

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


Re: [PR] [improve][monitor] Upgrade Dropwizard Metrics to 4.2.39 and HdrHistogram to 2.2.2 [pulsar]

Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece merged PR #26353:
URL: https://github.com/apache/pulsar/pull/26353


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

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