How salahbdg/logging-tracing-monitoring-observability works
Project Type and Purpose
• This is a full‐stack, microservice‐oriented web application for “doodle,” with an Angular frontend and a Quarkus‐based backend.
• Its primary purpose is to demonstrate end‐to‐end observability: logging, metrics, and tracing using Grafana, Prometheus, Loki, Promtail, and Jaeger.
File Structure
• Top-level directories:
• front/ contains an Angular single-page application (src/app, assets, environments, etc.).
• api/ houses a Quarkus service (Maven project, Dockerfiles, Docker Compose, domain, DAO, resources, services).
• Observability configuration files (prometheus.yml, promtail-config.yaml, grafana-dashboard.json).
• The backend follows a layered pattern: domain → DAO (ChoiceRepository, PollRepository, …) → DTOs → resources (REST endpoints) → services (email, utils).
Extract Key Notes from the README
• Frontend runs via npm start (Angular dev server) or served statically from Quarkus (index.html under META-INF/resources).
• Backend runs via ./mvnw quarkus:dev or Docker Compose.
• Observability services launched alongside the API: Prometheus, Grafana, Jaeger, Loki, Promtail.
Main Components & Relationships
a. User Interface
– Component: Angular App (Browser)
– Communication: HTTP(S) calls to Quarkus REST API
b. Core Backend
– Component: Quarkus API Service
– Data store: MySQL (JDBC)
– External services:
• Etherpad Service (REST) – for ICS generation features
• SMTP Mail Service – for sending poll invitations
c. Observability Layer
– Metrics:
• Quarkus exposes /q/metrics (SmallRye Metrics)
• Prometheus scrapes metrics (port 9090)
– Tracing:
• Quarkus with quarkus-smallrye-opentracing sends spans to Jaeger
• Jaeger all-in-one UI (port 16686) collects and displays traces
– Logging:
• Quarkus logs are picked up by Promtail
• Promtail forwards logs to Loki (port 3100)
– Visualization: Grafana reads from Prometheus, Loki, and Jaeger, displaying dashboards (port 3000)
Architectural Patterns & Design Principles
• Layered architecture in the backend (DAO → domain → service → resource).
• Externalize cross-cutting concerns (metrics, logs, traces) into a dedicated “Observability” micro-layer.
• Infrastructure as code: Docker Compose orchestrates API and observability services in a single network.