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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file openinference_instrumentation_portkey-0.1.12.tar.gz.

File metadata

File hashes

Hashes for openinference_instrumentation_portkey-0.1.12.tar.gz
Algorithm Hash digest
SHA256 3217c66c3ffcd38ed2dda280b30dd1ad9a6a3ce103c4e91b367091c5817f0e75
MD5 c6df4e58203f9622112f793f350402ba
BLAKE2b-256 af50547d6ab6271b128508eb376750cef2b16f91c4481364db8424d163e9e239

See more details on using hashes here.

Provenance

The following attestation bundles were made for openinference_instrumentation_portkey-0.1.12.tar.gz:

Publisher: publish.yaml on Arize-ai/openinference

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openinference_instrumentation_portkey-0.1.12-py3-none-any.whl.

File metadata

File hashes

Hashes for openinference_instrumentation_portkey-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 0086a5cb4d51931b6578f0a0c39c3bf5731d6d931ea60325565b8d40fee58679
MD5 9a233d60849f98ed85f189040b703090
BLAKE2b-256 d53609d1e1410aeb2f098e0757a756fc05e40f8edc30639a9c395d562219b202

See more details on using hashes here.

Provenance

The following attestation bundles were made for openinference_instrumentation_portkey-0.1.12-py3-none-any.whl:

Publisher: publish.yaml on Arize-ai/openinference

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page