Add observability module: Spring AI built-in meters and spans, cost per endpoint from token usage, Prometheus and Grafana dashboard

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JXVi2GMQ7bR5EmbUFdDj7N
This commit is contained in:
Claude
2026-10-09 06:39:21 +00:00
parent 65f580c5bc
commit cc2a1b8bcb
45 changed files with 1731 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Sends a mixed workload so every dashboard panel has data. Usage: load.sh [rounds]
H=http://127.0.0.1:8080
for i in $(seq 1 "${1:-10}"); do
curl -s -o /dev/null "$H/ask?q=what+is+observability+$i"
curl -s -o /dev/null "$H/summarize" --get --data-urlencode "text=$(head -c 2000 /dev/zero | tr '\0' 'x') round $i"
curl -s -o /dev/null "$H/weather?city=Pune"
curl -s -o /dev/null "$H/stream?q=tell+me+something+$i"
[ $((i % 4)) -eq 0 ] && curl -s -o /dev/null "$H/ask?q=slow+request+$i"
[ $((i % 5)) -eq 0 ] && curl -s -o /dev/null "$H/ask?q=boom+$i"
[ $((i % 6)) -eq 0 ] && curl -s -o /dev/null "$H/ask?q=nousage+$i"
done
echo "load done"