OpenInference Portkey AI Instrumentation
This package provides instrumentation for the Portkey AI library using OpenInference.
Installation
pip install openinference-instrumentation-portkey
Usage
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import ConsoleSpanExporter
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
from openinference.instrumentation.portkey import PortkeyInstrumentor
# Set up the tracer provider
trace.set_tracer_provider(TracerProvider())
trace.get_tracer_provider().add_span_processor(
SimpleSpanProcessor(ConsoleSpanExporter())
)
# Instrument Portkey AI
PortkeyInstrumentor().instrument()
# Use Portkey AI as usual
# ...
# Uninstrument when done
PortkeyInstrumentor().uninstrument()
Features
- Automatic instrumentation of Portkey AI API calls
- Capture of input messages, output messages, and model information
- Integration with OpenTelemetry for distributed tracing
Requirements
- Python 3.10+
- Portkey AI 0.1.0+
License
Apache License 2.0
Release files for openinference-instrumentation-portkey 0.1.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openinference_instrumentation_portkey-0.1.18.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openinference_instrumentation_portkey-0.1.18-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.9 kB
Release files / openinference_instrumentation_portkey-0.1.18.tar.gz
| Download URL | openinference_instrumentation_portkey-0.1.18.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c68f0f11e31754c1fb5dcd9d8ecad01b612325af6f6088a1ba90b283cb813b27
|
|
BLAKE2b-256 checksum How to use checksums |
ba2a6780a911100fd1e97463c181487f089797f6faac5e73a63c60a70f67c02f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency logRelease files / openinference_instrumentation_portkey-0.1.18-py3-none-any.whl
| Download URL | openinference_instrumentation_portkey-0.1.18-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
129bc41bd85d06b841cfa2e78890449bc520376899af20790b715827b97a0aae
|
|
BLAKE2b-256 checksum How to use checksums |
d67fc5d18ece5f22f6e258f4aeedbeb528c7eefc79184d74d267030d75e6993b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency log