To really get operational, we need metrics. Most production systems have metrics in one form or another. Thankfully, we don't have to start from scratch. There is a metric endpoint in Spring Boot Actuator. If we add this following setting to application.properties:
endpoints.metrics.enabled=true
With this property setting, if we restart the application, we can get a quick read out on thing.
Assuming we have JSON Viewer installed, it's easy to surf to http://localhost:9000/application/metrics and get a listing on all sorts of metrics. We even have counters for every good/bad web hit, broken down on a per-page basis, as shown here:
We can visit any one of these metrics by appending it's name to the metrics URL. For example, to view the http.server.requests, visit http://localhost:9000/application/metrics/http.server.requests:
If you have used Spring Boot 1.x, then this may look very different. That's because a newer, more sophisticated version of metrics has arrived-- Micrometer. It's currently in development, and may change quite a bit, so stay tuned at http://micrometer.io/, and be sure to follow @micrometerio on Twitter, as the ability to craft highly detailed and advanced metrics comes to Spring Boot.