private void handleGetAllMMetricsName ( final HttpServletRequest req , final Map < String , Object > ret ) { if ( MetricReportManager . isAvailable ( ) ) { final MetricReportManager metricManager = MetricReportManager . getInstance ( ) ; final List < IMetric < ? > > result = metricManager . getAllMetrics ( ) ; if ( result . size ( ) == 0 ) { ret . put ( RESPONSE_ERROR , "No Metric being tracked" ) ; } else { final List < String > metricNames = new LinkedList <> ( ) ; for ( final IMetric < ? > metric : result ) { metricNames . add ( metric . getName ( ) ) ; } ret . put ( "data" , metricNames ) ; } } else { ret . put ( RESPONSE_ERROR , "MetricReportManager is not available" ) ; } }
Get all the metrics tracked by metric manager