I Paid for the Embedding. My Logs Never Saw the Request.
python
dev.to
A follow-up to Counting OpenAI Tokens per Request in FastAPI. I sent a document to evorag while the database was down. OpenAI was called. The embedding was created. I paid for it. Then the database write failed. The user got a 500. My logs showed embedding.created. They did not show request.completed. No status. No latency. No token count. The failed request was invisible. That's the request I most needed to see. Where it came from In the last post, I built a logging middleware