package com.kalixia.ha.hub;

import dagger.ObjectGraph;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.inject.Inject;

public class Main {
    @Inject
    Hub hub;

    private static final Logger logger = LoggerFactory.getLogger(Main.class);

    public void start() throws InterruptedException {
        hub.start();
    }

    public static void main(String[] args) throws InterruptedException {
        logger.info("Starting Kha Hub...");

        ObjectGraph objectGraph = ObjectGraph.create(new HubModule());
        Main main = objectGraph.get(Main.class);
        main.start();
    }
}

@@ -22,16 +22,157 @@
 a.hub;%0A%0A
+import com.netflix.hystrix.contrib.yammermetricspublisher.HystrixYammerMetricsPublisher;%0Aimport com.netflix.hystrix.strategy.HystrixPlugins;%0A
 import d
@@ -598,24 +598,125 @@
  Hub...%22);%0A%0A
+        HystrixPlugins.getInstance().registerMetricsPublisher(new HystrixYammerMetricsPublisher());%0A%0A
         Obje

configure Hystrix to log stats via Metrics.