maple-agent-tracing-microsoft-agent-framework
Installation
SKILL.md
Maple agent tracing: Microsoft Agent Framework and Semantic Kernel
Goal: one user conversation = one Maple Agent Session, with a transcript, every model call, every tool call (arguments, results, failures) and tokens.
The framework emits the spans itself. You add: an OTLP/HTTP exporter, content capture, a gen_ai.conversation.id span processor (the framework never sets one for local-history sessions), and a flush.
Step 0: Detect
- Python MAF:
agent-framework,agent-framework-coreinpyproject.toml/requirements*.txt/uv.lock. Check the installed version (python -c "import agent_framework; print(agent_framework.__version__)"). Target ≥ 1.19.0; upgrade if older (1.13 lacks theotlp_*arguments used below). - .NET MAF:
Microsoft.Agents.AIin*.csproj. Target ≥ 1.22.0. - Semantic Kernel:
semantic-kernel(Python, target ≥ 1.44.1) orMicrosoft.SemanticKernel(.NET). Use the Semantic Kernel section. - Existing OpenTelemetry: search for
TracerProvider(,set_tracer_provider,configure_azure_monitor,logfire.configure,configure_otel_providers,AddOpenTelemetry(,Sdk.CreateTracerProviderBuilder. If a provider exists, add Maple's exporter and the conversation processor to it; do not create a second provider and do not callconfigure_otel_providers(). - Find every place a user message is handled (HTTP route, queue consumer, CLI loop) and what identifies the conversation there (chat id, thread id,
AgentSession). You need it in Step 3.