#!/usr/bin/env bash # Regenerates every file in output/: 01-07 from the test suite, 08-09 from the live Prometheus + Grafana stack. # Needs JDK 25 and Maven on PATH, plus the Prometheus and Grafana tarballs unpacked (see stack-up.sh). set -euo pipefail cd "$(dirname "$0")/.." mvn -q -B test scripts/stack-up.sh trap 'scripts/stack-down.sh' EXIT scripts/load.sh 12 sleep 8 { echo "# Prometheus metric families this app exposes at /actuator/prometheus (TYPE lines only)"; echo curl -s 127.0.0.1:8080/actuator/prometheus | grep -E '^# TYPE (gen_ai_|spring_ai_|app_ai_)' | sort; } > output/09-prometheus-families.txt scripts/verify-dashboard.py output/08-dashboard-queries.txt