Semantic Kernel (tracing)
Semantic Kernel (tracing)
Microsoft Semantic Kernel is a Python SDK for composing agents, plugins, prompts, and model services. Respan enables Semantic Kernel diagnostics and normalizes kernel function, chat completion, and tool spans into Respan traces.
This tracing setup uses your model provider credentials directly. To route model calls through Respan instead, use the Semantic Kernel gateway setup.
Set up Respan
Create an account at platform.respan.ai and grab an API key.
Run npx @respan/cli setup to set up with your coding agent.
Use Respan Gateway
See Semantic Kernel gateway setup to route model calls through the Respan gateway.
Example projects
Setup
Set environment variables
OPENAI_API_KEY is used by Semantic Kernel for direct model requests. RESPAN_API_KEY exports traces to Respan.
View your trace
Open the Traces page to see kernel function, chat completion, plugin/tool, and error spans.
Configuration
What gets traced
Attributes
Set defaults at initialization. These apply to every Semantic Kernel span emitted in the active process.
Pass capture_content=False to SemanticKernelInstrumentor() when you want diagnostics without prompt and completion payload content.