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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.59.1.tar.gz
Algorithm Hash digest
SHA256 a97e68ba55fc4a93597379322d5e484237a688d7d37bcbabfeec7ccb4cc36f4c
MD5 08885c7e2419010ae3e9f357b239ccfb
BLAKE2b-256 d2a0ca0fd8c8515b9885d54a3690bfaddd9ab33c59fca0979b6a03af8f07a9b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_transformers-0.59.1.tar.gz:

Publisher: release.yml on traceloop/openllmetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.59.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a793ecb2c5dbeaabceca8b324ef7b9fbafd137ee9b5761d8e007aab0f4f021f2
MD5 4f28b2e99220971510d54e821d1fc66e
BLAKE2b-256 2c30933e494ee487d1a8b65c5c4ef3cad6a336cb2dad6f0753b7c0b36ea8ef43

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_transformers-0.59.1-py3-none-any.whl:

Publisher: release.yml on traceloop/openllmetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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