Viewing the Monitoring Data
Learn to set up a monitoring environment with integrating services for efficient trace, span, and metrics collection and visualization.
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.
Updating Docker Compose with monitoring services
The Docker Compose environment was updated with four new services, as follows:
The OpenTelemetry collector to 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:
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. For the Shopping Baskets microservice, we must add the following ...