songxiaosheng commented on PR #2238: URL: https://github.com/apache/zookeeper/pull/2238#issuecomment-2750008872
> Hello @songxiaosheng . Thank you for the patch, but I'm not sure we'll be able to commit this. > > In #925 , we intentionally slimmed down pom.xml so that clients do not import dependencies that are only needed on the server side. Part of this included marking io.dropwizard.metrics:metrics-core as provided. This is only used on the ZooKeeper server side. If we commit this change, it's possible that actual failures in metrics initialization could leave a server running in production but not producing metrics. > > From the sample stack trace, it looks like this is a use case for running ZooKeeper "embedded" as part of a demo application. In Apache Curator's tests, they handle this by explicitly adding their own dependency on io.dropwizard.metrics:metrics-core. Perhaps your demo application could do the same thing. > > https://github.com/apache/curator/blob/apache-curator-5.8.0/curator-test/pom.xml#L45-L48 > > On a side note, you might also be interested in [`ZooKeeperServerEmbedded`](https://zookeeper.apache.org/doc/r3.9.3/apidocs/zookeeper-server/org/apache/zookeeper/server/embedded/ZooKeeperServerEmbedded.html). thanks, i found it in ZooKeeper "embedded" -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org