Github user eolivelli commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/601#discussion_r212986954
--- Diff:
src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerMain.java ---
@@ -141,6 +145,16 @@ public void runFromConfig(QuorumPeerConfig config)
LOG.info("Starting quorum peer");
try {
+ MetricsProvider metricsProvider;
+ try {
+ metricsProvider = MetricsProviderBootstrap
+
.startMetricsProvider(config.metricsProviderClassName, new Properties());
+ } catch (MetricsProviderLifeCycleException error) {
+ LOG.error("Cannot boot MetricsProvider {}",
config.metricsProviderClassName, error);
+ throw new IOException("Cannot boot MetricsProvider " +
config.metricsProviderClassName,
--- End diff --
Services like Prometheus Client will open an http endpoint (in our specific
case I think we will leverage existing admin server, but anyway the
registration in the servlet container may fail), or some other service will try
to bind to JMX, so it is possible that something goes wrong during start.
You cannot start a server without metrics, otherwise monitoring system
won't have control of what is going on.
---