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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.15.11.tar.gz
Algorithm Hash digest
SHA256 43b0b9d8d68a818e91ef4a6e61604e8239562d0fa5732b2765ebffb5fa350c69
MD5 6ec2cfb0cd7ddb3049735bea7d1767d6
BLAKE2b-256 a2685c3eff40d0a5df7bae050e26de10e371bc274a23158c65f8a2fb5022ff18

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.15.11-py3-none-any.whl
Algorithm Hash digest
SHA256 9a24c11b39d7de55acd903c99ee1b55cf8d974a79f888673fe1081b88ce06232
MD5 1502e5dc6fe5a29c43aa629a09f66f71
BLAKE2b-256 705c2d2429011973f38c7bef1062155b88dd89a9acb9965750c96ead895d8353

See more details on using hashes here.

Provenance

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