Back to feed
Dev.to
Dev.to
7/30/2026
Trace LLM calls with OpenTelemetry to debug your AI agent

Trace LLM calls with OpenTelemetry to debug your AI agent

Original: Debugging LLM Calls: How to Trace What Your AI Agent Actually Did

Short summary

A practical guide to instrumenting LLM calls with OpenTelemetry so you can trace prompts, responses, timing, and cost. The author walks through wrapping existing API calls with minimal code changes using OpenInference instrumentation libraries. Several observability platforms are surveyed including LangSmith, Langfuse, and the open-source Arize Phoenix.

  • Use OpenTelemetry to record every LLM call's prompt, response, timing, and cost
  • Instrumentation requires just two lines wrapping existing model API calls
  • Tools surveyed: LangSmith, Langfuse, Helicone, Arize Phoenix (open source), Enprompta

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more