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

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.25.4.tar.gz
Algorithm Hash digest
SHA256 9312e31cb6ed7f659a88b43fddbc697c407762e72727d608262c6f14226aeec7
MD5 2d81127dcfa356c0fbd7fac2f5786100
BLAKE2b-256 926e901ccd797c0baa2d4c2de829a11ee3eda23d699737b8d7986fadd76c1c5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.25.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6e6b124d6b62282bff57764f17e5c9d6e5f953df12bfd9331d983d7efb42ee36
MD5 af32a5346ac5b15de1c2d72d91e20801
BLAKE2b-256 a4daa3261c77f34b62156eaffce766f00e8d35c9ee52e8402e4e175830c7d36b

See more details on using hashes here.

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