Skip to main content

OpenTelemetry Google Generative AI instrumentation

Project description

OpenTelemetry Google Generative AI Instrumentation

This library allows tracing Google Gemini prompts and completions sent with the official Google Generative AI library.

Installation

pip install opentelemetry-instrumentation-google-generativeai

Example usage

from opentelemetry.instrumentation.google-generativeai import GoogleGenerativeAiInstrumentor

GoogleGenerativeAiInstrumentor().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


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_google_generativeai-0.32.1.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.32.1.tar.gz
Algorithm Hash digest
SHA256 b6b83b49ee208725004879548062982b9d2a0c7b8c9b0ba19704670360846bee
MD5 7d761d467b39ef1da49a65b5c3442bd4
BLAKE2b-256 c31e759495d07b3607245bb67de20558f104a59eb6b6218b6ff395558eaf6764

See more details on using hashes here.

File details

Details for the file opentelemetry_instrumentation_google_generativeai-0.32.1-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.32.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29c5ea00c7fbc100f88a92acff0f5f9dbd8b3193fbb55ed1a2d6168799461985
MD5 6598f8dea109a2917e2d4a4675aafafa
BLAKE2b-256 4102af449c2f51f93316d88e06388741aee27b7e2b5361fa49c9fde1a1c8deac

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