static String insertTagIntoCategoty(String tag, String metricName) {
    int pos = metricName.lastIndexOf('.');
    return metricName.substring(0, pos) + ",tag=" + tag + metricName.substring(pos);
  }
Returns tag inserted metric name after the prefix.
@param tag E.g.: client
@param metricName : rpc.rpc.CallQueueLength Or metrics/rpc/CallQueueLen
@param prefix : rpc.rpc
@return rpc.rpc.client.CallQueueLength Or metrics/rpc/client/CallQueueLen
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PropertyHelper.java