feat(infra): add Prometheus and Chart.js dashboard with real-time charts

- Add Prometheus server scraping OTel collector
- Add Chart.js donut chart for service health distribution
- Add line charts for RPS, latency, error rate, trace volume
- Add Prometheus API proxy to nginx whitelist
- Restructure dashboard layout with 12-column responsive grid
This commit is contained in:
asepharyana
2026-07-22 18:26:41 +07:00
parent 1ee99ffc2c
commit ee4fd677ea
4 changed files with 523 additions and 261 deletions
+24
View File
@@ -35,6 +35,27 @@ services:
- PROMETHEUS_SERVER_URL=http://otel-collector:8889
- LOG_LEVEL=info
# ── Prometheus (Metrics Backend) ──
prometheus:
container_name: prometheus
image: prom/prometheus:latest
restart: always
networks:
app-shared-net:
aliases:
- prometheus
ports:
- '9090:9090'
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
volumes:
- ../../infra/otel/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
# ── Custom Dashboard (nginx:alpine) ──
dashboard:
container_name: dashboard
@@ -57,6 +78,9 @@ services:
otel-collector:
condition: service_started
volumes:
prometheus_data:
networks:
app-shared-net:
name: app-shared-net