Learn how to instrument Semantic Kernel applications with LangWatch.
@langwatch.trace()
decorator:
langwatch.setup()
: Initializes the LangWatch SDK, which includes setting up an OpenTelemetry trace exporter. This exporter is ready to receive spans from any OpenTelemetry-instrumented library in your application.
OpenAIInstrumentor()
: The OpenInference instrumentor automatically patches OpenAI client operations to create OpenTelemetry spans for their operations, including:
@langwatch.trace()
to add additional context and metadata to your traces, but it’s not required for basic functionality.
langwatch.setup()
handles everything.instrumentors
list.@langwatch.trace()
decorator is optional - the OpenInference instrumentor will capture Semantic Kernel activity.LANGWATCH_API_KEY
is set in the environment.langwatch.setup()
and that your Semantic Kernel code is being executed.