@Override
  public void stop() {
    // Scheduling an event with 0 delay to ensure flushing of metrics one last time before shutdown
    this.executor.schedule(this, 0, TimeUnit.SECONDS);
    LOG.info("Stopping reporter timer.");
    // Allow the scheduled task above to finish, and block for termination (for max 60 seconds)
    this.executor.shutdown();
    try {
      this.executor.awaitTermination(60, TimeUnit.SECONDS);
    } catch (InterruptedException e) {
      throw new SamzaException(e);
    }
    LOG.info("Stopping producer.");
    this.producer.stop();
    if (!this.executor.isTerminated()) {
      LOG.warn("Unable to shutdown reporter timer.");
    }
  }
MetricsSnapshotReporter is a generic metrics reporter that sends metrics to a stream.

jobName // my-samza-job
jobId // an id that differentiates multiple executions of the same job
taskName // container_567890
host // eat1-app128.gird
version // 0.0.1
blacklist // Regex of metrics to ignore when flushing
samza-core/src/main/java/org/apache/samza/metrics/reporter/MetricsSnapshotReporter.java