@Override
  public void start() {
    LOG.info("Starting stomp events source...");
    try {
      executor.scheduleWithFixedDelay(new Runnable() {
        @Override
        public void run() {
          List<SingleMetric> events = getEvents();
          sink.publish(events);
          LOG.debug("********* Published stomp events metrics to sink **********");
        }
      }, interval, interval, TimeUnit.SECONDS);
    } catch (Exception e) {
      LOG.info("Throwing exception when starting stomp events source", e);
    }
  }
Collects metrics about number of events by types and publishes to configured Metric Sink.
ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/StompEventsMetricsSource.java