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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.29.0.tar.gz
Algorithm Hash digest
SHA256 a39cde9c9c6e20cc7c0e868cb17b60a55c3f057d0965eccbf73fceae8063d1bd
MD5 d8896dfa1b6abe417d2ffe0b099ec5ee
BLAKE2b-256 ccb78baad3f743f4df6f9c3363885872894d712b4ec46951be5a29e84f18e7ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.29.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f027ecc636486c81f803bc5293ba3955e82138d63aeba0f905d48371e267ab6
MD5 4607f02da6936dc4bae96e5805b73ba1
BLAKE2b-256 a8ae28500144967888ae7845d6bdb1359a55bc9ddd87453e327d4a942e019fb8

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