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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.33.11.tar.gz
Algorithm Hash digest
SHA256 c04bf37186619f5d7ba56dcf365881691f2c45126997bd63ca9a1980bee37f51
MD5 dddd2607c51bb84039e5d1485267f3d6
BLAKE2b-256 c2ae74fd93b19d85bb351e12fa7ec0b30fc4a9b631509e8d4561ec089e13d1ed

See more details on using hashes here.

Provenance

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

Publisher: GitHub
  • Repository: traceloop/openllmetry
  • Workflow: release.yml
Attestations:
  • Statement type: https://in-toto.io/Statement/v1
    • Predicate type: https://docs.pypi.org/attestations/publish/v1
    • Subject name: opentelemetry_instrumentation_transformers-0.33.11.tar.gz
    • Subject digest: c04bf37186619f5d7ba56dcf365881691f2c45126997bd63ca9a1980bee37f51
    • Transparency log index: 147774488
    • Transparency log integration time:

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_transformers-0.33.11-py3-none-any.whl
Algorithm Hash digest
SHA256 7e4a3fd49f1e697e2afbeb3922e4a69f8fe52e94af5eadab191fb45dc94bf3b4
MD5 3500b3c67cd19602254ad9aea621b5c8
BLAKE2b-256 86307a77d7a7b0f48529fdf6c77e01226b82dfc87a0af28d90780ca6e986c780

See more details on using hashes here.

Provenance

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

Publisher: GitHub
  • Repository: traceloop/openllmetry
  • Workflow: release.yml
Attestations:
  • Statement type: https://in-toto.io/Statement/v1
    • Predicate type: https://docs.pypi.org/attestations/publish/v1
    • Subject name: opentelemetry_instrumentation_transformers-0.33.11-py3-none-any.whl
    • Subject digest: 7e4a3fd49f1e697e2afbeb3922e4a69f8fe52e94af5eadab191fb45dc94bf3b4
    • Transparency log index: 147774539
    • Transparency log integration time:

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