private Counter initAndRegisterCounter ( String name ) { BasicCounter counter = new BasicCounter ( MonitorConfig . builder ( name ) . build ( ) ) ; DefaultMonitorRegistry . getInstance ( ) . register ( counter ) ; return counter ; }
Construct a new Counter register it and then return it .