Skip to main content

OpenInference Portkey AI Instrumentation

Project description

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

Project details


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

File metadata

File hashes

Hashes for openinference_instrumentation_portkey-0.1.10.tar.gz
Algorithm Hash digest
SHA256 90b2e28cdbe23a8f7f248cbb6214c4c9d8d1fddc290def7f201b4b24f7770a90
MD5 0ceb6e3bd46d5594abc95790d30e2247
BLAKE2b-256 9db1472c119285bf5ba2f32de076373c14fcd50064773d7ee041373f005fce30

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openinference_instrumentation_portkey-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 de9f21204694569572e8ef21c2bc6e6ebdc5e88e953ab2a9fe6b5f04f0907f1b
MD5 582f5eabb2774db87a8e82b758a3a42a
BLAKE2b-256 415a7e4cf6abbb4620a8098dc4a781b506a50fc94b61a1a5dbffe579775250e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for openinference_instrumentation_portkey-0.1.10-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 Pingdom Monitoring Sentry Error logging StatusPage Status page