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.9+
  • Portkey AI 0.1.0+

License

Apache License 2.0

Metadata

Release files for openinference-instrumentation-portkey 0.1.0

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.0
File Size Uploaded Provenance Actions
openinference_instrumentation_portkey-0.1.0.tar.gz 6.4 kB Without provenance Details for openinference_instrumentation_portkey-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 16.2 kB

Release files / openinference_instrumentation_portkey-0.1.0.tar.gz

Download URL openinference_instrumentation_portkey-0.1.0.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
52ead3b9a03672a171446bbf802d8c88ab9677cfb871d17e2e167caaacb46d2f
BLAKE2b-256 checksum
How to use checksums
29d9b392f97a10ff5927a36f03c8bc1f8769092e75c792dedf8107f597c25d60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

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

Download URL openinference_instrumentation_portkey-0.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e5631c63a937f13d86646340d2a49edb34893667d9518276aa6937265db6bfa
BLAKE2b-256 checksum
How to use checksums
df09a95191c7b4b8edebb7efc361fceb4c0de48023205bdf46c37d35d7b5b8a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for openinference-instrumentation-portkey 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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