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
@@ -0,0 +1,9 @@
# Streaming asks for usage; a server that omits it is counted as unpriced
stream request body asks for usage (stream_options.include_usage): true
request fragment: "stream":true
two calls to a server that omits the usage block (/ask and /stream):
gen_ai.client.token.usage total, before 7 -> after 7
app.ai.unpriced{reason=no-usage} for ask : 1
app.ai.unpriced{reason=no-usage} for stream: 1