private static synchronized void startup ( ) { try { if ( CONFIG == null ) { CONFIG = ApiConfigurations . fromProperties ( ) ; } ObjectMapper objectMapper = new ObjectMapper ( ) ; AppIdentityService appIdentityService = new AppIdentityService ( CONFIG , objectMapper , true ) ; MetricMonitorService monitorService = new MetricMonitorService ( CONFIG , objectMapper , appIdentityService ) ; MetricSender sender = new MetricSender ( CONFIG , objectMapper , monitorService ) ; BACKGROUND_SERVICE = new MetricBackgroundService ( COLLECTOR , sender ) ; BACKGROUND_SERVICE . start ( ) ; } catch ( Throwable t ) { LOGGER . error ( "Exception starting Stackify Metrics API service" , t ) ; } }
Start up the background thread that is processing metrics