public synchronized Metric add ( String name , String description , MeasurableStat stat , MetricConfig config ) { MetricConfig statConfig = ( config == null ? this . config : config ) ; TehutiMetric metric = new TehutiMetric ( this , Utils . notNull ( name ) , Utils . notNull ( description ) , Utils . notNull ( stat ) , statConfig , time ) ; this . registry . registerMetric ( metric ) ; this . metrics . add ( metric ) ; this . stats . add ( stat ) ; this . statConfigs . put ( stat , statConfig ) ; return metric ; }
Register a metric with this sensor