code: private void validate() {
          List<String> missingElements = new LinkedList<>();
          if (host == null) {
              missingElements.add("host");
          }
  
          if (protocol != null
              && !protocol.equalsIgnoreCase("noop")
              && !protocol.equalsIgnoreCase("out")) {
  
              if (publicKey == null) {
                  missingElements.add("public key");
              }
              if (projectId == null || projectId.isEmpty()) {
                  missingElements.add("project ID");
              }
          }
  
          if (!missingElements.isEmpty()) {
              throw new InvalidDsnException("Invalid DSN, the following properties aren't set '" + missingElements + "'");
          }
      }
docs: Validates internally the DSN, and check for mandatory elements.
  <p>
  Mandatory elements are the {@link #host}, {@link #publicKey} and {@link #projectId}.