The Open-Source Observability Stack: A Beginner's Map
On your first day in a new team, someone says: "If checkout is slow, open Grafana, find a slow trace in Jaeger, then read the errors in Kibana." Add Prometheus, Logstash and Pyroscope, and it is hard to tell which tool does what. This lesson is a map of the open-source observability stack you build in this course: what each tool does, how the tools connect, and what your laptop needs.
Four signals, and the tool for each
An observability stack is the set of tools that collect, store and show telemetry, the data a running system reports about itself. As the Four Signals lesson of Monitoring Fundamentals explained, telemetry comes in four kinds. Each has its own open-source tool here:
- Metrics: Prometheus. Prometheus fetches numbers from each app's
/metricsweb page on a schedule, for example every 15 seconds. This fetching is called scraping. It stores the numbers as time series and raises alerts, and Alertmanager decides who hears about each alert. - Traces: OpenTelemetry and Jaeger. OpenTelemetry (OTel) is an open standard with libraries that make an app record traces. The OTel Collector receives them, processes them and forwards them to Jaeger, which stores them and lets you search them.
- Logs: the ELK stack. Elasticsearch stores and searches log lines, Logstash parses them on the way in, and Kibana is the web page where you search them. Filebeat, a small shipper, reads the app's log file and hands new lines to Logstash.
- Profiles: Pyroscope. Grafana Pyroscope keeps the profiles your app sends all day, so you can see which functions used the CPU at any moment, even hours later.
Grafana ties them together. It is not a signal and stores no telemetry: it asks other tools, its data sources, for data and draws dashboards. In this course it reads Prometheus first, then traces, logs and profiles in later labs.
On the map, data leaves shop-demo, the course's demo app, on four roads. Notice who starts each trip: Prometheus pulls metrics from the app, the app pushes traces and profiles out, and Filebeat reads a log file the app writes.
Which tool answers which question
When something breaks, you do not open every tool. You start from your question, and it picks the tool. "Is something wrong, and since when?" is about a trend, so you look at metrics. "Why was this one checkout slow?" is about one request's path, so you look at a trace.
Real problems often chain them: a Grafana panel shows when latency rose, a trace shows the slow step, the logs show its error, and a flame graph shows the function that burned the CPU. The course's last section practises that journey.
The lab: shop-demo in eight numbered folders
Every lab watches the same small app, shop-demo: a pretend web shop in Python with a product list, a checkout that is sometimes slow or fails, and a deliberately CPU-heavy report. Next to it runs loadgen, a load generator that plays the customers with about five requests per second, so every graph has data.
Docker Compose starts them. A container is a packaged program that runs isolated from the rest of your computer, and Compose starts several containers together from one YAML file, docker-compose.yml. The next lesson walks through that file.
The labs live in the public repository datsabk/course-labs, in the folder open-source-observability-stack. The first five sections use one folder each, and the last section, Putting It Together, uses three:
01-lab-setup:shop-demoandloadgenalone02-prometheus-alertmanager: metrics, queries and alerts03-grafana: dashboards and Grafana alerts04-otel-collector-jaeger: the Collector, a traced app and Jaeger05-elk: logs through Filebeat and Logstash into Elasticsearch and Kibana06-correlate-signals: Grafana linking metrics, logs and traces07-pyroscope: profiles of the app08-capstone-broken-app: a brokenshop-demoto debug
Each folder is a complete lab with a README.md that lists its ports, commands and what you should see. None needs a cloud account.
What your laptop needs
Install git to download the labs, Docker to run containers, the Docker Compose v2 plugin (the docker compose command, with a space) and curl to call web addresses. Docker Desktop on macOS and Windows includes Compose; on Linux, install Docker Engine and its Compose plugin. On Windows, run the labs in WSL 2, the Linux environment built into Windows, because later helper scripts need bash.
Memory matters most. Give Docker at least 4 GB for the early labs and 6 to 8 GB for the memory-hungry Elasticsearch labs. Keep about 10 GB of disk free for the images each lab downloads on its first start.
Check what you have with these four commands. The first three print versions; the last prints how much memory Docker may use, in bytes:
git --version
docker --version
docker compose version
docker info --format '{{.MemTotal}}'
You should see lines such as git version 2.47.1, Docker version 27.4.0, build bde2b89 and Docker Compose version v2.31.0, with your own version numbers, then a plain number such as 8217473024, a little over 8 GB. If yours is below 4000000000, raise the limit: in Docker Desktop on macOS under Settings > Resources, and on Windows in WSL's .wslconfig file.
The most common failure is Cannot connect to the Docker daemon: Docker is installed but not running, so start Docker Desktop or the Linux Docker service. If compose is reported as not a docker command, install the Compose v2 plugin.
Each tool listens on its own port, a numbered door on your computer that one program answers on. Every lab publishes its ports on 127.0.0.1, your machine's own address, so only your machine can reach them, as http://localhost:9090 and so on.
Only one program can listen on a port at a time. If a lab fails to start because a port is already allocated or in use, run docker compose down in the other lab's folder, then try again.
Open source or commercial?
Commercial observability services do the same jobs: you send them telemetry, and they store it, draw dashboards and send alerts, usually for a bill that grows with your data. Running open-source tools yourself gains you cost and control. There is no licence fee, your data stays on machines you choose, and every setting lives in files you can keep in git. Because OpenTelemetry is vendor-neutral, you can later send telemetry elsewhere without changing the code that records it.
In return you take on the work: installing, upgrading and securing every tool, sizing storage, keeping backups, and noticing when the monitoring itself breaks. At scale that is a real job, so paying a vendor is a fair choice, and many teams mix both.
On licences: Prometheus, OpenTelemetry and Jaeger use Apache 2.0, and Grafana and Pyroscope use AGPLv3. Elasticsearch and Kibana left open-source licences in 2021, and in 2024 Elastic added the open-source AGPLv3 as an option. All are free for these labs.
Check yourself
Grafana shows your request rate. Why can it not replace Prometheus?
Grafana stores no metrics: it asks Prometheus, its data source, and draws the answer. Without Prometheus scraping and storing the numbers, it has nothing to show.
A customer says order ord-48213 failed at 14:02. Which tool do you open first, and why not Prometheus?
Kibana, to search the logs for that order ID. Prometheus keeps numbers over time, such as failed checkouts per second, not the details of one event.
You start a second lab while the first still runs, and it fails with "port is already allocated". Why, and what do you do?
Both labs publish the same ports, such as 8000 for shop-demo, and only one program can listen on a port. Run docker compose down in the first lab's folder, then start the second.
Go deeper
- The beginner’s guide to Observability: the everyday vocabulary of observability work, a good companion to this map.
- Observability vs Monitoring: Understanding the Difference: why linking the signals lets you answer questions you did not plan for.