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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.32.0.tar.gz
Algorithm Hash digest
SHA256 53353f2f09b69a1799d216605809903af879fac6b3ad048723a9dba94acee8ce
MD5 9974e9b56ef6f26dade33f15abadcb17
BLAKE2b-256 188df68133939b064dacc057f71c7a79946cc514a177ca0aa479216796769a8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.32.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b467e9ca8aab7a5f0cdaebb26145850c80a9ac819ff53144030ec47c0dc7e88
MD5 6c986dc6e6233ba3d4d7ca8624361c69
BLAKE2b-256 786b8aa09b6d384e3d26e7d96c371ffb1f6307032fdccde1708d89b322037bfc

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