Skip to main content

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

Metadata

Release files for openinference-instrumentation-portkey 0.1.21

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openinference-instrumentation-portkey 0.1.21
File Size Uploaded
openinference_instrumentation_portkey-0.1.21.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openinference-instrumentation-portkey 0.1.21
File Interpreter ABI Platform
openinference_instrumentation_portkey-0.1.21-py3-none-any.whl Python 3 none any Details

Total release size: 19.7 kB

Release files / openinference_instrumentation_portkey-0.1.21.tar.gz

Download URL openinference_instrumentation_portkey-0.1.21.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
68f92b17dd7ac09ee0b8378479e81806427d4b58c73e3d78521fd43497d7d94f
BLAKE2b-256 checksum
How to use checksums
943a5a3a84d694c264713c767d18d4337161845efdedcb9c2206637fc83b3c46
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 Oct 1, 2026.

Transparency log

Release files / openinference_instrumentation_portkey-0.1.21-py3-none-any.whl

Download URL openinference_instrumentation_portkey-0.1.21-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2f1f57a5e811371620d4919e8abefe33e0718523812b08cc7bfd768e23702f9
BLAKE2b-256 checksum
How to use checksums
c751df4439533d8e83c3ad48868c09ec5a5899c31c50e66a3914ee25d4a00319
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 Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.21 This release

2 release files

0.1.19

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page