Repository navigation
[improve][monitor] Upgrade Dropwizard Metrics to 4.2.39 and HdrHistogram to 2.2.2 - #26353
Merged
Merged
Conversation
…m to 2.2.2 - dropwizard metrics 4.1.12.1 -> 4.2.39 - HdrHistogram 2.1.9 -> 2.2.2 Neither library depends on the Prometheus simpleclient, so these can move independently of the client_java migration. 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. Assisted-by: Claude Code (Opus 5)
nodece
approved these changes
Aug 18, 2026
1 of 11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: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.servletnamespace and Caffeine 3.x — with no documented API removals. Pulsar usesmetrics-core,metrics-graphiteandmetrics-jvm.Note on the Prometheus client
prometheus(simpleclient) 0.16.0 andprometheus-jmx0.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:
io.prometheus.client;org.apache.bookkeeper.stats:prometheus-metrics-provider:4.18.0has hard compile dependencies onsimpleclient,simpleclient_hotspotandsimpleclient_servlet, and ships in the serverdistribution;
PrometheusMetricsGeneratorUtilsscrapesCollectorRegistry.defaultRegistry, the shared registrythat BookKeeper and ZooKeeper publish into.
prometheus-jmx1.6.0 is specifically coupled to that migration: it depends onprometheus-metrics-core1.7.0 rather than simpleclient, and in 1.xio.prometheus.jmx.JmxCollectorbecomes a collector on the new registry.
RuntimeUtils.registerDefaultCollectors()registers it intoFunctionCollectorRegistry, which extends the simpleclientCollectorRegistry, so that bumprequires migrating the
pulsar-functionsinstance metrics stack first.Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Verified locally with
./gradlew sanityCheckand./gradlew checkBinaryLicense.Does this pull request potentially affect one of the following parts: