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

File metadata

File hashes

Hashes for openinference_instrumentation_portkey-0.1.11.tar.gz
Algorithm Hash digest
SHA256 6d4feb8edc5057a4e25edca1dfa5bc2414050d62f4825e4ba344732d9c80bc76
MD5 e64db1201ed3c717dca046c5131527cd
BLAKE2b-256 8cfe3abc7c54e2b78cc190ec4762e637342468dd039ece803318fafe87329f97

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for openinference_instrumentation_portkey-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 77c3192dbcb2a4680c733ddfad6c815b903037ff813953c3ac431e74220d57e5
MD5 a561a16ba1cfca1d92d9769dacad6f7a
BLAKE2b-256 8e4cc1694b4cd59ab8218567b71bbbb65bbdae57929f89c573b873dde4c269c1

See more details on using hashes here.

Provenance

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