public static boolean metricsEnabled(){
  return System.getenv(STATSD_HOST_ENV) != null && System.getenv(STATSD_PORT_ENV) != null;
}

public static boolean metricsEnabled ( ) { return System . getenv ( STATSD_HOST_ENV ) != null && System . getenv ( STATSD_PORT_ENV ) != null ; }
tests if metrics collection is enabled .
