private ResponseEntity < String > executeRequest ( final TelemetryEventData eventData ) { final HttpHeaders headers = new HttpHeaders ( ) ; headers . add ( HttpHeaders . CONTENT_TYPE , APPLICATION_JSON . toString ( ) ) ; try { final RestTemplate restTemplate = new RestTemplate ( ) ; final HttpEntity < String > body = new HttpEntity <> ( MAPPER . writeValueAsString ( eventData ) , headers ) ; return restTemplate . exchange ( TELEMETRY_TARGET_URL , HttpMethod . POST , body , String . class ) ; } catch ( JsonProcessingException | HttpClientErrorException ignore ) { log . warn ( "Failed to exchange telemetry request, {}." , ignore . getMessage ( ) ) ; } return null ; }
Align the retry times with sdk