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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.33.7.tar.gz
Algorithm Hash digest
SHA256 29391473d1380199b99b5ce4e277351a4a5efaf6cf049e7cf0880a7e2fd6ec34
MD5 ae30e220d4390aa008ed4987ea548638
BLAKE2b-256 fd0429ffb6ee5da94e7b7d2c7c3f98d0307c8cb3d2edc9ac663152a0721a0864

See more details on using hashes here.

Provenance

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

Publisher: release.yml on traceloop/openllmetry

Attestations:

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.33.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a07822f0e7fdb74576060648a949670f1d197dd61081b21ce07afba9eff4f50c
MD5 252c7928d56dc57e3b60e75a723542e6
BLAKE2b-256 30e5426fbe7d4952430c9c07fbb23192dc7dea19554259425ffff745f8346b35

See more details on using hashes here.

Provenance

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

Publisher: release.yml on traceloop/openllmetry

Attestations:

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