Commit 9103933
committed
feat: add comprehensive observability stack with metrics, logging, and monitoring
## Major Features Added:
- 🔍 Prometheus metrics collection for all API endpoints
- 📊 Grafana dashboards with weather service monitoring
- 📝 Structured logging with correlation IDs and JSON format
- 🚨 AlertManager with pre-configured alert rules
- 📈 Loki log aggregation and analysis
- 🏥 Health check endpoints (/health, /health/ready, /health/live)
- 🐳 Complete Docker Compose observability stack
## New Components:
- weather_mcp/observability.py - Core observability infrastructure
- weather_mcp/health.py - Health check endpoints
- monitoring/ - Complete monitoring configuration
- docker-compose.observability.yml - Full stack deployment
- scripts/start-observability.sh - Easy startup script
- OBSERVABILITY.md - Comprehensive documentation
## Enhanced Services:
- Added @track_api_request decorators to all service methods
- Structured logging with correlation IDs
- Prometheus metrics for API performance, cache hit rates, SSE connections
- Error tracking and external API monitoring
## New Make Commands:
- make start-observability - Start full monitoring stack
- make docker-dev-run - Renamed from run-docker-dev
- make observability-up/down/logs/restart
- make health-check, metrics-check, observability-status
## Access Points:
- Weather MCP: http://localhost:8000
- Grafana: http://localhost:3000 (admin/admin)
- Prometheus: http://localhost:9091
- AlertManager: http://localhost:9093
This provides production-ready observability for the Weather MCP server.1 parent b652f89 commit 9103933
File tree
22 files changed
+2527
-23
lines changed- monitoring
- alertmanager
- grafana
- dashboards
- provisioning
- dashboards
- datasources
- loki
- prometheus
- promtail
- scripts
- weather_mcp
- services
22 files changed
+2527
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
0 commit comments