--- id: openinference-instrumentation-portkey version: "0.1.13" license: Apache-2.0 license_treatment: permissive maintenance: active --- # openinference-instrumentation-portkey — OpenInference Portkey AI Instrumentation License: permissive · Maintenance: active · Downloads: 95.7K/mo ## What it is and what it does This package adds automatic tracing to Portkey AI library calls by wrapping them with OpenTelemetry instrumentation. It captures request and response data—input messages, output messages, and model information—and exports them as OpenTelemetry spans, enabling you to integrate Portkey calls into distributed tracing systems and observability platforms. You install it alongside opentelemetry-api and opentelemetry-instrumentation, then call PortkeyInstrumentor().instrument() to activate tracing for all subsequent Portkey AI operations. It's designed for developers building LLM applications who need visibility into API call behavior across distributed systems. Use it for: - Monitor Portkey AI API latency and error rates in production using OpenTelemetry exporters (Jaeger, Datadog, etc.) - Debug LLM application behavior by inspecting captured input/output messages in trace spans - Correlate Portkey AI calls with other service traces in a microservices architecture - Audit and log all Portkey AI interactions for compliance or troubleshooting - Identify performance bottlenecks in LLM request/response cycles ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Automatically instruments Portkey AI API calls with OpenTelemetry tracing, capturing input/output messages and model metadata for distributed tracing and observability. Yes, if you use Portkey AI and need observability. The package is actively maintained, has no known vulnerabilities, carries a permissive license, and integrates cleanly with OpenTelemetry. Install it when you're ready to add distributed tracing to Portkey calls; it requires Python 3.10+ and the opentelemetry-api stack. ## Install pip install openinference-instrumentation-portkey uv add openinference-instrumentation-portkey poetry add openinference-instrumentation-portkey ## Installing openinference-instrumentation-portkey Before you install: Low install friction with a pure-Python wheel. Active maintenance with a recent release (2 days old) and steady repository activity. Supports Python 3.10 through 3.14. License in practice: Apache-2.0 is permissive; you can use this package freely in commercial and private projects without requiring source disclosure. Quickstart: pip install openinference-instrumentation-portkey from opentelemetry import trace from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import SimpleSpanProcessor, ConsoleSpanExporter from openinference.instrumentation.portkey import PortkeyInstrumentor trace.set_tracer_provider(TracerProvider()) trace.get_tracer_provider().add_span_processor( SimpleSpanProcessor(ConsoleSpanExporter()) ) PortkeyInstrumentor().instrument() Requires Python 3.10 or later and Portkey AI 0.1.0 or later to be installed separately. Verify before relying: - Whether Portkey AI 0.1.0+ is actually required or if earlier versions work - Performance overhead of instrumentation on high-volume Portkey API calls - Compatibility with specific Portkey AI versions beyond the stated 0.1.0+ requirement ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 95.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags opentelemetry instrumentation portkey, portkey ai tracing, llm observability openinference, distributed tracing ai calls, opentelemetry span export, portkey api monitoring, ai instrumentation framework, observability, llm-tracing, opentelemetry [View on SkillFed](https://skillfed.io/packages/openinference-instrumentation-portkey) · [View on PyPI](https://pypi.org/project/openinference-instrumentation-portkey/)