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

File metadata

File hashes

Hashes for syntrac_opentelemetry_instrumentation_transformers-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d22c7cff2eddc7e4c2a7251b14c43dbb52a0c031433d6ca71ad0c1092c5a55b7
MD5 cf217ae35a245d1e1feda84e4c299532
BLAKE2b-256 140e2d2506250cd4487cf3ff7607d1477b2dfd223cd943539b8fae58961155ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for syntrac_opentelemetry_instrumentation_transformers-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 80ad4f328d2cd81987a7e0934119c05b8fa655fc20d87dfdc70ffa0568c4064e
MD5 4acf9022354c19552d99ab49dcfc7ed3
BLAKE2b-256 4681962c88d86f520779b6855e435c1c2f134f890f71e7b8155412edc276f707

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