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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.31.4.tar.gz
Algorithm Hash digest
SHA256 80e243933724bf1d9891866c8cb14284bd3f38cbd56f22c315b7ab7ea0c50431
MD5 d4d569b1de0c59301d1a1c703ae787b2
BLAKE2b-256 6216b69706dc63f76fb4419b1d7fb3af8300017283e81c689c97d76be4dde3af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.31.4-py3-none-any.whl
Algorithm Hash digest
SHA256 05ad48b3e2676496a6083d28254bbf1898d489d276426276bd60f8e47e4dbf44
MD5 bf5894256f18b99f61f456e6099de545
BLAKE2b-256 8f7a8f7950005581168784af0a71fc0820897456cea4965940d2441e1c9e6a41

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