Skip to content
All learning paths

Study notes · two weeks · 3–4 h a week

Agent Observability

When an agent misbehaves in production, the trace is the only witness. This path covers the shared vocabulary for agent telemetry, then wires it into Azure so every run can be replayed.

The core material

ResourceRoleUse it for
OpenTelemetry GenAI conventions, explainedMental modelAgent and tool spans, gen_ai.* attributes, token and agent metrics, current status
Foundry agent tracingEnterprise platformOTel traces for Foundry agents, stored in Application Insights
VS Code: monitor agents with OpenTelemetryLocal labExport Copilot agent telemetry to the Aspire dashboard or Jaeger on your laptop

01 / Week 1

The GenAI telemetry vocabulary

Learn the span shapes, attributes and metrics that every agent framework is converging on.

SignalNameWhat it captures
Spaninvoke_agentOne agent run; nested for sub-agents and agent-to-agent calls
Spanexecute_toolOne tool call, including calls made over MCP
Spanchat / embeddings / retrievalModel inference and retrieval steps
Spaninvoke_workflow, planMulti-agent workflows and planning phases
Metricgen_ai.client.token.usageTokens by type, operation and model; the basis for cost
Metricgen_ai.invoke_agent.tool_callsTool calls per run; compare with inference calls to spot loops

Source: Dash0 explainer

Read (~2 h)

  1. OpenTelemetry GenAI semantic conventions explained
  2. OTel GenAI agent spans: now a pointer to the new repository; check it for the latest names
  3. Foundry agent tracing concepts: includes the multi-agent conventions Microsoft and Cisco Outshift contributed

Privacy default: Prompt and response text are opt-in events, not span attributes, because they often hold personal data. Keep secrets out of tool arguments.

CheckpointSketch the trace tree for a supervisor agent that calls two sub-agents, one of which calls an MCP tool.

02 / Week 2

Wire it up locally and on Azure

See traces on your laptop first, then send the same signals to Application Insights through Foundry.

Do (~4 h)

  1. Monitor agents with OpenTelemetry (VS Code): run the Aspire dashboard or Jaeger and watch real agent spans arrive
  2. Set up tracing in Foundry: connect Application Insights and instrument your framework
  3. Flow Framework events and traces: every turn, model call, tool and schedule is an event; OTLP traces optional
  4. Build one dashboard: runs per hour, p95 latency per tool, tokens and cost per agent, and tool calls per run.

Pair with evals: Traces feed evals. Sample production traces into the regression set from the Agent Evaluation path.

CheckpointFrom one bad answer in production, you can open its trace and name the step that went wrong in under five minutes.

Capstone

Instrument one real agent end to end. Done when every line holds:

Reference links