Liberty metrics are provided in two ways. The Monitor 1.0 feature provides JMX MXBeans which can be monitored to gather metrics about Liberty components. As an alternative, the MicroProfile Metrics 1.1 feature provides a /metrics endpoint which can be monitored to gather Liberty component metrics. Choosing between monitor-1.0 and mpMetrics-1.1 can largely be done based on which technology (JMX or HTTP) your tools use to gather metrics.

The existing connection pool InUseTime and WaitTime metrics, available for Monitor 1.0, showed average values calculated based on all samples since the time the metrics were created. Over time that meant these metrics would plateau to an average value and stop changing. That isn’t useful if you want to know what the average wait time was for getting connections over the last 15 minutes. The new metrics track the total amount of use/wait time (since the metric was created) and the total count of requests (since the metric was created) separately. These new metrics will work particularly well with tools like Prometheus which can show the rate of change of one metric divided by rate of change of another. With these new metrics Prometheus could show you what the use/wait time average was over the last 5 minutes, or yesterday between 2pm and 4pm.