public static Counter counter ( Metrics metrics , String component , String methodName ) { if ( metrics != null ) { return metrics . getCounter ( component , methodName ) ; } else { return null ; } }
if metrics is not null returns a Counter instance for a given component and method name .