@Override
  public void publish(List<SingleMetric> metrics) {

    //If Sink not yet initialized, drop the metrics on the floor.
    if (isInitialized) {
      List<TimelineMetric> metricList = getFilteredMetricList(metrics);
      if (!metricList.isEmpty()) {
        TimelineMetrics timelineMetrics = new TimelineMetrics();
        timelineMetrics.setMetrics(metricList);
        emitMetrics(timelineMetrics);
      }
    } else {
      LOG.debug("Metric Sink not yet initialized. Discarding metrics.");
    }
  }
Publish metrics to AMS.
@param metrics Set of metrics
ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariMetricSinkImpl.java