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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.26.2.tar.gz
Algorithm Hash digest
SHA256 38867d0e5d743a2f59e10c267418a31c560847eef6e90d96ab86d31e4e9f592c
MD5 a6f72aad7d8ccd89d66367e2a1cdf092
BLAKE2b-256 091cf62cba56e9d2f69d34be65cbbb98a30d9796363bcf6c1ed31383d739d722

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.26.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4b9d165375406b429a89a8125f19d987a4f56ade9bbb0b33aa96b778a0e49de6
MD5 4b3699eb784d012dcfc77bce0c3c3938
BLAKE2b-256 e8179d0f4cbd655dff0c07f2fb326c9552978648855fbbcc4881282b6c5bba9a

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