Viewing the monitoring data
The application will now be producing a lot of data; to view this data, we need to collect it or, in the case of Prometheus, retrieve it.
The Docker Compose environment was updated with four new services, as follows:
- The OpenTelemetry collector, which will collect trace and span data
- Jaeger to render the traces
- Prometheus to collect and display metrics data
- Grafana to render dashboards based on the metrics data
The OpenTelemetry collector will also provide Prometheus metrics about the traces and spans it collects:
Figure 12.5 – The additional monitoring services
We have already configured the modules to connect with the collector so that is ready to go. For Prometheus, we still need to configure it to retrieve the metrics from each microservice. The configuration file, /docker/prometheus/prometheus-config.yml
, will need to be updated so that it contains a job for each microservice we want to scrape...