📊 Observability — Metrics, Logs, Traces, Audit
Stack 4 trụ cột: metrics (Prometheus), logs (Loki-like), traces (Jaeger), audit (immutable). Service Status Page tổng hợp 25+ services trong console.
Stack
Metrics
metrics-service :8127 + Prometheus scrape mọi service. Time-series, alert rule, SLO burn rate.
Logging
logging-service :8126 — ingest, index, query (Loki-like). Retention policy theo project.
Tracing
OpenTelemetry SDK trong tất cả services Go → OTLP HTTP :4318 → Jaeger UI :16686.
Audit
audit-service :8114 — immutable; gateway forward mọi sensitive action; ISO 27001 ready.
Monitor & Alert
monitor-service :8091 — health probes, uptime check, alert rule + notification.
Notification
notification-service :8115 — email/SMS/Slack/webhook templates.
Service Status Page
GET /api/v1/service-status tổng hợp health 25+ services + tab Console.
Dashboard
Grafana :3300 với dashboards mặc định: SLO, latency p95/p99, error rate, saturation.
Cost Insight
costmgmt-service liên kết với metrics để FinOps actionable.
Service Status Page
GET /api/v1/service-status
→ {
"overall": "healthy",
"services": [
{ "name":"api-gateway", "status":"healthy", "latency_ms":12 },
{ "name":"iam-service", "status":"healthy", "latency_ms":18 },
{ "name":"postgres-service","status":"degraded","incident_id":"INC-202601-014" },
...
],
"incidents":[ ... ]
}
Audit Log — ISO 27001 ready
# Mọi action sensitive được gateway forward
{
"ts":"2026-03-09T10:24:11Z",
"actor":"user:[email protected]",
"project_id":"prj-prod",
"action":"database.failover",
"resource":"db:prod-pg",
"request_id":"...","ip":"10.0.0.5",
"result":"success","duration_ms":2340
}
SIEM / long-term retention
Audit có thể stream sang SIEM (Splunk, ELK, Sentinel) qua webhook hoặc Kafka topic audit.events.