
Example: API Metrics with Prometheus and Grafana
This post is a follow-up to the previous posts on designing metrics for event-driven systems. This humble post is a practical example of how to implement the metrics API and how to use it to create a dashboard in Grafana. I’m not using Kubernetes but Docker Compose; the concepts are the same. The reason is simplicity. The code is available on this GitHub repository. The Scenario The setup comprises two API services(app and beta) and a database(postgres). Liquibase creates the database schema. API services are two instances of the same service. They connect to the same database. ...