class HttpObserver implements MetricObserver<LookoutMeasurement> {

    void reportSnappy2Agent(Address agentAddress, String msg, Map<String, String> metadata) {
        HttpPost httpPost = new HttpPost(buildRealAgentServerURL(agentAddress));
        httpPost.setHeader(HttpHeaders.CONTENT_TYPE, APPLICATION_OCTET_STREAM);
        httpPost.setHeader(HttpHeaders.CONTENT_ENCODING, SNAPPY);
        byte[] compressed = new byte[0];
        try {
            compressed = Snappy.compress(msg, Charset.forName(UTF_8));
        } catch (IOException e) {
            logger.info(">>WARNING: snappy compress report msg err:{}", e.getMessage());
            return;
        }
        httpPost.setEntity(new ByteArrayEntity(compressed));
        sendHttpDataSilently(httpPost, metadata);
    }

    public  HttpObserver(LookoutConfig lookoutConfig, AddressService addrService);
    public  HttpObserver(LookoutConfig lookoutConfig, AddressService addrService, Registry registry);
    public  HttpObserver(LookoutConfig lookoutConfig, AddressService addrService, Registry registry,
                        HttpRequestProcessor requestProcessor);

}