Skip to main content
Semantic Kernel is Microsoft’s open-source SDK for blending LLMs with conventional code through kernel functions, plugins, and prompt templates. Semantic Kernel emits OpenTelemetry spans when OpenLIT is initialized, and the openinference-instrumentation-openlit span processor converts them into the OpenInference format Phoenix displays.
This guide covers the Python implementation of Semantic Kernel. The same OpenTelemetry approach applies to Semantic Kernel for C# and Java.

Install

Setup

Set your API keys as environment variables:
Register Phoenix, add the OpenInference span processor ahead of the Phoenix exporter, then initialize OpenLIT:
instrumentation.py
Processor ordering matters. register() installs a default exporter-backed processor. Adding OpenInferenceSpanProcessor() replaces that default, and the BatchSpanProcessor you add after it exports the converted spans to Phoenix.

Run Semantic Kernel

example.py

Observe

Open the semantic-kernel project in Phoenix. Each chat completion appears as a chat gpt-5.5 LLM span (the name reflects the model you called), with the prompt, response, and token usage attached.

Troubleshooting

  • Code ran but no spans appear. OpenLIT must be initialized after the tracer provider is registered. Confirm register() and openlit.init() both run before any Semantic Kernel call.
  • Other LLM providers. Semantic Kernel supports Azure OpenAI, Anthropic, Google, and other AI services through its connectors.ai.<provider> modules. The same OpenLIT and OpenInference setup covers them.

Resources