public boolean register ( String threadName ) { if ( threadToGaugeMap . containsKey ( threadName ) ) { return false ; } ThreadHealthReportGauge threadHealthReportGauge = new ThreadHealthReportGauge ( ) ; MetricsConfigurator . createGauge ( metrics , getHealthGaugeName ( threadName ) , threadHealthReportGauge , name , rev ) ; threadToGaugeMap . put ( threadName , threadHealthReportGauge ) ; return true ; }
Creates and registers a Gauge with the given thread name . The same name must be used to report health .