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.15.9.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.15.9.tar.gz
Algorithm Hash digest
SHA256 1be521e00cd3b64936eee3148a118457a5c8c0f167b3926638fb6bc5f70d41ae
MD5 55393ee5e4711176d4ec5e295b445fc5
BLAKE2b-256 59890a7714581ff73d826db671923d5f4d4d0483b9038724fdbbea44d8dc6486

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.15.9-py3-none-any.whl
Algorithm Hash digest
SHA256 5de35809597d839dcba7b36d1382adc777d3bc9b19b25c124d6600c36d78a85f
MD5 0655d67d5dc61964a4a638792648b84d
BLAKE2b-256 15454f84ebe521d421dcde39fad6dca77063f8177705082eb500a3fe14061b07

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