public void close ( ) throws IOException { if ( isClosed ) { throw new IOException ( "Telemetry connector is closed" ) ; } try { this . sendBatch ( ) ; } catch ( IOException e ) { logger . error ( "Send logs failed on closing" , e ) ; } finally { this . isClosed = true ; } }
Close telemetry connector and send any unsubmitted logs