Class MetricUtils

    • Method Detail

      • addMetrics

        public static void addMetrics(NamedList<Object> lst,
                                      Timer timer)
        Adds metrics from a Timer to a NamedList, using well-known back-compat names.
        lst - The NamedList to add the metrics data to
        timer - The Timer to extract the metrics from
      • toNamedList

        public static NamedList toNamedList(MetricRegistry registry,
                                            List<MetricFilter> shouldMatchFilters,
                                            MetricFilter mustMatchFilter)
        Returns a NamedList representation of the given metric registry. Only those metrics are converted to NamedList which match at least one of the given MetricFilter instances.
        registry - the MetricRegistry to be converted to NamedList
        shouldMatchFilters - a list of MetricFilter instances. A metric must match any one of the filters from this list to be included in the output
        mustMatchFilter - a MetricFilter. A metric must match this filter to be included in the output.
        a NamedList