OpenTelemetry Observability Home Lab
low
container ready
local lab
make validate
Use the guide first.
The full learning guide is on this page. Open the repository files only when a step asks you to inspect code, fork the project, or download raw assets.
Project Guide
Section titled “Project Guide”
Docker Compose lab for learning traces, metrics, and logs with a small Python app, OpenTelemetry Collector, and Grafana LGTM components.
What You Learn
Section titled “What You Learn”- How an app emits telemetry
- What the OpenTelemetry Collector does
- How traces, logs, and metrics fit together
- How to run a local observability stack without cloud cost
Architecture
Section titled “Architecture”flowchart LR Browser["Browser or curl"] --> App["Python demo app"] App --> Collector["OpenTelemetry Collector"] Collector --> Prometheus["Prometheus metrics"] Collector --> Tempo["Tempo traces"] Prometheus --> Grafana["Grafana dashboards"] Tempo --> GrafanaPrerequisites
Section titled “Prerequisites”- Docker
- Docker Compose plugin
One-Command Local Workflow
Section titled “One-Command Local Workflow”make validatemake upmake logsmake downOpen:
- App:
http://localhost:8080 - Grafana:
http://localhost:3000withadmin/admin - Prometheus:
http://localhost:9090
Generate traffic:
curl http://localhost:8080/curl http://localhost:8080/slowcurl http://localhost:8080/errorValidation
Section titled “Validation”make validateThis runs docker compose config so students catch indentation, service, port, and volume mistakes before starting the stack.
Troubleshooting
Section titled “Troubleshooting”- Port conflict on
3000,8080, or9090: stop the other local service or edit the left side of the port mapping indocker-compose.yml. - Grafana has no data: run the
curlcommands above, then refresh Explore or dashboards. - Collector cannot start: check
otel-collector.yamlwithmake logsand confirm the mounted file path exists. - Images take time on first run: the first
make uppulls Grafana, Tempo, Prometheus, and Collector images.
Cleanup
Section titled “Cleanup”make downThis stops the containers and removes lab volumes so the next run starts clean.
Student Exercises
Section titled “Student Exercises”- Add a new endpoint and create a custom span.
- Add a dashboard panel for request count.
- Change the collector pipeline to drop noisy logs.
- Add an alert for repeated
/errorcalls.