I'm building a Python application that makes frequent calls to
OpenAI and Anthropic APIs. I want to monitor:
- How much each call costs in USD
- Latency per call (ms)
- Token usage (input/output)
- Error rate
I don't want to manually wrap every API call or sign up for
an external service. Is there a lightweight way to add this
observability without changing my existing code?
Python 3.11, using openai and anthropic official SDKs.