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.13.tar.gz.

File metadata

File hashes

Hashes for openinference_instrumentation_portkey-0.1.13.tar.gz
Algorithm Hash digest
SHA256 fe299fecc97fda166e1c1c7b191e0bb551ad199c9c8d911948d9820a306951c9
MD5 d9dc1e9b4d502d4b0fce905cb6abfe03
BLAKE2b-256 eb6b4f6789112eddc69415be9e96d83f84d3ce415a8769c091e71c5f5c71646b

See more details on using hashes here.

Provenance

The following attestation bundles were made for openinference_instrumentation_portkey-0.1.13.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.13-py3-none-any.whl.

File metadata

File hashes

Hashes for openinference_instrumentation_portkey-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 095dfb825bbc6072c5adb5bf2618bbf11a7875f4e14fe886ab8876e0abbe2cd3
MD5 dfbf8db220a8f42fe83dad9323f71ea2
BLAKE2b-256 5d08049fa74657055f827119dfe8a136c05bf71e855014238a0e776764638a17

See more details on using hashes here.

Provenance

The following attestation bundles were made for openinference_instrumentation_portkey-0.1.13-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