Chapter 17 Exercises
These exercises help you implement observability patterns for MCP servers.
AI-Guided Exercises
The following exercises are designed for AI-guided learning. Use an AI assistant with the course MCP server to get personalized guidance, hints, and feedback.
-
Logging Middleware ⭐⭐ Intermediate (35 min)
- Implement structured logging middleware
- Configure correlation IDs for request tracing
- Set up log levels and filtering
- Integrate with CloudWatch or similar
-
Metrics Collection ⭐⭐⭐ Advanced (45 min)
- Add Prometheus-compatible metrics
- Track request latencies and error rates
- Implement custom business metrics
- Configure alerting thresholds
Prerequisites
Before starting these exercises, ensure you have:
- Completed deployment chapters (ch07-ch10)
- A deployed MCP server to instrument
- Basic understanding of observability concepts
Next Steps
After completing these exercises, continue to:
- Operations and Monitoring - Production dashboards
- Server Composition - Multi-server patterns