Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-4324

Hard dependency on io.dropwizard.metrics:metrics-core cannot be avoided

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.6.3
    • None
    • metric system
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rndgstn Ron Dagostino
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: