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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.28.2.tar.gz
Algorithm Hash digest
SHA256 bf1277244e4bc7264942263e506f10cb59a25439914b74d546f9235a22442bc9
MD5 64a73a7d5fcc54826e558a18c939022b
BLAKE2b-256 dc090348c9b86bb8e1315ae52bab40e206ff215ae761e8c5fb1b989c4e3fd7bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.28.2-py3-none-any.whl
Algorithm Hash digest
SHA256 158427cfb8372aa09028b52ef4bcf8e6092ecd51221375d50ccda893427895d8
MD5 17e9bb6d497e364a2eb5abcbed4d640f
BLAKE2b-256 7b728ef2d3804c558a1f9614081f5ad51a402b3ef41af07c4693b0a151c647ee

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