You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "David Smiley (Jira)" <ji...@apache.org> on 2026/06/04 04:51:00 UTC

[jira] [Commented] (ZOOKEEPER-4324) Hard dependency on io.dropwizard.metrics:metrics-core cannot be avoided

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-4324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18085979#comment-18085979 ] 

David Smiley commented on ZOOKEEPER-4324:
-----------------------------------------

See PR [https://github.com/apache/zookeeper/pull/2402] – linked

> Hard dependency on io.dropwizard.metrics:metrics-core cannot be avoided
> -----------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-4324
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4324
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: metric system
>    Affects Versions: 3.6.3
>            Reporter: Ron Dagostino
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The metrics subsystem has a hard dependency on io.dropwizard.metrics:metrics-core that cannot be avoided because of this code:
> public final class ServerMetrics {
>     /**
>      * Dummy instance useful for tests.
>      */
>     public static final ServerMetrics DEFAULT_METRICS_FOR_TESTS = new ServerMetrics(new DefaultMetricsProvider());
> Even if the config metricsProvider.className=org.apache.zookeeper.metrics.impl.NullMetricsProvider is set the above code will still execute and create the dependency.
> It would be best to make the dependency optional by removing the above code.
> Another option is to change the dependency scope from the current value of "provided" to be "compile" instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)