feat(examples): add Microsoft Agent Framework tracing example - #667
Open
viniciusdsmello wants to merge 1 commit into
Open
feat(examples): add Microsoft Agent Framework tracing example#667viniciusdsmello wants to merge 1 commit into
viniciusdsmello wants to merge 1 commit into
Conversation
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
force-pushed
the
vini/open-12219-integration-microsoft-agent-framework-maf-python-tracing
branch
from
August 20, 2026 23:45
851ebf9 to
8c2ec76
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 existingsemantic-kernel/strands-agentsnotebook patternTwo parts, per the issue:
invoke_agent→chat→execute_tool, which Openlayer types, tokenizes and costs correctly today.workflow.build/workflow.run/executor.process/edge_group.process/message.sendspans.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:
observability.py:577). Openlayer's endpoint is HTTP, soOTEL_EXPORTER_OTLP_PROTOCOL=http/protobufis required or nothing arrives at all.OTEL_EXPORTER_OTLP_ENDPOINTalso builds metric and log exporters pointed at/v1/metricsand/v1/logs, which Openlayer does not serve.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 isenable_sensitive_telemetry().workflow.run, notworkflow.session/workflow_invoke. Python and .NET have already converged.executor.input/executor.output/message.contentare not span attributes; executor I/O is exposed as workflow events, soENABLE_SENSITIVE_DATAcannot surface it. It gates the agent/chat/tool paths only.Testing
nbclientagainst a live pipeline, with no errors. Both parts export and render; record count moved as expected (oneinvoke_agentrecord with full content, plusworkflow.buildandworkflow.run). Verified the conditional edge that did not fire recordsedge_group.delivery_status: "dropped condition evaluated to false".🤖 Generated with Claude Code
https://claude.ai/code/session_014CoiafW3g91BWNpyu7zpoa