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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.14.5.tar.gz
Algorithm Hash digest
SHA256 9fcbaf95f523d30f9ca2507e849655bb3fcbc8a35a476ebd439ebd8dbe497f0d
MD5 7a0bf377e2b1056403217a42c6da3c75
BLAKE2b-256 8c103ccce11b3de3e072309499d7e67e3f3774a812152116df4819049ad3f65e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.14.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0d1c4f147400cc775c07cb0c5f83078a7489308e2c61758c1454a58072c875f3
MD5 b9ae4a6dfd5280e91cf870bb4aa79060
BLAKE2b-256 d5e98164c73707d4798fa4aa9deba2321557d9a8afd2f6d5fc4a5ac9403277ec

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