Back to feed
Dev.to
Dev.to
7/20/2026
Observability for Agents with OpenTelemetry, Aspire, and Application Insights

Observability for Agents with OpenTelemetry, Aspire, and Application Insights

Short summary

A detailed tutorial on implementing observability for AI agents using OpenTelemetry, Aspire, and Application Insights within the Microsoft Agent Framework. It covers tracing agent runs, model calls, tool calls, and approval requests, plus tracking token usage, failures, and looping behavior. The guide includes code examples for configuring telemetry with sensitive data controls and aligning activity sources with application telemetry.

  • Defines key observability questions for agent systems: speed, cost, failures, looping, tool selection, and data sensitivity
  • Shows code for wiring OpenTelemetry into Microsoft.Extensions.AI chat clients with configurable sensitive data capture
  • Emphasizes not logging entire prompts in production and using semantic conventions for GenAI telemetry attributes

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more