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.3

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.3
File Size Uploaded
openinference_instrumentation_portkey-0.1.3.tar.gz 6.5 kB Details

Built distribution (wheel)

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

Total release size: 16.4 kB

Release files / openinference_instrumentation_portkey-0.1.3.tar.gz

Download URL openinference_instrumentation_portkey-0.1.3.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d8bcdfcdfa88745b9c9bbe31a515a36f9506167a9afec509e8a700029c2a0514
BLAKE2b-256 checksum
How to use checksums
65dc90a69c8e92791c743c86feae840ca09b6a6331ed53d4cedb4ec04abd8513
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

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

Download URL openinference_instrumentation_portkey-0.1.3-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99de9e9cf4a583318210f290b7628a38e515cef55b8678e38334959e6406ebe7
BLAKE2b-256 checksum
How to use checksums
fabebb27ecd633c70d6196bc4306781e51685087c2b9499a1793aaf9e20e93c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release history Release notifications | RSS feed

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

This release

0.1.3 This release

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