ProjectBuild an AI-Powered Digital Bank with RAG: the explanation · Module 15: Observability: traces, metrics, logs and cost · part 17 of 20
Part 17 · Module 15: Observability: traces, metrics, logs and cost

Module 15: Observability: traces, metrics, logs and cost

23 min read·
About 35 minutes · Needs: Module 10 (the agent graph) and Module 12 (guardrails) · Code: backend/app/observability/, backend/app/core/logging.py, backend/app/services/assistant_service.py

Where this fits

WHERE THIS FITS The Kestrel Bank system this module CLIENT API LAYER FastAPI SAFETY AGENT LangGraph MODELS RETRIEVAL DATA AND INGESTION Postgres, Redis QUALITY Langfuse Customer app React Admin app React FastAPI REST + streaming Auth + RBAC tokens, roles Document upload admin only, checked Guardrails injection, PII Router small or large Agent LangGraph Banking tools ledger, transfers LLMs Groq, Gemini Retrieval hybrid + rerank Ingestion parse, chunk, embed PostgreSQL + pgvector ledger, chunks, state Redis limits, queue Observability Langfuse, metrics, logs Evaluation golden set, release gate
Observability (blue) watches the API, the agent and its model calls, and keeps per-answer records in Postgres.

An assistant that answers well on your laptop can still go wrong in production, slowly and quietly. This module is about seeing what the running system does. It touches the API, the agent and every model call, and it keeps a per-answer record in Postgres.

The rest of this project is yours to keep

This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.

Or open everything with a plan