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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.61.0.tar.gz
Algorithm Hash digest
SHA256 7969e9c1380f1d66285841c6284fc982c70c412924978746d96ebba4ec546ebf
MD5 9f1367886a0769554b87b44a8c1774cd
BLAKE2b-256 1cf4fdceea0036048d839be57e235cb9b063f2a3cd692c4c9a313294986671ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_transformers-0.61.0.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.61.0-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.61.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5fb377cdb76da5f0c7d324a63db6b4504fc3c78ccb5cb271a4b7d892e7a0eb5d
MD5 5e1f46de7cb2d524b8d8f9e410fc7dca
BLAKE2b-256 aea7eed092140e7c209de9efafae843f7f7c4153f8f3fbc0262e909e5c9ccafe

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_transformers-0.61.0-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