You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5a21832
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -195,6 +195,14 @@ Thank you to all the people that have contributed to Twiga so far!
195
195
196
196
<!-- ALL-CONTRIBUTORS-LIST:END -->
197
197
198
+
## 📈 Monitoring
199
+
200
+
- The FastAPI service now exposes `GET /metrics`, backed by `prometheus-fastapi-instrumentator` and custom counters for WhatsApp webhooks, LLM calls, rate limiting, and generated messages.
201
+
- Launch the local Prometheus + Grafana stack with `docker compose -f monitoring/docker-compose.monitoring.yml up`; Prometheus listens on `:9090` and Grafana on `:4000`.
202
+
- Prometheus scrapes the Twiga app at `host.docker.internal:8000/metrics` by default—if you run the API elsewhere, edit `monitoring/prometheus/prometheus.yml` accordingly.
203
+
- Grafana auto-provisions a Prometheus datasource plus three dashboards (`FastAPI Overview`, `LLM Performance`, `Redis Overview`) from `monitoring/grafana/provisioning`.
204
+
- Example alerts (5xx rate, slow latency) ship in `monitoring/prometheus/alerts.yml`.
205
+
198
206
## 📜 License
199
207
200
208
[MIT](https://github.com/Tanzania-AI-Community/twiga?tab=MIT-1-ov-file) License, Copyright 2024-present, Victor Oldensand
0 commit comments