skillfed

openinference-instrumentation-portkey

OpenInference Portkey AI Instrumentation

openinference-instrumentation-portkey v0.1.13 95.7K downloads/30d#13,253 on PyPI1,147
Permissive license Apache-2.0 Active released

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 on this page — 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

openinference-instrumentation-portkey on PyPI

pip

pip install openinference-instrumentation-portkey

uv

uv add openinference-instrumentation-portkey

poetry

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 the current Python release (<3.15,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 7 — openinference-instrumentation, openinference-semantic-conventions, opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, typing-extensions, wrapt
Maintenance actively maintained — 2 days since the last release
Last repo commit
First released
Downloads 95,715/month — #13,253 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: openinference_instrumentation_portkey-0.1.13-py3-none-any.whl

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

opentelemetry instrumentation portkeyportkey ai tracingllm observability openinferencedistributed tracing ai callsopentelemetry span exportportkey api monitoringai instrumentation framework
observabilityllm-tracingopentelemetry

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

openinference-instrumentation-openai

Auto-instruments OpenAI Python SDK calls to…

permissive · top 5,000 on PyPI

portkey-ai

Portkey is a Python SDK that wraps…

permissive · top 5,000 on PyPI

openinference-instrumentation

Provides utility functions to convert typed…

permissive · top 5,000 on PyPI

literalai

Literalai is a Python SDK for observability in…

permissive · top 15,000 on PyPI

openinference-instrumentation-openai-agents

Auto-instruments OpenAI Agents SDK to emit…

permissive · top 5,000 on PyPI

openinference-instrumentation-google-genai

Automatically instruments Google GenAI SDK…

permissive · top 15,000 on PyPI

openinference-instrumentation-google-adk

Auto-instruments Google ADK applications to…

permissive · top 15,000 on PyPI

opentelemetry-instrumentation-openai-v2

Automatically traces and logs OpenAI API calls…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-aiokafka

Adds distributed tracing instrumentation to…

permissive · top 5,000 on PyPI

openinference-instrumentation-agno

Auto-instruments Agno Agent applications to…

permissive · top 15,000 on PyPI