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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.32.2.tar.gz
Algorithm Hash digest
SHA256 8991c44560822de1bcaa371f3c87727403f112dd2d7448513816abec56439ec5
MD5 324eac2b23227edf87d650e571d6f791
BLAKE2b-256 a35bb0ade23ea17d93ce14c30f5908a9583ecad385d31408175f4414d7c8b7b9

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.32.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fdd7299b05e7179c44bcf70cce9cc9f9a11ee16556d1d17c0207be36c88c5b94
MD5 3046a4cbfd8e18501f8573bf85c13aea
BLAKE2b-256 d6825483881f262430c3af61175baf1a1dd1e54a07b882bf696b2510c2012ebd

See more details on using hashes here.

Provenance

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