Example:
We have 2 microservices (A, B) and queue (Q).
A receives request from client, process this request and sends message to Q
B receives message from Q process this message and saving some stuff to database.
I want to measure time between these points (including time when message is waiting on queue):
There are any ready solution for collecting that metrics? (It would be nice if it was easily integrative with spring-boot)
The easy/fast way: just log the events you are interested in, and make the time difference.
The professional/right way: integrate a metric system with your spring-boot application. This requires some effort, but the benefits are much bigger.
Here are the steps: