Skip to main content
Welcome — this guide walks through the KodeKloud Record Store web app (a small demo) and shows how the core application and a full observability stack are wired together for local development and experimentation. The repository is available on GitHub: jakepage91/kodekloud-records-store-web-app. Fork and experiment — the app is intentionally simple so you can apply observability and distributed-systems concepts to your own projects. This article summarizes:
  • the repository layout,
  • architecture and request/data flow,
  • how to run the stack locally (application + observability),
  • quick verification and troubleshooting commands,
  • useful endpoints and scripts for generating telemetry.
Architecture overview The project is split into two logical groups:
  • Core application: FastAPI web service + Celery worker for background tasks, backed by PostgreSQL and RabbitMQ.
  • Observability stack: Prometheus, Pushgateway, Alertmanager, Grafana, Loki, Fluent Bit, Jaeger, and supporting exporters/collectors.
Textually, the system is a set of services connected on a Docker network. The FastAPI API (port 8000) interacts with PostgreSQL (5432) and RabbitMQ (5672, management 15672); Prometheus (9090) scrapes metrics and can receive pushed metrics via Pushgateway (9091); Grafana (3000) reads dashboards from Prometheus and Loki; Jaeger exposes tracing (UI 16686 and OTLP/collector ports such as 14268, 4317/4318); Fluent Bit/Loki handle log collection and storage. These services and ports are defined and wired in the compose file and the monitoring configuration.
A screenshot of a GitHub README showing a system architecture diagram for Prometheus metrics collection and storage. The diagram contains labeled boxes and arrows for services like Pushgateway, Prometheus, Alertmanager, Grafana, Loki, Jaeger, Fluent Bit, a Celery worker and PostgreSQL, each with port numbers.
Request / data flow Different endpoints exercise different parts of the stack:
  • GET /products — FastAPI → PostgreSQL. (Synchronous API + DB read.)
  • POST /checkout — FastAPI enqueues an order to RabbitMQ; Celery workers consume the queue, process payment/inventory asynchronously, and update the database. Telemetry (metrics, logs, traces) is emitted across these steps.
Typical end-to-end flow: Client → FastAPI → Database (query) → RabbitMQ (enqueue) → Celery worker (background processing) → Database (update) Telemetry is collected at each phase (Prometheus metrics, application logs forwarded by Fluent Bit to Loki, and traces exported to Jaeger/OpenTelemetry).
A screenshot of a GitHub README page showing a dark-themed sequence diagram titled "Request Flow" that maps interactions between Client, FastAPI app, Database, RabbitMQ, and a Celery worker (with steps like GET /products, POST /checkout and background tasks). The image shows the diagram inside a Chrome window on a macOS desktop.
Repository layout Top-level structure (core app + observability):
Get started (local development)
  1. Clone the repository and change into it:
  1. Generate a development .env with safe defaults:
Sample output from the setup script:
Example .env.dev values used by the compose file:
Do not commit real passwords or secrets to the repository. Keep sensitive values in CI/CD secrets or a secure secret store.
Docker Compose and services A single docker-compose.yaml composes the application and all observability services. The api service is built from the local Dockerfile and depends on db, rabbitmq, jaeger, fluent-bit, and others to be available. Example excerpts from the compose file (application and supporting services):
Observability services (Prometheus, Pushgateway, Grafana, Alertmanager, Loki, Fluent Bit, Jaeger and others) are defined in the same docker-compose.yaml and connected to the shared network. Example service entries and ports:
Quick reference — common service ports Ensure Docker is running locally Start your Docker daemon first (Docker Desktop on macOS/Windows, Docker Engine on Linux). Containers must bind to exposed ports when you run docker-compose.
Screenshot of Docker Desktop on macOS showing the Containers dashboard. Two containers (buildx_buildkit and minikube) are listed with CPU/memory stats and sidebar navigation (Images, Volumes, Builds).
Bring up the complete stack Run docker-compose with the generated .env.dev:
Basic verification Test API and telemetry endpoints:
Example Prometheus-style metrics exposed by the API:
Useful API endpoints and testing scripts Common endpoints for manual testing and generating telemetry:
Helper scripts in the repository:
Troubleshooting tips Common commands and checks:
The docker-compose down -v command will remove volumes and delete local state (databases, message queues). Back up any important data before running it.
If a container fails to start, check:
  • docker-compose logs <service> for the service-specific logs,
  • environment variables in deploy/environments/.env.dev (missing DB credentials or incorrect hostnames are common causes),
  • Prometheus config (config/monitoring/prometheus.yml) for scrape targets and job definitions.
Closing notes This repository is a playground for hands-on observability: metrics (Prometheus), tracing (Jaeger/OpenTelemetry), and centralized logging (Loki + Fluent Bit), plus dashboards (Grafana) and alerting (Alertmanager). Use the project to:
  • explore trace propagation and correlation across API + background workers,
  • prototype Prometheus metrics and alerts,
  • test log forwarding and query patterns in Loki,
  • learn how dashboards and alert rules map to SLOs/SLIs.
Links and references

Watch Video