Skip to content

[improve][monitor] Upgrade Dropwizard Metrics to 4.2.39 and HdrHistogram to 2.2.2 - #26353

Merged
nodece merged 1 commit into
apache:masterfrom
lhotari:lh-improve-dropwizard-hdrhist
Aug 18, 2026
Merged

nodece merged 1 commit into
apache:masterfrom
lhotari:lh-improve-dropwizard-hdrhist

Conversation

@lhotari

@lhotari lhotari commented Aug 17, 2026

Copy link
Copy Markdown
Member

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

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

  • 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

…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)
@lhotari lhotari added this to the 5.0.0-M2 milestone Aug 17, 2026
@lhotari lhotari added the area/dependency Pull requests that update a dependency file label Aug 17, 2026
@nodece
nodece merged commit e332083 into apache:master Aug 18, 2026
89 of 94 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dependency Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants