Skip to main content

Moda OpenAI instrumentation for LLM observability

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


Download files

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

Source Distribution

moda_openai-0.1.0.tar.gz (7.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moda_openai-0.1.0-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file moda_openai-0.1.0.tar.gz.

File metadata

  • Download URL: moda_openai-0.1.0.tar.gz
  • Upload date:
  • Size: 7.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for moda_openai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b8c021db7974211182f7fb6de8da2d70264ebe6e295af6ba83806bac9fe0c632
MD5 9773c596bba25ec7656676c6fa664c10
BLAKE2b-256 21aa49a00ec1c14d40182616d640b06bfa15a51fec73e4500b7299b857c40b9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for moda_openai-0.1.0.tar.gz:

Publisher: publish.yml on ModaLabs/moda-python

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

File details

Details for the file moda_openai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: moda_openai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 42.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for moda_openai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c40d27d79e0b861efea267582bfc189790c46cbba5586d95cb50818ff3ce37ab
MD5 326ee7a3d1d687c81eb927dc5da7bb94
BLAKE2b-256 d744eb0286a7cdbe7dba262409b15b7bfec643aed91fd3d1b79606e5a2ea29f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for moda_openai-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ModaLabs/moda-python

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