@Override
        public void run() {
          try {
            LOG.debug("Publishing JVM metrics to sink");
            sink.publish(getMetrics());
          } catch (Exception e) {
            LOG.debug("Error in publishing JVM metrics to sink.");
          }
        }
@{link JvmMetricsSource} collects JVM Metrics using codahale and publish to Metrics Sink.
ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/JvmMetricsSource.java