AI Agent Observability: OpenTelemetry Traces, Cost, Replay
When an agent gives a bad answer, the hard part is getting that exact run back.
Video #245 ยท Enterprise architecture and AI agents
Steps in the video
Files
- agent.py (52 lines)
- compare.py (19 lines)
- replay.py (30 lines)
Tested with
Python 3.12.15 | opentelemetry-api==1.45.1, opentelemetry-sdk==1.45.1
What this does not show
One request with a made-up model and tools, traced in memory; the replay returns the recorded outputs, so the same answer and zero real calls are by design; it tests agent code, not the model.
Sources
Learning IT by Example.