Skip to content

Enable OpenTelemetry tracing for agent framework activity sources#19

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-no-traces-in-dev-ui
Draft

Enable OpenTelemetry tracing for agent framework activity sources#19
Copilot wants to merge 2 commits intomainfrom
copilot/fix-no-traces-in-dev-ui

Conversation

Copy link

Copilot AI commented Mar 21, 2026

The DevUI trace panel shows "Run devui --instrumentation and start a conversation." because agents were never instrumented and the agent framework's activity sources were never registered in the OpenTelemetry pipeline.

Changes

  • Extensions.cs — Register the three agent framework activity sources so spans are captured and exported to Aspire dashboard / OTLP:

    tracing.AddSource(builder.Environment.ApplicationName)
        .AddSource("Experimental.Microsoft.Extensions.AI")  // LLM call spans
        .AddSource("Experimental.Microsoft.Agents.AI")      // agent run spans
        .AddSource("Microsoft.Agents.AI.Workflows")         // workflow execution spans
  • AgentDelegateFactory.cs — Wrap agents with OpenTelemetryAgent in both modes (Single and LlmHandOff). This enables agent-level activity creation and automatically instruments LLM calls via OpenTelemetryChatClient internally:

    return new OpenTelemetryAgent(agent, sourceName: "Experimental.Microsoft.Agents.AI");

Note: The DevUI "Context Inspector" trace sub-panel requires the server to emit response.trace.completed SSE events, which is not yet implemented in Microsoft.Agents.AI.Hosting.OpenAI 1.0.0-alpha.260311.1. Traces are now fully visible in the Aspire dashboard and any OTLP-connected backend (e.g., Azure Monitor).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • learn.microsoft.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Copilot AI linked an issue Mar 21, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix issue with traces not showing in Agent Framework dev ui Enable OpenTelemetry tracing for agent framework activity sources Mar 22, 2026
Copilot AI requested a review from elbruno March 22, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent Framework dev ui - show no traces

2 participants