How ricardomarassato/fiap-postech-tc4-togglemaster works
ToggleMaster is a feature-flag platform whose primary workflow evaluates a user’s flag request, retrieves flag and targeting data, applies the targeting rule, returns a decision, and asynchronously records an analytics event. Its five services are instrumented for centralized telemetry; Grafana alerts can trigger in-cluster remediation and external incident notifications. The workflow and observability links are documented in the README; unsampled deployment wiring is shown only where that documentation supports it.
Main entry points: otel-collector.yaml OTel Collector · auth-service/handlers.go Auth API · grafana-alerting.yaml Grafana Alerts · evaluation-service/handlers.go Evaluation API
Components 22
Flag Platform
- Evaluation API
services/evaluation-service/handlers.go - Decision Logic
services/evaluation-service/evaluator.go - Flag API
services/flag-service/app.py - Targeting API
services/targeting-service/app.py - Auth API
services/auth-service/handlers.go - API Key Generation
services/auth-service/key.go - Analytics Worker
services/analytics-service/app.py
Observability
- OTel Collector
gitops/observability/otel-collector.yaml - Prometheus
gitops/observability/grafana-dashboard.yaml - Grafana Loki
gitops/observability/otel-collector.yaml - Grafana Alerts
gitops/observability/grafana-alerting.yaml
Incident Response
- Self-Healing Webhook
services/self-healing-service/app.py - Kubernetes API
- GitHub Actions Runbook
.github/workflows/self-healing.yml
External Systems
- New Relic APM
- PagerDuty
- Discord
State and Messaging
- Redis Cache
- PostgreSQL
- AWS SQS
- DynamoDB
Other components
- API Client
Connections 30
- API Client → Evaluation API: requests evaluation
README.md - Evaluation API → Decision Logic: gets decision
services/evaluation-service/handlers.go - Decision Logic → Redis Cache: reads cache
services/evaluation-service/evaluator.go - Decision Logic → Flag API: fetches flag
services/evaluation-service/evaluator.go - Decision Logic → Targeting API: fetches rules
services/evaluation-service/evaluator.go - Flag API → Auth API: validates key
services/flag-service/app.py - Targeting API → Auth API: validates key
services/targeting-service/app.py - Flag API → PostgreSQL: reads and writes flags
services/flag-service/app.py - Targeting API → PostgreSQL: reads and writes rules
services/targeting-service/app.py - Auth API → PostgreSQL: validates and stores keys
services/auth-service/handlers.go - Auth API → API Key Generation: generates keys
services/auth-service/handlers.go - Evaluation API → AWS SQS: publishes event
README.md - AWS SQS → Analytics Worker: delivers messages
README.md - Analytics Worker → DynamoDB: writes events
services/analytics-service/app.py - Evaluation API → OTel Collector: exports telemetry
README.md - Flag API → OTel Collector: exports telemetry
README.md - Targeting API → OTel Collector: exports telemetry
README.md - Auth API → OTel Collector: exports telemetry
README.md - Analytics Worker → OTel Collector: exports telemetry
README.md - OTel Collector → Prometheus: exports metrics
README.md - OTel Collector → Grafana Loki: pushes logs
README.md - OTel Collector → New Relic APM: exports OTLP
README.md - Prometheus → Grafana Alerts: feeds dashboards
README.md - Grafana Loki → Grafana Alerts: feeds dashboards
README.md - Grafana Alerts → PagerDuty: opens incidents
README.md - Grafana Alerts → Discord: sends alerts
README.md - Grafana Alerts → Self-Healing Webhook: sends webhook
README.md - Self-Healing Webhook → Kubernetes API: restarts deployment
services/self-healing-service/app.py - Self-Healing Webhook → Discord: confirms mitigation
services/self-healing-service/app.py - Self-Healing Webhook → GitHub Actions Runbook: dispatches runbook
README.md