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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.15.1.tar.gz
Algorithm Hash digest
SHA256 8ffb36bd63e44f4b81f4b14eeee10f462840f0acb41b4c883a335b2a7d17f69b
MD5 1211fb8039a0f8ecf14a207a6c3c064e
BLAKE2b-256 9399f8afeb571b226be1cfe201bb421e32e1ed095d578b6e19d057429de9f327

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.15.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c48e28976b72d244e5945df2647bb3fcd24b1f9c51c8dc97b70ec9860e3df92
MD5 6e447d476c663ef5e3bd77eff6e8fec4
BLAKE2b-256 592af6f2a410dabe291f3e83fa7e617f0a29a5202674fc448b17fdffa80362f9

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