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 syntrac-opentelemetry-instrumentation-transformers

Example usage

from syntrac_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 SYNTRAC_TRACE_CONTENT environment variable to false.

SYNTRAC_TRACE_CONTENT=false

Project details


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 syntrac_opentelemetry_instrumentation_transformers-0.0.2.tar.gz.

File metadata

File hashes

Hashes for syntrac_opentelemetry_instrumentation_transformers-0.0.2.tar.gz
Algorithm Hash digest
SHA256 15f2b67081b66da0bb23295569145d0a7c662de32bb2a04bd404a6eeac50d15e
MD5 353344e4e55bac934beaee531b5fd5d9
BLAKE2b-256 98b25af700e33058a86ac361a1f63037e5593d8ae051153331c093bb45e22008

See more details on using hashes here.

File details

Details for the file syntrac_opentelemetry_instrumentation_transformers-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for syntrac_opentelemetry_instrumentation_transformers-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a817f772b801d3a436ecded9bae3139b232641d431f739333d0cd868538d9fe6
MD5 78dd87bcd03f558171f2ea65841d9708
BLAKE2b-256 985bda87a40a4f23c884fafe9e1753e09b3000639d03cbe0453aeec8a8d00323

See more details on using hashes here.

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