code: public static boolean isEnabled(State state) {
      return Boolean
          .valueOf(state.getProp(ConfigurationKeys.METRICS_ENABLED_KEY, ConfigurationKeys.DEFAULT_METRICS_ENABLED));
    }
docs: Check whether metrics collection and reporting are enabled or not.
  
  @param state a {@link State} object containing configuration properties
  @return whether metrics collection and reporting are enabled