Skip to content

OpenTelemetry Observability Home Lab

Level:Intermediate
Time:2-3 hours
Cost:low
Works locally:Yes
Cloud creds:No
Cleanup:Yes
Reviewed:2026-05-30
Validation:make validate

Local observability lab for traces, metrics, and logs using Docker Compose.

Outcome Running container/app screenshot plus logs
Tools used Python, Flask, OpenTelemetry, Grafana, Prometheus, Tempo, Docker Compose
Best fit Intermediate - 2-3 hours
Student workstation Repository files Lab steps Local containers Validation proof
  • 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.
Cost and credential stance

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.

Use this flow before you run commands:

  1. Read the cost and credential warning above.
  2. Review the validation, troubleshooting, cleanup, and portfolio proof sections below.
  3. Follow the original project guide preserved near the bottom of this page.
  4. Return to the validation and cleanup checks before you capture portfolio evidence.

Run the project validation command before and after meaningful changes:

Terminal window
make validate
  • Run make validate first so local tooling issues are visible early.
  • If a command fails, check tool versions, working directory, and required environment variables.

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.

  • 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

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.

External image reference Level
External image reference Cost
External image reference Runtime
External image reference Stack

Docker Compose lab for learning traces, metrics, and logs with a small Python app, OpenTelemetry Collector, and Grafana LGTM components.

  • 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
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 --> Grafana
  • Docker
  • Docker Compose plugin
Terminal window
make validate
make up
make logs
make down

Open:

  • App: http://localhost:8080
  • Grafana: http://localhost:3000 with admin / admin
  • Prometheus: http://localhost:9090

Generate traffic:

Terminal window
curl http://localhost:8080/
curl http://localhost:8080/slow
curl http://localhost:8080/error
Terminal window
make validate

This runs docker compose config so students catch indentation, service, port, and volume mistakes before starting the stack.

  • Port conflict on 3000, 8080, or 9090: stop the other local service or edit the left side of the port mapping in docker-compose.yml.
  • Grafana has no data: run the curl commands above, then refresh Explore or dashboards.
  • Collector cannot start: check otel-collector.yaml with make logs and confirm the mounted file path exists.
  • Images take time on first run: the first make up pulls Grafana, Tempo, Prometheus, and Collector images.
Terminal window
make down

This stops the containers and removes lab volumes so the next run starts clean.

  • 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 /error calls.
Use the guide first.

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.