Build a complete 7-service observability stack from scratch — OpenTelemetry Collector, Prometheus, Grafana, Loki, Tempo, Alertmanager, and a demo app — then debug a simulated production incident using metrics, logs, and traces together.
Create the project directory structure and review the architecture diagram showing how all 7 services connect. You will build an OpenTelemetry Collector at the center, receiving telemetry from a demo app and exporting to Prometheus (metrics), Loki (logs), and Tempo (traces), with Alertmanager for notifications and Grafana for visualization.
mkdir -p ~/observability-capstone/{app,otel,prometheus,grafana/{provisioning/datasources,provisioning/dashboards,provisioning/plugins,provisioning/notifiers,provisioning/alerting,dashboards},loki,tempo,alertmanager}cd ~/observability-capstone && find . -type d | sortcat << 'EOF'
=== ARCHITECTURE DIAGRAM ===
┌──────────────┐
│ Demo App │ (Node.js/Express)
│ :4000 │
└──────┬───────┘
│ OTLP (gRPC :4317)
v
┌──────────────────┐
│ OTel Collector │
│ :4317 / :4318 │
└──┬──────┬──────┬──┘
│ │ │
v v v
┌─────┐ ┌────┐ ┌─────┐
│Prom │ │Loki│ │Tempo│
│:9090│ │:3100│ │:3200│
└──┬──┘ └──┬─┘ └──┬──┘
│ │ │
v v v
┌─────────────────────┐
│ Grafana │
│ :3001 │
└─────────────────────┘
^
│
┌──────────────┐
│ Alertmanager │
│ :9093 │
└──────────────┘
EOFThe architecture follows the OpenTelemetry best practice: your app sends all telemetry to a single OTel Collector via OTLP (OpenTelemetry Protocol). The Collector then routes metrics to Prometheus, logs to Loki, and traces to Tempo. Grafana connects to all three backends for unified dashboards. Alertmanager receives firing alerts from Prometheus and handles notification routing.
You see the directory tree with folders for each service, and the architecture diagram showing how all 7 services connect via network ports.