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

File metadata

File hashes

Hashes for openinference_instrumentation_portkey-0.1.14.tar.gz
Algorithm Hash digest
SHA256 7e83add750907792a37f949954e2d043dd1795dc9ed83346d13680bc03abd37f
MD5 2b1ea9011055609cd22ebe52c8aeee73
BLAKE2b-256 e388206226f3e3b3f539b4156209211fdd592dc19e3ce90ccd5d4d9a80904773

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openinference_instrumentation_portkey-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 b6365a8f38716749bc86f061a9e66a090dbb2ec6b8cad429dc3465b0d9e29306
MD5 396e0cf65806d92bed515e789b611feb
BLAKE2b-256 72ad9119cbe6e1d5f15a304e83a516ae575e4273c96e00691264f8f3182edb35

See more details on using hashes here.

Provenance

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