In the last post we have discussed a bit how to use Dropwizard’s metrics, a great library that helps adding metrics to a Java application. In this post, we’ll see a very simple example project with a couple of metrics in it, and then we’ll expose those via JMX and monitor them via VisualVM. The code The code for this post is available on GitHub at https://github.com/andreabergia/metrics-jmx. Let’s see the simple Main class: