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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.33.10.tar.gz
Algorithm Hash digest
SHA256 30f3c327eaef223171c36f12f4eef6fcb41657649398431cccf44d8ae6ca9979
MD5 621c2a0d1e18060c0cde937c9cb86c72
BLAKE2b-256 4ad1f96ce2e1f164509420085d95b2a77825c1bc4724f568e648812459ad82a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_google_generativeai-0.33.10.tar.gz:

Publisher: release.yml on traceloop/openllmetry

Attestations:

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_google_generativeai-0.33.10-py3-none-any.whl
Algorithm Hash digest
SHA256 d8d96bad213b578acc26c588f4e049e67e2c8c46640721aa06b6f8ce45a2a8c3
MD5 359ebd19c9037a3f5f12af2501fe6ede
BLAKE2b-256 815f9d4c865872ee82f5e16ecfb7bd48c89f05fa9a2a0f8f030579917b5d088d

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_google_generativeai-0.33.10-py3-none-any.whl:

Publisher: release.yml on traceloop/openllmetry

Attestations:

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