public static String buildServiceName(AbstractInterfaceConfig config) {
        String consulServiceName = config.getParameter(ConsulConstants.CONSUL_SERVICE_NAME_KEY);
        if (consulServiceName != null) {
            return consulServiceName;
        }
        return config.getInterfaceId();
    }
Key can only contain A-Z a-z 0-9 _ and -.
@param key
@return
registry/registry-consul/src/main/java/com/alipay/sofa/rpc/registry/consul/ConsulUtils.java