class ConduitMetrics {

  synchronized public static Counter registerCounter(String serviceName,
      String counterType, String context) {
    if(!isEnabled){
      LOG.warn("metrics not enabled");
      return null;
    }
    if (registry.getCounters().get(createName(serviceName , counterType , context)) != null) {
      LOG.warn("Counter with name " + createName(serviceName , counterType ,
           context )+ " already exsits");
      return null;
    }
    Counter counterInst = registry.counter(createName(serviceName , counterType ,
         context));
    addToCache(serviceName, counterType, context, counterInst);
    return counterInst;
  }

}