Skip to main content
Semantic Kernel hero Semantic Kernel is an open-source SDK from Microsoft that helps you build AI applications using languages like Python, C#, and Java. It comes with built-in OpenTelemetry instrumentation, making it easy to export trace data. This guide shows how to export Semantic Kernel traces to Openlayer for observability and evaluation.
Semantic Kernel is in maintenance mode. Microsoft has merged Semantic Kernel and AutoGen into Microsoft Agent Framework, which is where new agent development is expected to happen. Semantic Kernel continues to receive bug fixes and security patches, and this integration keeps working. If you are starting a new project or planning a migration, see the Microsoft Agent Framework guide.
While this guide shows code snippets in Python, the integration also works for all other programming languages supported by Semantic Kernel, such as C#, and Java.

Configuration

The integration works by sending trace data to Openlayer’s OpenTelemetry endpoint.
The full code used in this guide is available here.
To set it up, you need to:
1

Set the environment variables

Set the following environment variables:
2

Initialize OpenLIT and Semantic Kernel

Initialize OpenLIT and Semantic Kernel in your application.
3

Run LLMs and workflows as usual

Once instrumentation is set up, you can run your LLM calls as usual. Trace data will be automatically captured and exported to Openlayer, where you can begin testing and analyzing it.For example: