docs: private String getLocalInstanceId(final String cloudProvider, final String metadataEndpoint, final Map<String,String> headers) {
  		String detectedInstanceId = null;
  		try {
  			final URL metadataUrl = new URL(metadataEndpoint);
  			URLConnection metadataConnection = metadataUrl.openConnection();
  			// add any additional headers passed in
  			if (headers != null) {
  				for (Map.Entry<String, String> header : headers.entrySet()) {
  					metadataConnection.setRequestProperty(header.getKey(), header.getValue());
  				}
  			}
  			BufferedReader in = new BufferedReader(new InputStreamReader(metadataConnection.getInputStream(), "UTF-8"));
  			String inputLine;
  			while ((inputLine = in.readLine()) != null) {
  				detectedInstanceId = inputLine;
  			}
  			in.close();
  		} catch (Exception e) {
  			logger.warn("unable to determine " + cloudProvider + " instance ID", e);
  		}
  		return detectedInstanceId;
  	}