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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.33.0.tar.gz
Algorithm Hash digest
SHA256 d7295f1a62fda6c2db7fcacf44d74263f52a019b27b8c1b1649c185a49b6e0b9
MD5 2f5f40c55e8d5dc6382dde72c99dff13
BLAKE2b-256 1c49cd4d080ca49baaf8c17308e054e906ae9d488e12b23476a92ce6403d9a6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.33.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01884271c86380ccab8e43256a407122c8bb512abae094e278dd0e662e4510b8
MD5 6ad32fe085559830b7689ba30bc82006
BLAKE2b-256 5f48f633fa66c52c151483600cf7f82f7a672f8ba7b4358a8aaca83dd8857670

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