zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eolivelli <...@git.apache.org>
Subject [GitHub] zookeeper pull request #601: WIP - ZOOKEEPER-3123 MetricsProvider Lifecycle ...
Date Mon, 27 Aug 2018 14:04:43 GMT
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.



---

Mime
View raw message