Skip to main content

OpenTelemetry OpenAI instrumentation

Project description

OpenTelemetry OpenAI Instrumentation

This library allows tracing OpenAI prompts and completions sent with the official OpenAI library.

Installation

pip install opentelemetry-instrumentation-openai

Example usage

from opentelemetry.instrumentation.openai import OpenAIInstrumentor

OpenAIInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

TRACELOOP_TRACE_CONTENT=false

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

opentelemetry_instrumentation_openai-0.40.14.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file opentelemetry_instrumentation_openai-0.40.14.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_openai-0.40.14.tar.gz
Algorithm Hash digest
SHA256 3ba8e36a3853833f5c0c6b3b8ffa0f1289e6423e0d428bd1c7b3f27abdc545f0
MD5 879dd46d38b82f7205f384ccbb0001f5
BLAKE2b-256 1791f721da20b8f5eb29138900bf0d9cd094e52f94a26558f42a124a66ea38d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_openai-0.40.14.tar.gz:

Publisher: release.yml on traceloop/openllmetry

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

File details

Details for the file opentelemetry_instrumentation_openai-0.40.14-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_openai-0.40.14-py3-none-any.whl
Algorithm Hash digest
SHA256 72319113370a018390e9c987dc3dac569380591fbaa5639c5e5cacd3f3165f4a
MD5 bb372486f2298651b60e699275ae143a
BLAKE2b-256 e4f6865eb4a9416567559dd344dbefb2a2c3035f6066985e0b130f62458c2342

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_openai-0.40.14-py3-none-any.whl:

Publisher: release.yml on traceloop/openllmetry

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 Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page