A hands-on workshop exploring how Domain-Driven Design and OpenTelemetry observability evolve together, creating systems that are both well-modeled and deeply transparent.
In this 2-hour workshop, you'll work through a realistic e-commerce scenario where a "checkout" operation spans multiple bounded contexts (Inventory, Payments, Shipping, Notifications). You'll model these contexts, implement key domain events, and progressively add observability that reflects the domain model.
Languages: Choose one — Quarkus (Java), Python (FastAPI), or C# (.NET 10)
- Fork this repository
- Click Code → Codespaces → Create codespace on your preferred language branch:
workshop/quarkus— Java/Quarkusworkshop/python— Python/FastAPIworkshop/dotnet— C#/.NET 10
- Wait for the environment to initialize (~5-10 minutes)
- Open the tutorial site in a separate tab
- Follow along!
git clone https://github.com/patterncatalyst/domain-driven-design-observability-workshop.git
cd domain-driven-design-observability-workshop/exercises/python # or quarkus, dotnet
docker compose up --build -d
# Wait for services to start (~60 seconds)
../../tests/verify.sh- How DDD concepts (bounded contexts, domain events, ACL) map to observability concerns
- Implementing domain-named traces and spans across distributed services
- Creating business metrics that answer domain questions
- Debugging cross-context failures using observability tools
- Sampling strategies and observability cost management
| Module | Topic | Duration |
|---|---|---|
| 0 | Introduction & Setup | 15 min |
| 1 | The Domain Landscape | 15 min |
| 2 | Domain Events & Spans | 25 min |
| 3 | Structured Observability | 20 min |
| 4 | Cross-Context Debugging | 20 min |
| 5 | Observability Economics | 15 min |
| 6 | Wrap-up & Next Steps | 10 min |
Five bounded contexts as microservices:
┌──────────┐ ┌───────────┐ ┌──────────┐
│ Order │───▶│ Inventory │ │ Payment │
│ (Saga) │───▶│ │ │ │
│ :8080 │ │ :8081 │ │ :8082 │
└────┬─────┘ └───────────┘ └──────────┘
│
├─────────▶┌───────────┐
│ │ Shipping │
│ │ :8083 │
│ └───────────┘
│
└──kafka──▶┌──────────────┐
│ Notification │
│ :8084 │
└──────────────┘
- OpenTelemetry Collector — Receives traces, metrics, and logs via OTLP
- Grafana — Visualization and dashboards (:3000)
- Tempo — Distributed tracing
- Prometheus — Metrics
- Loki — Log aggregation
- Vlad Khononov — Learning Domain-Driven Design, Balancing Coupling in Software Design
- Eric Evans — Domain-Driven Design
- Vaughn Vernon — Implementing Domain-Driven Design
- Alessandro Colla — Domain-Driven Refactoring
- Annegret Junker — Crafting Great APIs with Domain-Driven Design
Apache License 2.0