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

Built Distribution

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_openai-0.33.12.tar.gz
Algorithm Hash digest
SHA256 2c6dfd74d9d56ca393f9dbfc92883c7397d63408ff18b3d9a774ea1611a48ed9
MD5 4deaab430fdf3ca962fb271e27b93844
BLAKE2b-256 10ec2f9bb0a22ba916c10b2ef63ccde48f17348c49c2a651b8590a94076308e8

See more details on using hashes here.

Provenance

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

Publisher: release.yml on traceloop/openllmetry

Attestations:

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_openai-0.33.12-py3-none-any.whl
Algorithm Hash digest
SHA256 d5d0c83a469dbf7ab97d1c482ce78f7ba23c00015b01bc8be43cdc0e5d7c497f
MD5 a41983e62450ec3a65c5a3fd2ed68297
BLAKE2b-256 c521c4a2b70e9f3487ba7123fde8c55090ff4a3f227477261fac1d0b73d6d349

See more details on using hashes here.

Provenance

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

Publisher: release.yml on traceloop/openllmetry

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page