def validate_type(type)
      unless %i{gauge counter histogram summary}.include?(type)
        raise ArgumentError, "type must be one of :gauge, :counter, :histogram, or :summary (got #{type.inspect})"
      end
    end
def validate_type(type)
      unless %i{gauge counter histogram summary}.include?(type)
        raise ArgumentError, "type must be one of :gauge, :counter, :histogram, or :summary (got #{type.inspect})"
      end
    end
Make sure that the type we were passed is one Prometheus is known to accept.