Skip to main content

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

Metadata

Release files for moda-openai 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moda-openai 0.1.0
File Size Uploaded
moda_openai-0.1.0.tar.gz 7.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for moda-openai 0.1.0
File Interpreter ABI Platform
moda_openai-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 MB

Release files / moda_openai-0.1.0.tar.gz

Download URL moda_openai-0.1.0.tar.gz
Size 7.0 MB
Tags Source
SHA-256 checksum
How to use checksums
b8c021db7974211182f7fb6de8da2d70264ebe6e295af6ba83806bac9fe0c632
BLAKE2b-256 checksum
How to use checksums
21aa49a00ec1c14d40182616d640b06bfa15a51fec73e4500b7299b857c40b9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 22, 2026.

Transparency log

Release files / moda_openai-0.1.0-py3-none-any.whl

Download URL moda_openai-0.1.0-py3-none-any.whl
Size 42.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c40d27d79e0b861efea267582bfc189790c46cbba5586d95cb50818ff3ce37ab
BLAKE2b-256 checksum
How to use checksums
d744eb0286a7cdbe7dba262409b15b7bfec643aed91fd3d1b79606e5a2ea29f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page