This is the companion Github repo of the following medium article that I wrote on implementing custom metrics in Spring Boot including examples of some advanced techniques such as Aspect Oriented Programming (AOP), scraping the app's metrics using Prometheus and visualizing them using Grafana to create insightful dashboards.
sudo docker-compose up --build -d
-
Use this curl to create orders
curl --request POST \ --url http://localhost:8080/orders \ --header 'Content-Type: application/json' \ --data '{ "itemName": "item1" }' -
Access Grafana at
http://localhost:3000and when you configure Prometheus data source in Grafana usehttp://my-prometheus:9090