public void addMultipleCounterDataPoints ( String tenantId , List < MetricLongBean > data ) { try { URL endpoint = serverUrl . toURI ( ) . resolve ( "counters/raw" ) . toURL ( ) ; //$NON-NLS-1$ Request request = new Request . Builder ( ) . url ( endpoint ) . post ( toBody ( data ) ) . header ( "Hawkular-Tenant" , tenantId ) //$NON-NLS-1$ . build ( ) ; Response response = httpClient . newCall ( request ) . execute ( ) ; if ( response . code ( ) >= 400 ) { throw hawkularMetricsError ( response ) ; } } catch ( URISyntaxException | IOException e ) { throw new RuntimeException ( e ) ; } }
Adds one or more data points for multiple counters all at once!