OpenTelemetry Observability Home Lab
make validateOverview
Section titled “Overview”Local observability lab for traces, metrics, and logs using Docker Compose.
What You Will Build
Section titled “What You Will Build”Architecture Diagram
Section titled “Architecture Diagram”Prerequisites
Section titled “Prerequisites”- Install or review: Python, Flask, OpenTelemetry, Grafana, Prometheus, Tempo, Docker Compose.
- No cloud provider credentials are required by the project metadata.
- This project can be practiced locally before you publish portfolio evidence.
- Open the safety guide before running commands that create infrastructure.
Credentials And Cost Warning
Section titled “Credentials And Cost Warning”Cost risk is low. Cloud target: no cloud provider. Cloud credentials needed: No. Always use your own account, never commit secrets, and confirm cleanup before creating paid infrastructure.
Step-By-Step Lab
Section titled “Step-By-Step Lab”Use this flow before you run commands:
- Read the cost and credential warning above.
- Review the validation, troubleshooting, cleanup, and portfolio proof sections below.
- Follow the original project guide preserved near the bottom of this page.
- Return to the validation and cleanup checks before you capture portfolio evidence.
Validation Checks
Section titled “Validation Checks”Run the project validation command before and after meaningful changes:
make validateTroubleshooting
Section titled “Troubleshooting”- Run
make validatefirst so local tooling issues are visible early. - If a command fails, check tool versions, working directory, and required environment variables.
Cleanup
Section titled “Cleanup”Cleanup is available or expected for this lab. Use the cleanup or destroy steps in the guide below, then confirm that local clusters, containers, cloud resources, buckets, state files, and CI secrets are no longer active.
Portfolio Proof
Section titled “Portfolio Proof”- Validation command output:
make validate - Screenshot or terminal proof: Running container/app screenshot plus logs
- Notes explaining what changed, what failed, and how you fixed it
- Cleanup evidence, especially for cloud or Kubernetes resources
Original Project Guide
Section titled “Original Project Guide”The original README content is preserved here for lab-specific commands and context. Headings are intentionally demoted so the page outline stays focused on the standard lab flow.
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.
Source Files On GitHub
Section titled “Source Files On GitHub”The full learning flow stays on this page. Open GitHub only when a step asks you to inspect code, fork the lab, or download source assets.