How to Expose Meaningful Prometheus Metrics In a Spring Boot 2.x Application
The source code for this post can be found on Github.
Prometheus is a metrics aggregator with its own presumed format. The basic idea is to have the application gather a set of custom metrics, then periodically collect (or “scrape”) the metrics and send them off to a prometheus server. This server will store the data in its database, and you can thus view the evolution of your application’s metrics over time.