Skip to main content

OpenTelemetry transformers instrumentation

Project description

OpenTelemetry HuggingFace Transformers Instrumentation

This library allows tracing texte generation calls sent with the official HuggingFace Transformers library.

Installation

pip install opentelemetry-instrumentation-transformers

Example usage

from opentelemetry.instrumentation.transformers import TransformersInstrumentor

TransformersInstrumentor().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

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

File details

Details for the file opentelemetry_instrumentation_transformers-0.15.4.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.15.4.tar.gz
Algorithm Hash digest
SHA256 acc696b46848ee10d4e9dee1df5b1e3585689aef26f1527af533f247098febb8
MD5 109549d1fab70703ae88e433a9f750f8
BLAKE2b-256 5522e3af3bac4d1fa1aeb3fd32a46c9c54fcc7b5d909f2d54494eebc61165ef9

See more details on using hashes here.

File details

Details for the file opentelemetry_instrumentation_transformers-0.15.4-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.15.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1a5a0483119aadb3f2b48e1744f1833afc0dd490a35043e58a1ebfd32af9510d
MD5 aa2ce65037b0b67113be9301f6e9499b
BLAKE2b-256 ae4be2c77b4fafaa6b0673f82f049ff082d439e98d624ea5961e06b88d47359d

See more details on using hashes here.

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