code: private boolean emitAsKey(String field) {
      return emitValueAsKey
          && (field.equals(TaskEvent.METADATA_TASK_WORKING_STATE) || field.equals(JobEvent.METADATA_JOB_STATE));
    }
docs: Non-numeric event values may be emitted as part of the key by applying them to the end of the key if
  {@link ConfigurationKeys#METRICS_REPORTING_GRAPHITE_EVENTS_VALUE_AS_KEY} is set. Thus such events can be still
  reported even when the backend doesn't accept text values through Graphite
  
  @param field name of the metric's metadata fields
  @return true if event value is emitted in the key