Modified to read data from MetricsRegistry rather than JMX