public void getMetrics(MetricsParser.Collector consumer, int fetchCount) {
        try (CloseableHttpResponse response = getResponse()) {
            HttpEntity entity = response.getEntity();
            try {
                MetricsParser.parse(new BufferedInputStream(entity.getContent(), HttpMetricFetcher.BUFFER_SIZE), consumer);
            } catch (Exception e) {
                handleException(e, entity.getContentType(), fetchCount);
            } finally {
                EntityUtils.consumeQuietly(entity);
            }
        } catch (IOException ignored) {}
    }
Connect to remote service over http and fetch metrics
metrics-proxy/src/main/java/ai/vespa/metricsproxy/service/RemoteMetricsFetcher.java