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
- Download URL: opentelemetry_instrumentation_openai-0.33.12.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c6dfd74d9d56ca393f9dbfc92883c7397d63408ff18b3d9a774ea1611a48ed9 |
|
MD5 | 4deaab430fdf3ca962fb271e27b93844 |
|
BLAKE2b-256 | 10ec2f9bb0a22ba916c10b2ef63ccde48f17348c49c2a651b8590a94076308e8 |
Provenance
The following attestation bundles were made for opentelemetry_instrumentation_openai-0.33.12.tar.gz
:
Publisher:
release.yml
on traceloop/openllmetry
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
opentelemetry_instrumentation_openai-0.33.12.tar.gz
- Subject digest:
2c6dfd74d9d56ca393f9dbfc92883c7397d63408ff18b3d9a774ea1611a48ed9
- Sigstore transparency entry: 148749179
- Sigstore integration time:
- Predicate type:
File details
Details for the file opentelemetry_instrumentation_openai-0.33.12-py3-none-any.whl
.
File metadata
- Download URL: opentelemetry_instrumentation_openai-0.33.12-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5d0c83a469dbf7ab97d1c482ce78f7ba23c00015b01bc8be43cdc0e5d7c497f |
|
MD5 | a41983e62450ec3a65c5a3fd2ed68297 |
|
BLAKE2b-256 | c521c4a2b70e9f3487ba7123fde8c55090ff4a3f227477261fac1d0b73d6d349 |
Provenance
The following attestation bundles were made for opentelemetry_instrumentation_openai-0.33.12-py3-none-any.whl
:
Publisher:
release.yml
on traceloop/openllmetry
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
opentelemetry_instrumentation_openai-0.33.12-py3-none-any.whl
- Subject digest:
d5d0c83a469dbf7ab97d1c482ce78f7ba23c00015b01bc8be43cdc0e5d7c497f
- Sigstore transparency entry: 148749254
- Sigstore integration time:
- Predicate type: