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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.15.12.tar.gz
Algorithm Hash digest
SHA256 930184c1e207fc508588820e1dbce3925211f6ceffce9b64f54e0dac4a68abf4
MD5 04271c72138163e3b226dd49e886a501
BLAKE2b-256 7bce4ebb2d963e52c70e8406b6470dbf3bc879c70ecbe6749cfe1dc75dfe13bc

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.15.12-py3-none-any.whl
Algorithm Hash digest
SHA256 53aa4f4c73d0975a2518cb07f456b19d1b26f45b9662d5b9ecdaae3e8a8a99ff
MD5 36b855c62f572cf55db30f7984c117e9
BLAKE2b-256 cd9acb415a818af1b49170fc3bb20a1474b7f0f94b1d8718f597babe06efdfed

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