Skip to content

feat(examples): add Microsoft Agent Framework tracing example - #667

Open
viniciusdsmello wants to merge 1 commit into
mainfrom
vini/open-12219-integration-microsoft-agent-framework-maf-python-tracing
Open

feat(examples): add Microsoft Agent Framework tracing example#667
viniciusdsmello wants to merge 1 commit into
mainfrom
vini/open-12219-integration-microsoft-agent-framework-maf-python-tracing

Conversation

@viniciusdsmello

@viniciusdsmello viniciusdsmello commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Summary

Adds a runnable Colab notebook showing how to export Microsoft Agent Framework (MAF) traces to Openlayer's OpenTelemetry endpoint.

MAF is the merger of Semantic Kernel and AutoGen, and Microsoft's stated successor for new agent development — both predecessors are in maintenance mode. It is natively instrumented with OpenTelemetry, so no extra instrumentation library is needed and no SDK changes were required.

Pairs with the docs page in openlayer-ai/openlayer-docs#235.

Changes

  • examples/tracing/microsoft-agent-framework/microsoft_agent_framework_tracing.ipynb — follows the existing semantic-kernel / strands-agents notebook pattern

Two parts, per the issue:

  • Single agent + function tool — produces invoke_agentchatexecute_tool, which Openlayer types, tokenizes and costs correctly today.
  • Graph workflow with three executors and two conditional edges — produces MAF's proprietary workflow.build / workflow.run / executor.process / edge_group.process / message.send spans.

Context

Refs OPEN-12219.

Three transport details are documented because they are easy to miss and neither Langfuse's nor Arize's MAF pages mention them:

  1. MAF defaults to OTLP over gRPC (observability.py:577). Openlayer's endpoint is HTTP, so OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf is required or nothing arrives at all.
  2. The traces-specific OTLP env vars are used deliberately. The generic OTEL_EXPORTER_OTLP_ENDPOINT also builds metric and log exporters pointed at /v1/metrics and /v1/logs, which Openlayer does not serve.
  3. No manual root span. MAF's own samples open one to print a trace ID for App Insights. On Openlayer that empties the record's output, since the record is built from the root span and a plain span carries none.

Note for reviewers: the issue description predates MAF 1.x

Written against verified 1.14 behaviour, which differs from the issue in three places:

  • enable_instrumentation() is superseded — instrumentation is on by default; the opt-in is enable_sensitive_telemetry().
  • Python emits workflow.run, not workflow.session / workflow_invoke. Python and .NET have already converged.
  • executor.input / executor.output / message.content are not span attributes; executor I/O is exposed as workflow events, so ENABLE_SENSITIVE_DATA cannot surface it. It gates the agent/chat/tool paths only.

Testing

  • Manual testing
  • Other: notebook executed end-to-end headlessly via nbclient against a live pipeline, with no errors. Both parts export and render; record count moved as expected (one invoke_agent record with full content, plus workflow.build and workflow.run). Verified the conditional edge that did not fire records edge_group.delivery_status: "dropped condition evaluated to false".

🤖 Generated with Claude Code

https://claude.ai/code/session_014CoiafW3g91BWNpyu7zpoa

Adds a runnable Colab notebook showing how to export Microsoft Agent
Framework (MAF) traces to Openlayer's OpenTelemetry endpoint. MAF is
the merger of Semantic Kernel and AutoGen, and is natively instrumented
with OpenTelemetry, so no extra instrumentation library is needed.

The notebook covers both layers:

- A single agent with a function tool, producing invoke_agent -> chat ->
  execute_tool spans that Openlayer types and costs correctly.
- A small graph workflow with two conditional edges, producing MAF's
  proprietary workflow.build / workflow.run / executor.process /
  edge_group.process / message.send spans.

Verified end to end against a live pipeline: both parts export and
render, including the edge_group.delivery_status of the edge whose
condition evaluated to false.

Three transport details are documented because they are easy to miss:

- MAF defaults to OTLP over gRPC; Openlayer needs http/protobuf.
- The traces-specific OTLP env vars avoid creating metric and log
  exporters pointed at endpoints Openlayer does not serve.
- Wrapping the run in a manual root span (as MAF's own samples do)
  leaves the Openlayer record with an empty output, since the record is
  built from the root span.

Refs OPEN-12219

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014CoiafW3g91BWNpyu7zpoa
@viniciusdsmello
viniciusdsmello force-pushed the vini/open-12219-integration-microsoft-agent-framework-maf-python-tracing branch from 851ebf9 to 8c2ec76 Compare August 20, 2026 23:45
@viniciusdsmello viniciusdsmello self-assigned this Aug 20, 2026
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.

1 participant