What is Semantic Monitoring in Microservices
In this tutorial, we are going to learn about Semantic Monitoring in Microservices.
- Monitoring microservices is crucial because the entire system is broken down to the small, independent applications called microservices, and we have to make sure all those microservices work as expected so that the entire system also work.
- So to make sure that we have a good view and observability on the entire system.
There are two ways of monitoring the system.
Service layer monitoring: Achieved via Health Endpoints (/health), Telemetry(i.e. Prometheus & Grafana) etc.
- For example, API servers may have a health endpoint, i.e., /health. Go to /health in your browser.
- If you receive HTTP 200 response, that means that API is working as expected if you receive anything
- else, If you receive HTTP 500 Internal Server Error means that the API is not working.
- Another way of doing the service layer monitoring is using telemetry, also known as collecting time series data, which can be achieved via systems such as Prometheus, which is a time series database and Grafana, which is a visualization tool.
- So when we say time series data, it means that a timestamp is attached to it.
Semantic monitoring: Semantic monitoring is basically approaching the problem from this perspective i.e., if entire system working as expected, not just one given microservice Is a business transaction working as expected.
- For example, if I am a user or go to a website without knowing that what is behind this website, how many microservices are working together. If I go and place an order? Does my order go through and is it fast enough?
- All that is called semantic monitoring and this is achieved via functional testing.