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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.25.6.tar.gz
Algorithm Hash digest
SHA256 63340b74518488760b92916cbed0bd9015ba433389f7aaf04bc8757aec9b85f6
MD5 1eaaa07b469734ebf982742700bd2671
BLAKE2b-256 3444546d671c950b349f2daf580064b170510dd590af7bff2609aae5aa2ea566

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.25.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7c4807eb908ec578d9a47048c7cf20de7d512042d27ab80681b3ba37269c0822
MD5 4c7b5b93997ec0989a4cb0d824d7f901
BLAKE2b-256 bbb830d4c37389147f2c34b407c15290149cd91f21096f7e970a3d357d915797

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