In this article, we will start constructing our reference implementation. We will implement our first service and set up the applications distributed logging and monitoring infrastructure. We begin by building the ConfigurationService, which externalizes and centralizes the application's configuration. While building the service, we introduce Spring Actuator, Micrometer, and Prometheus to capture and store the service's metrics and Grafana to render the application's metrics. Distributed logging is handled using a combination of Fluentd, Elasticsearch, and Kibana to capture, index, and query log data. Finally, we orchestrate our service and its supporting infrastructure with Docker-Compose.
In this article, we begin applying what we have learned from previous articles to create a Reference Architecture. The Reference Architecture outlines the infrastructure and services needed to construct the common foundations of a microservice application.
In a monolithic application executing in a single process, it is a relatively trivial exercise to troubleshoot the application from its log files. But how do you troubleshoot a distributed application that may have hundreds of log files? In this article, we introduce distributed logging to a microservice application.