How watlas/spring-advanced-observability-demo works
Main Components
• Microservices:
• Order Service – handles order-related API endpoints and logic.
• Product Service – includes Kafka configuration and listens to product events.
• User Service – handles user-related operations.
• Observability & Monitoring Components:
• Logging Infrastructure: Elasticsearch, Logstash, Kibana, Filebeat, and Fleet.
• Metrics and Monitoring: Prometheus, Metricbeat, Heartbeat, Grafana.
• Tracing Systems: Jaeger, Zipkin, OpenTelemetry Collector.
• Additional Graphing / Log Aggregation: Loki and Tempo.
• Supporting Components:
• Docker Compose orchestrator: Under the docker directory, containing multi-container setups for all the systems.
• Database / Data Sources: MongoDB (with Mongo Express) and possibly PostgreSQL (as hinted by the badges). Although the services use Spring Boot, check if they are interacting with a specific database.
• External Dependencies: Kafka and Zookeeper for messaging patterns.
Relationships and Interactions
• The three Spring Boot microservices interact through REST APIs and, in the case of the product-service, likely communicate via Kafka.
• Each service outputs logs, metrics, and traces that are collected by the observability stack. They feed data to the ELK stack for logging, Prometheus for metrics, and distributed tracing tools (Jaeger/Zipkin/OpenTelemetry Collector) for tracing.
• Docker Compose is used to tie together these components, so illustrate the orchestration layer that manages both the microservices and the various observability tools.
• The data flow should indicate that the microservices push monitoring data (logs, metrics, traces) to the respective backend (e.g., Filebeat shipping to Logstash/Elasticsearch, metrics to Prometheus, traces to Jaeger/Zipkin).
Architectural Patterns and Design Principles
• Microservices pattern: Each core service (order, product, user) is packaged separately with its own Dockerfile and Maven build configuration, following the separation of concerns.
• Observability as a first-class citizen: Integration of multiple observability tools denotes an architecture that emphasizes advanced monitoring, tracing, and logging.
• Containerization and orchestration: Docker Compose is used to manage the stack, indicating a containerized ecosystem.
• Event-driven architecture: The Kafka integration in product-service suggests that some communications might be asynchronous/event-driven.
Relevant Technologies
• Programming framework: Spring Boot (Java) with Maven as the build tool.
• Containerization: Docker and Docker Compose.
• Observability stack: Elasticsearch, Logstash, Kibana, Filebeat, Fleet for logging; Prometheus, Metricbeat, Heartbeat for metrics; Jaeger, Zipkin, OpenTelemetry Collector for tracing; Grafana for dashboards; Loki and Tempo for additional log and trace analytics.
• Messaging: Apache Kafka (supported by Zookeeper).
• Use clear, descriptive labels for every component. For example, label “Order Service (Spring Boot)” and “Kafka Broker” rather than generic names.
• From the Services to the Logging systems.
• From the Services to the Metrics and Tracing infrastructure.
• Between services if there is inter-service communication.