Metadata-Version: 2.1
Name: respan-instrumentation-semantic-kernel
Version: 0.1.0
Summary: Respan instrumentation plugin for Microsoft Semantic Kernel
License: Apache 2.0
Author: Respan
Author-email: team@respan.ai
Requires-Python: >=3.11,<3.14
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: opentelemetry-semantic-conventions (>=0.59b0)
Requires-Dist: opentelemetry-semantic-conventions-ai (>=0.5.1)
Requires-Dist: respan-sdk (>=2.6.1)
Requires-Dist: respan-tracing (>=2.17.0,<3.0.0)
Requires-Dist: semantic-kernel (>=1.36.0)
Description-Content-Type: text/markdown

# respan-instrumentation-semantic-kernel

Respan instrumentation plugin for [Microsoft Semantic Kernel](https://github.com/microsoft/semantic-kernel).

Semantic Kernel Python already emits OpenTelemetry spans for kernel functions
and chat/text completions when its experimental diagnostics are enabled. This
package activates those diagnostics, captures Semantic Kernel prompt/completion
log records on the active completion span, and registers a Respan span processor
that normalizes the resulting spans to the Respan/OpenTelemetry contract.

## Installation

```bash
pip install respan-ai respan-instrumentation-semantic-kernel
```

## Usage

```python
from respan import Respan
from respan_instrumentation_semantic_kernel import SemanticKernelInstrumentor

respan = Respan(
    instrumentations=[SemanticKernelInstrumentor()],
)
```

Any Semantic Kernel work started after initialization is traced through the
active Respan OpenTelemetry pipeline. By default the instrumentor enables
Semantic Kernel's sensitive diagnostics so prompt and completion content can be
attached to chat/text completion spans. Pass `capture_content=False` to emit
model and token metadata without prompt/completion content.

