def wf_source_id?(source)
      if source.is_a?(String) && source.match(/^[\w\.\-]+$/) &&
         source.size < 1024
        return true
      end

      raise Wavefront::Exception::InvalidSourceId
    end
def wf_source_id?(source)
      if source.is_a?(String) && source.match(/^[\w\.\-]+$/) &&
         source.size < 1024
        return true
      end

      raise Wavefront::Exception::InvalidSourceId
    end
Ensure the given argument is a valid Wavefront source name

 @param source [String] the source name to validate
 @return True if the source name is valid
 @raise Wavefront::Exception::InvalidSourceId if the source name
   is not valid