Skip to main content

Respan instrumentation plugin for Microsoft Semantic Kernel

Project description

respan-instrumentation-semantic-kernel

Respan instrumentation plugin for 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

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

Usage

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file respan_instrumentation_semantic_kernel-0.1.0.tar.gz.

File metadata

File hashes

Hashes for respan_instrumentation_semantic_kernel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e0fb270388ac43cac8d27a8afa5e10f5ec9ee37613a6ff95c3dedb52e17cdb55
MD5 9af8acbc9ddece45fa492551245ba255
BLAKE2b-256 2932ada56535195351c7baea67a4f9068c01f6678fce2a0389ecfedf72b5bd70

See more details on using hashes here.

File details

Details for the file respan_instrumentation_semantic_kernel-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for respan_instrumentation_semantic_kernel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a470b8e49be4e131375f2455d9d17dbccc3789e0eb595d62a3083aa376bebc4b
MD5 50ec2dc920731f651c6b5aa3ef2ab30a
BLAKE2b-256 e8bbdebb7bdce78b2e2196aeadb17460e449eee8d9b85b512e44802392fa5918

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page