Skip to content

ZOOKEEPER-4324: dropwizard-metrics should be optional#2402

Open
dsmiley wants to merge 3 commits into
apache:masterfrom
dsmiley:ZK-4324-dropWizardDepOpt2
Open

ZOOKEEPER-4324: dropwizard-metrics should be optional#2402
dsmiley wants to merge 3 commits into
apache:masterfrom
dsmiley:ZK-4324-dropWizardDepOpt2

Conversation

@dsmiley

@dsmiley dsmiley commented Jun 4, 2026

Copy link
Copy Markdown

See https://issues.apache.org/jira/browse/ZOOKEEPER-4324

I verified this change in Solr -- I was able to start Solr in SolrCloud mode with the following setting in its zoo.cfg: metricsProvider.className=org.apache.zookeeper.metrics.impl.NullMetricsProvider

Ideally I'd add an "ArchUnit" test as well, as I did in #2374

@maoling maoling left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR fixes an issue where external projects (e.g. Solr) could still encounter ClassNotFoundException or build failures even after excluding Dropwizard and configuring metricsProvider.className=org.apache.zookeeper.metrics.impl.NullMetricsProvider.

I tested this change with PrometheusMetricsProvider, DefaultMetricsProvider, and NullMetricsProvider, and all three configurations work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants