public Map<String, Object> getAsMap() {
    Map<String, Object> map = new HashMap<>();
    map.put(JOB_NAME, jobName);
    map.put(JOB_ID, jobId);
    map.put(CONTAINER_NAME, containerName);
    map.put(EXEC_ENV_CONTAINER_ID, execEnvironmentContainerId);
    this.samzaEpochId.ifPresent(epochId -> map.put(SAMZA_EPOCH_ID, epochId));
    map.put(SOURCE, source);
    map.put(VERSION, version);
    map.put(SAMZA_VERSION, samzaVersion);
    map.put(HOST, host);
    map.put(TIME, time);
    map.put(RESET_TIME, resetTime);
    return map;
  }
This is optional for backwards compatibility. It was added added after the initial version of this class.
samza-core/src/main/java/org/apache/samza/metrics/reporter/MetricsHeader.java